Software version updating method, device and equipment based on operation and maintenance data analysis

Through the method based on operation and maintenance data analysis, crawling technology and algorithms use block verification of software update information, the problem of low software version update efficiency and security in cloud virtual machines is solved, and an efficient and secure update process is achieved.

CN120408647APending Publication Date: 2025-08-01SHENZHEN BUSINESS MANAGEMENT SOFTWARE CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510908284.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-02
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

In the prior art, the software version update process is relatively low in efficiency and security, especially in the cloud virtual machine environment, manual management makes it difficult to ensure update timeliness and security.

Method used

Through crawling technology, software update version information is detected, algorithm blocking and differential verification is carried out, test files are generated based on operation and maintenance data analysis, security checks are carried out, and update files are constructed.

Benefits of technology

It improves the efficiency and security of software version updates, reduces the amount of data block acquisition, improves security testing efficiency and update file generation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120408647A_ABST
    Figure CN120408647A_ABST
Patent Text Reader

Abstract

The invention relates to a software updating technology, and discloses a software version updating method, device and equipment based on operation and maintenance data analysis, and the method comprises the following steps: after updating verification of updating version information of software and a current version file is passed, carrying out algorithm partitioning on the updating version information to obtain a mapping file, performing difference verification on the mapping file and the current version file to obtain a first mapping file with difference and a second mapping file without difference; generating a test file according to the first data block and the second data block corresponding to the two mapping files, and compiling and contrastively analyzing the test file and the current version file to obtain a test data block; and generating a test constraint condition according to operation and maintenance data in the historical test information, and constructing and executing an update file according to the first data block and the second data block when judging that the update version information is safe according to the test constraint condition and the test data block. According to the invention, the efficiency and security of the software version updating process are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software update, and particularly to a software version update method, device and electronic device based on operation and maintenance data analysis. Background Art

[0002] After a software product is released, it needs to be continuously maintained and improved. The developers of the software product push these updated software products to user terminals in different ways, and this process is called software update. In the earliest days, the software development cycle was very long and the software update frequency was very low. It might be updated once a month or several months. Maintaining a software update service was relatively simple. Just remind users to download the latest version of the software product for overwriting installation. With the rapid development of the mobile Internet era in software development, the competition of software products has become increasingly fierce. The rapid and frequent release of software versions has become the mainstream development model, and the development cycle has been greatly shortened, which has brought new challenges to the software update service.

[0003] Currently, there are two software update methods. One is full update, which requires downloading the entire installation file, but the update process is redundant, and there are problems such as wasting traffic resources and user bandwidth. The other is incremental update. Users do not need to download the full version of the new software, but only need to download the incremental part. However, during cross-version updates, the installation process will be very time-consuming. Further, the software version update and security inside the virtual machines deployed in the cloud are manually managed and controlled. In the case of enterprise-level tenants or the use of a large number of virtual machines, the operation and maintenance of software versions is undoubtedly a heavy task, making the timely update and security of software versions unable to be fully guaranteed.

[0004] In summary, there are problems of low efficiency and security in the software version update process in the prior art. Summary of the Invention

[0005] The present invention provides a software version update method, device and electronic device based on operation and maintenance data analysis, and its main purpose is to solve the problems of low efficiency and security in the software version update process.

[0006] To achieve the above object, a software version update method based on operation and maintenance data analysis provided by the present invention includes: Using web crawler technology to detect the update version information of the software, obtaining the current version file of the software from a preset cache node, and performing update verification on the update version information and the current version file; After the update verification passes, performing algorithmic chunking on the update version information to obtain multiple update mapping files, and performing differential verification on the multiple update mapping files and the current version file to obtain a first mapping file with differences and a second mapping file without differences; loading a first data block corresponding to the first mapping file, extracting a second data block corresponding to the second mapping file from the cache node, cleaning code statements in the second data block to obtain cleaned data, generating a test file based on the cleaned data and the first data block, and compiling and performing comparative analysis based on the test file and the current version file to obtain a test data block; Obtaining operation and maintenance data from historical test information of the software, generating test constraints based on the operation and maintenance data, constructing a test path using the test data block, and determining whether the updated version information has security issues based on the test constraints and a test result of executing the test path using a preset execution engine; When the updated version information does not have a security problem, the first data block and the second data block are used to construct an update file of the software, the updated version information and the update file are stored in the cache node, and the software update is performed according to the update file.

[0007] Optionally, the detecting software update version information using crawler technology includes: Using crawler technology to randomly select a software from the preset virtual machine software as the target software, and crawl the software address of the target software; Access the software address, enter the software page and perform page analysis on the software page, and determine whether there is update information based on the analysis result; If there is no update information, return to the step of randomly selecting a software from the preset virtual machine software as the target software using crawler technology; If update information exists, the update version information is extracted from the version status list of the software.

[0008] Optionally, performing update verification on the updated version information and the current version file includes: Extract the version format file from the updated version information, and read the current version number corresponding to the current version file; Parsing the version format file to obtain an updated version number corresponding to the updated version information, and comparing the updated version number with the current version number for consistency; When the updated version number is the same as the current version number, it is determined that the update verification fails; When the updated version number is different from the current version number, it is determined that the update verification is passed.

[0009] Optionally, performing algorithmic block division on the update version information to obtain multiple update mapping files includes: Extract the updated version file from the updated version information and initialize the starting boundary of the updated version file; Use a preset sliding window to slide and split starting from the starting boundary to obtain split strings; Calculate the fingerprint data of the split strings to obtain multiple data blocks corresponding to the updated version file; Calculate the hash values of the data blocks and serialize the sizes and hash values of the data blocks into an update mapping file.

[0010] Optionally, the step of performing differential verification on multiple update mapping files and the current version file to obtain a first mapping file with differences and a second mapping file without differences includes: Extract multiple current mapping files corresponding to the current version file, and parse the data structures of the update mapping file and the current mapping file to obtain a first hash array corresponding to the update mapping file and a second hash array corresponding to the current mapping file; Traverse the current subscript of the second hash array and query for the same hash data in the first hash array according to the current subscript; Use the mapping file corresponding to the first hash array for which the same hash data is not queried as the first mapping file, and use the mapping file corresponding to the first hash array for which the same hash data is queried as the second mapping file.

[0011] Optionally, the step of performing compilation and comparative analysis on the test file and the current version file to obtain test data blocks includes: Compile the test file to obtain an intermediate representation file; Analyze the intermediate representation file and the current version file to obtain a first file flow graph corresponding to the intermediate representation file and a second file flow graph corresponding to the current version file; Through comparative analysis of the first file flow graph and the second file flow graph, obtain the affected data blocks and use the affected data blocks as test data blocks.

[0012] Optionally, the step of generating test constraint conditions based on the operation and maintenance data includes: Classify the operation and maintenance data to obtain path constraint data and security constraint data; Classify the path constraint data according to the statement type, and extract first test constraint conditions from the classified data according to the statement type; Classify the security constraint data according to the function type, and extract second test constraint conditions from the classified data according to the function type; Summarize the first test constraint condition and the second test constraint condition to obtain a test constraint condition.

[0013] Optionally, the software update performed according to the update file includes: Unpackage the update file and add internal tags to the data; Send the update file to the virtual machine bridge through a preset port; The virtual machine bridge selects a corresponding subnet through the internal tag and sends the update file to the virtual machine corresponding to the subnet through the port.

[0014] To solve the above problems, the present invention also provides a software version update device based on operation and maintenance data analysis. The device includes: A version file acquisition module, configured to use web crawler technology to detect software update version information and obtain the current version file of the software from a preset cache node; A mapping file generation module, configured to, after the update verification of the update version information and the current version file passes, perform algorithmic partitioning on the update version information to obtain multiple update mapping files, and perform difference verification on the multiple update mapping files and the current version file to obtain a first mapping file with differences and a second mapping file without differences; A test data block generation module, configured to load a first data block corresponding to the first mapping file, extract a second data block corresponding to the second mapping file from the cache node, perform cleaning processing on the code statements in the second data block to obtain cleaning data, generate a test file based on the cleaning data and the first data block, and perform compilation and comparative analysis based on the test file and the current version file to obtain a test data block; A version test module, configured to obtain operation and maintenance data in the historical test information of the software, generate a test constraint condition according to the operation and maintenance data, construct a test path using the test data block, and determine whether there is a security problem with the update version information according to the test constraint condition and a preset execution engine's test result of the test path; An update file processing module, configured to, when there is no security problem with the update version information, construct an update file of the software using the first data block and the second data block, store the update version information and the update file in the cache node, and perform software update according to the update file.

[0015] To solve the above problems, the present invention also provides an electronic device. The electronic device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the software version update method based on operation and maintenance data analysis described above.

[0016] In the embodiment of the present invention, by analyzing the data of the updated version information of the software and the current version file, it is determined whether there is an updated version, and the software update process is started; by performing algorithmic chunking and differential verification according to the updated version information, the division of the blocks with updated content is realized; by extracting the second data block corresponding to the second mapping file from the cache node, the download amount of data block acquisition is reduced, and the acquisition efficiency of the data block is improved; by cleaning the code statements in the second data block and filtering out the statements unnecessary for testing, the efficiency of security testing is improved; by analyzing the operation and maintenance data in the current test information of the software, the test constraint conditions are determined, and the security testing of the software version is realized. Further, the security of software version update is realized through the security testing of the software version; by loading the obtained first data block and extracting the second data block from the cache node to generate an update file, the generation efficiency of the update file is improved. Therefore, the software version update method, device and electronic device based on operation and maintenance data analysis proposed by the present invention can solve the problems of low efficiency and low security in the software version update process. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 It is a flowchart of a software version update method based on operation and maintenance data analysis provided by an embodiment of the present invention; Figure 2 It is a flowchart of algorithmic chunking of updated version information provided by an embodiment of the present invention; Figure 3 It is a flowchart of differential verification of multiple updated mapping files and the current version file provided by an embodiment of the present invention; Figure 4 It is a functional module diagram of a software version update device based on operation and maintenance data analysis provided by an embodiment of the present invention; Figure 5 It is a structural diagram of an electronic device for implementing the software version update method based on operation and maintenance data analysis provided by an embodiment of the present invention.

[0018] The implementation, functional features and advantages of the present invention will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0019] It should be understood that the specific embodiments described herein are merely for explaining the present invention and are not intended to limit the present invention.

[0020] An embodiment of the present application provides a software version update method based on operation and maintenance data analysis. The execution subject of the software version update method based on operation and maintenance data analysis includes, but is not limited to, at least one of electronic devices such as a server, a terminal, etc. that can be configured to execute the method provided by the embodiment of the present application. In other words, the software version update method based on operation and maintenance data analysis can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes, but is not limited to: a single server, a server cluster, a cloud server, or a cloud server cluster, etc. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms.

[0021] Refer to Figure 1 As shown, it is a flowchart of a software version update method based on operation and maintenance data analysis provided by an embodiment of the present invention. In this embodiment, the software version update method based on operation and maintenance data analysis includes: S1. Use web crawler technology to detect the update version information of the software, obtain the current version file of the software from a preset cache node, and perform an update verification on the update version information and the current version file.

[0022] In the embodiment of the present invention, the use of web crawler technology to detect the update version information of the software includes: Step A: Randomly select a software from the software in a preset virtual machine as the target software by using web crawler technology, and capture the software address of the target software; Step B: Access the software address, enter the software page and perform page analysis on the software page, and determine whether there is update information according to the analysis result; If there is no update information, return to the above step A; If there is update information, extract the update version information from the version status list of the software.

[0023] Furthermore, in the embodiment of the present invention, the cache node is used to store the current version file of the updated software and the relevant data of the current version (for example, data packets, etc.). Specifically, the cache node includes, but is not limited to: a database, a blockchain node, a network cache.

[0024] Embodiments of the present invention can obtain the current version file of the software from the cache node through a preset acquisition interface or through a computer script with data scraping function, such as a Java script or Python.

[0025] In embodiments of the present invention, the updating verification of the updated version information and the current version file includes: Extract the version format file from the updated version information, and read the current version number corresponding to the current version file; Parse the version format file to obtain the updated version number corresponding to the updated version information, and compare the updated version number with the current version number for consistency; When the updated version number is the same as the current version number, it is determined that the update verification fails; When the updated version number is different from the current version number, it is determined that the update verification passes.

[0026] Further, the parsing of the version format file to obtain the updated version number corresponding to the updated version information includes: Select a corresponding parser according to the format type of the version format file to parse the version format file to obtain parsing data; Extract the data at a preset position in the parsing data as the updated version number.

[0027] Specifically, the format type is used to identify the format type of the data in the version format file. Embodiments of the present invention can use a pre-constructed regular expression to extract the format type of the version format file. The regular expression is a pre-compiled function that can recall data in a fixed format.

[0028] In embodiments of the present invention, the data obtained by parsing with a parser includes data corresponding to the updated version number, and its position in the parsing data can be fixed at a certain preset position; the parser includes but is not limited to Carakan C / C++, SquirrelFish C++, and SquirrelFish Extreme C++.

[0029] In embodiments of the present invention, the version format file can use the YML format to represent the data fields in the file.

[0030] For example, assume that the version number corresponding to the currently installed file of the software is , and the updated version number corresponding to the updated version information is , if , it indicates that the updated version number is the same as the current version number, the update verification fails, and the version update is not performed; otherwise, it indicates that the updated version number is different from the current version number, the update verification passes, and the version update is required.

[0031] S2. After the update verification passes, perform algorithmic chunking on the updated version information to obtain multiple updated mapping files, and perform differential verification on the multiple updated mapping files and the current version file to obtain a first mapping file with differences and a second mapping file without differences.

[0032] In the embodiment of the present invention, the sliding window technology is used to chunk the updated version file in the updated version information. By determining the boundaries of each window, the updated version file is split into data blocks with unequal lengths.

[0033] Please refer to Figure 2 As shown, in the embodiment of the present invention, the performing algorithmic chunking on the updated version information to obtain multiple updated mapping files includes: S21. Extract the updated version file in the updated version information and initialize the starting boundary of the updated version file; S22. Use a preset sliding window to slide and split starting from the starting boundary to obtain a split string; S23. Calculate the fingerprint data of the split string to obtain multiple data blocks corresponding to the updated version file; S24. Calculate the hash value of the data block and serialize the size and hash value of the data block into an updated mapping file.

[0034] In the embodiment of the present invention, the sliding window can be a fixed number of bytes (for example, 48 bytes); the split string can be a binary string composed of multiple binary characters; the mapping file can be a Blockmap file for block mapping, and each version file in the current version file has a corresponding Blockmap file.

[0035] The embodiment of the present invention can use the Rabin fingerprint (rabin - fingerprinting) algorithm to calculate the fingerprint data of the split string; for different strings A and string B, the calculated fingerprint data is also different.

[0036] Specifically, the embodiment of the present invention uses the following method to calculate the fingerprint data of the split string: , where is the split string 's fingerprint data, where is an indeterminate; is a preset irreducible polynomial.

[0037] Please refer to Figure 3 As shown, in the embodiment of the present invention, the differential verification of the multiple updated mapping files and the current version file to obtain the first mapping file with differences and the second mapping file without differences includes: S31. Extract multiple current mapping files corresponding to the current version file, and parse the data structures of the updated mapping file and the current mapping file to obtain the first hash array corresponding to the updated mapping file and the second hash array corresponding to the current mapping file; S32. Traverse the current subscript of the second hash array, and query for the same hash data in the first hash array according to the current subscript; S33. Use the mapping file corresponding to the first hash array where the same hash data is not queried as the first mapping file, and use the mapping file corresponding to the first hash array where the same hash data is queried as the second mapping file.

[0038] For example, by parsing the data structure of the Blockmap file (updated mapping file), arrays such as hashs[], sizes[], and offset[] can be obtained. In the embodiment of the present invention, index is used to represent the current subscript of each array in traversing the second hash array, and hash index , size index , offset index are obtained, and it is checked whether there is hash index in the first hash array. If there is a (hash, size, offset) pair in the first hash array that satisfies hash = hash index , it indicates that the data block corresponding to the mapping file has not changed, that is, there is no difference. Otherwise, it indicates that the data block corresponding to the mapping file has changed, that is, there is a difference.

[0039] S3. Load the first data block corresponding to the first mapping file, extract the second data block corresponding to the second mapping file from the cache node, clean the code statements in the second data block to obtain cleaned data, generate a test file based on the cleaned data and the first data block, and perform compilation and comparative analysis based on the test file and the current version file to obtain a test data block.

[0040] Embodiments of the present invention can request the first data block corresponding to the first mapping file from a preset version server. Further, embodiments of the present invention can use the HTTP range GET method to load the first data block from the version server; relevant data of the current version file is cached in the cache node, and the second data block corresponding to the second mapping file can be directly extracted from the cache node. Wherein, the first data block and the second data block are specific version data contents.

[0041] In embodiments of the present invention, the cleaning process of the code statements in the second data block to obtain cleaning data includes: Analyze the code statements to obtain executable statements and non-executable statements; Eliminate the non-executable statements, and select representative statements from the executable statements to obtain the generated cleaning data composed of the representative statements.

[0042] In embodiments of the present invention, the non-executable statements include declaration statements, comment statements, macro definitions, blank lines, comment statements, and so on.

[0043] In embodiments of the present invention, the code statements in the same data block are executed together. Therefore, one statement can be selected from the code statements to represent all the code in the data block, thereby improving the efficiency of security testing for the cleaning data and the first data block.

[0044] Embodiments of the present invention can combine the cleaned second data block and the first data block in the sequence order of the mapping files corresponding to the updated version information to obtain a test file.

[0045] In embodiments of the present invention, the obtaining of the test data block according to the test file and the current version file includes: Compile the test file to obtain an intermediate representation file; Analyze the intermediate representation file and the current version file to obtain a first file flow graph corresponding to the intermediate representation file and a second file flow graph corresponding to the current version file; By comparing and analyzing the first file flow graph and the second file flow graph, obtain the affected data blocks, and use the affected data blocks as the test data blocks.

[0046] Embodiments of the present invention can use LLVM to encode the test file to obtain an intermediate representation file composed of intermediate voices in bytecode form.

[0047] In an embodiment of the present invention, the file flow graph can be represented in the form of a CFG (Control Flow Graph). In the file flow graph, each node represents a data block, and each edge represents the branch and jump of the program. By comparing each node in the first file flow graph and the second file flow graph, the data blocks affecting the file flow graph are obtained.

[0048] S4. Obtain the operation and maintenance data in the historical test information of the software, generate test constraint conditions according to the operation and maintenance data, construct a test path by using the test data block, and determine whether there is a security problem in the updated version information according to the test result of executing the test path under the test constraint conditions and a preset execution engine.

[0049] In an embodiment of the present invention, the operation and maintenance data in the historical test information may be test logs generated during the update test of the historical version file and the current version file. Further, the operation and maintenance data can be extracted from the log database by using computer capture statements and the like.

[0050] In an embodiment of the present invention, generating the test constraint conditions according to the operation and maintenance data includes: Classify the operation and maintenance data to obtain path constraint data and security constraint data; Classify the path constraint data according to the statement type, and extract the first test constraint condition from the classified data according to the statement type; Classify the security constraint data according to the function type, and extract the second test constraint condition from the classified data according to the function type; Summarize the first test constraint condition and the second test constraint condition to obtain the test constraint conditions.

[0051] In an embodiment of the present invention, in classifying the path constraint data according to the statement type, the statement type includes assignment statements, branch statements, declaration statements, etc. The constraint data (constraint conditions) corresponding to different statements are different. For example, an array or buffer is declared in a declaration statement, and its starting size determines how many bytes of data the data or buffer can hold. That is, the first test constraint condition corresponding to the statement type of the declaration statement can be that the buffer can hold 200 bytes of data.

[0052] In classifying the security constraint data according to the function type, the function type includes strcpy, sql.exec, printf, etc. The correct use of the above functions is the security constraint corresponding to the function type. For example, for the function strcpy, its function is to copy the data in the source buffer src to the destination buffer dst, and its security constraint is that the length of the source buffer src cannot exceed the length of the destination buffer dst. That is, the second test constraint condition corresponding to the function type strcpy can be dst.length>src.length.

[0053] In an embodiment of the present invention, the constructing a test path by using the test data block includes: Selecting a basic data block from the test data block, and respectively constructing a forward data flow tree and a backward data flow tree according to the basic data block; Using the depth-first algorithm to traverse the forward data flow tree and the backward data flow tree respectively, obtaining a traversal result, and using the traversal result as the test path.

[0054] In an embodiment of the present invention, the test path is executed by using a preset execution engine to obtain a test result, and it is determined whether the test result meets the constraint requirements with reference to the generated test constraint conditions. The test constraint conditions include path constraints and security constraints; if the path constraints are not satisfied, it is determined that there is no security problem; if the path constraints are satisfied and the security constraints are also satisfied, it is determined that there is no security problem; if the path constraints are satisfied and the security constraints are not satisfied, it is determined that there is a security problem.

[0055] S5. When there is no security problem with the updated version information, the updated file of the software is constructed by using the first data block and the second data block, the updated version information and the updated file are stored in the cache node, and the software update is executed according to the updated file.

[0056] In an embodiment of the present invention, the first data block and the second data block belong to the data content of the updated version. Therefore, through the data of the first data block and the second data block, the updated file of the software can be integrally generated.

[0057] In an embodiment of the present invention, the process of constructing the updated file of the software by using the first data block and the second data block is similar to the process of generating the test file according to the cleaned data and the first data block in S3 above, and will not be elaborated here.

[0058] In another alternative embodiment of the present invention, the divided blocks obtained by dividing the algorithm can also be numbered, so as to construct an updated file according to the numbers, which can improve the generation efficiency.

[0059] In the embodiment of the present invention, by storing the updated version information and the updated file in the cache node, it is convenient to call the data related to the current version during the next version update.

[0060] In the embodiment of the present invention, the software update performed according to the updated file includes: Unpack the updated file and add internal tags to the data; Send the updated file to the virtual machine bridge through a preset port; The virtual machine bridge selects the corresponding subnet through the internal tag and sends the updated file to the virtual machine corresponding to the subnet through the port.

[0061] In the embodiment of the present invention, by analyzing the data of the updated version information of the software and the current version file, it is judged whether there is an updated version, and the software update process is started; by performing algorithmic block division and differential verification according to the updated version information, the division of the blocks with updated content is realized; by extracting the second data block corresponding to the second mapping file from the cache node, the download amount of data block acquisition is reduced, and the acquisition efficiency of the data block is improved; by cleaning the code statements in the second data block and filtering out the statements unnecessary for testing, the efficiency of security testing is improved; by analyzing the operation and maintenance data in the current test information of the software, the test constraint conditions are determined, and the security testing of the software version is realized. Further, the security of software version update is realized through the security testing of the software version; by loading the obtained first data block and extracting the second data block from the cache node to generate an updated file, the generation efficiency of the updated file is improved. Therefore, the software version update method based on operation and maintenance data analysis proposed by the present invention can solve the problems of low efficiency and low security in the software version update process.

[0062] As Figure 4 shown, it is a functional module diagram of a software version update device based on operation and maintenance data analysis provided by an embodiment of the present invention.

[0063] The software version update device 100 based on operation and maintenance data analysis according to the present invention can be installed in an electronic device. According to the functions implemented, the software version update device 100 based on operation and maintenance data analysis can include a version file acquisition module 101, a mapping file generation module 102, a test data block generation module 103, a version test module 104, and an updated file processing module 105. The modules in the present invention can also be referred to as units, which refer to a series of computer program segments that can be executed by a processor of an electronic device and can complete fixed functions, and are stored in the memory of the electronic device.

[0064] In this embodiment, the functions of each module / unit are as follows: The version file acquisition module 101 is configured to detect the updated version information of the software by using web crawler technology and obtain the current version file of the software from a preset cache node; The mapping file generation module 102 is configured to, after the update verification of the updated version information and the current version file passes, perform algorithmic chunking on the updated version information to obtain a plurality of updated mapping files, and perform differential verification on the plurality of updated mapping files and the current version file to obtain a first mapping file with differences and a second mapping file without differences; The test data block generation module 103 is configured to load a first data block corresponding to the first mapping file, extract a second data block corresponding to the second mapping file from the cache node, perform cleaning processing on the code statements in the second data block to obtain cleaned data, generate a test file based on the cleaned data and the first data block, and perform compilation and comparative analysis based on the test file and the current version file to obtain a test data block; The version test module 104 is configured to obtain operation and maintenance data in the historical test information of the software, generate test constraint conditions based on the operation and maintenance data, construct a test path by using the test data block, and determine whether there is a security problem with the updated version information according to the test result of executing the test path based on the test constraint conditions and a preset execution engine; The updated file processing module 105 is configured to, when there is no security problem with the updated version information, construct an updated file of the software by using the first data block and the second data block, store the updated version information and the updated file in the cache node, and perform software update according to the updated file.

[0065] Specifically, each module in the software version update device 100 based on operation and maintenance data analysis in the embodiment of the present invention adopts the same technical means as those in the above Figures 1 to 3 software version update method based on operation and maintenance data analysis described above, and can produce the same technical effects, which will not be elaborated here.

[0066] As Figure 5 shown, it is a schematic structural diagram of an electronic device for implementing a software version update method based on operation and maintenance data analysis provided by an embodiment of the present invention.

[0067] The electronic device 1 may include a processor 10, a memory 11, a communication bus 12, and a communication interface 13, and may further include a computer program stored in the memory 11 and operable on the processor 10, such as a software version update program based on operation and maintenance data analysis.

[0068] Among them, in some embodiments, the processor 10 may be composed of an integrated circuit. For example, it may be composed of a single packaged integrated circuit, or may be composed of multiple packaged integrated circuits with the same or different functions, including a combination of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control core (Control Unit) of the electronic device, connecting various components of the entire electronic device through various interfaces and lines. By running or executing programs or modules stored in the memory 11 (such as executing a software version update program based on operation and maintenance data analysis), and calling data stored in the memory 11, it performs various functions of the electronic device and processes data.

[0069] The memory 11 includes at least one type of readable storage medium. The readable storage medium includes flash memory, mobile hard disks, multimedia cards, card-type memories (such as SD or DX memories, etc.), magnetic memories, magnetic disks, optical discs, etc. In some embodiments, the memory 11 may be an internal storage unit of the electronic device, such as the mobile hard disk of the electronic device. In some other embodiments, the memory 11 may also be an external storage device of the electronic device, such as a plug-in mobile hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device. The memory 11 can be used not only to store application software installed on the electronic device and various types of data, such as the code of a software version update program based on operation and maintenance data analysis, but also to temporarily store data that has been output or will be output.

[0070] The communication bus 12 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. The bus is set to realize the connection and communication between the memory 11 and at least one processor 10, etc.

[0071] The communication interface 13 is used for communication between the above-mentioned electronic device and other devices, and includes a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a display (Display), an input unit (such as a keyboard (Keyboard)), and optionally, the user interface may also be a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface.

[0072] Figure 5 Only the electronic device with components is shown, and it can be understood by those skilled in the art that Figure 5 The structure shown does not constitute a limitation on the electronic device 1 , and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0073] For example, although not shown, the electronic device may further include a power source (e.g., a battery) to power various components. Preferably, the power source may be logically connected to the at least one processor 10 via a power management device, thereby enabling functions such as charge management, discharge management, and power consumption management via the power management device. The power source may further include any of one or more DC or AC power sources, a recharging device, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like. The electronic device may also include various sensors, Bluetooth modules, Wi-Fi modules, and the like, which are not further detailed here.

[0074] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.

[0075] The software version update program based on operation and maintenance data analysis stored in the memory 11 of the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve the following: Using crawler technology to detect updated version information of the software, obtaining the current version file of the software from a preset cache node, and performing update verification on the updated version information and the current version file; After the update verification passes, the update version information is divided into blocks by an algorithm to obtain a plurality of update mapping files, and the plurality of update mapping files are subjected to difference verification with the current version file to obtain a first mapping file with differences and a second mapping file with no differences; loading a first data block corresponding to the first mapping file, extracting a second data block corresponding to the second mapping file from the cache node, cleaning code statements in the second data block to obtain cleaned data, generating a test file based on the cleaned data and the first data block, and compiling and performing comparative analysis based on the test file and the current version file to obtain a test data block; Obtaining operation and maintenance data from historical test information of the software, generating test constraints based on the operation and maintenance data, constructing a test path using the test data block, and determining whether the updated version information has security issues based on the test constraints and a test result of executing the test path using a preset execution engine; When the updated version information does not have a security problem, the first data block and the second data block are used to construct an update file of the software, the updated version information and the update file are stored in the cache node, and the software update is performed according to the update file.

[0076] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to the description of the relevant steps in the corresponding embodiment of the accompanying drawings, which will not be repeated here.

[0077] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the module division is merely a logical function division, and other division methods may be used in actual implementation.

[0078] The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed across multiple network elements. Some or all of the modules may be selected to achieve the purpose of the solution of this embodiment according to actual needs.

[0079] In addition, the functional modules in various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or hardware plus software functional modules.

[0080] For those skilled in the art, it is obvious that the present invention is not limited to the details of the above exemplary embodiments, and the present invention can be implemented in other specific forms without departing from the spirit or basic characteristics of the present invention.

[0081] Therefore, from any point of view, the embodiments should be regarded as exemplary and non-limiting. The scope of the present invention is defined by the appended claims rather than the above description. Therefore, all changes falling within the meaning and scope of the equivalent elements of the claims are intended to be included in the present invention. Any reference signs in the claims should not be construed as limiting the claims involved.

[0082] In addition, it is obvious that the term "comprising" does not exclude other units or steps, and the singular does not exclude the plural. The multiple units or devices stated in the system claims can also be implemented by one unit or device through software or hardware. The terms such as "first" and "second" are used to denote names and do not represent any specific order.

[0083] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. A software version update method based on operation and maintenance data analysis, characterized in that The method comprises: Using crawler technology to detect updated version information of the software, obtaining the current version file of the software from a preset cache node, and performing update verification on the updated version information and the current version file; After the update verification passes, the update version information is divided into blocks by an algorithm to obtain a plurality of update mapping files, and the plurality of update mapping files are subjected to difference verification with the current version file to obtain a first mapping file with differences and a second mapping file with no differences; loading a first data block corresponding to the first mapping file, extracting a second data block corresponding to the second mapping file from the cache node, cleaning code statements in the second data block to obtain cleaned data, generating a test file based on the cleaned data and the first data block, and compiling and performing comparative analysis based on the test file and the current version file to obtain a test data block; Obtaining operation and maintenance data from historical test information of the software, generating test constraints based on the operation and maintenance data, constructing a test path using the test data block, and determining whether the updated version information has security issues based on the test constraints and a test result of executing the test path using a preset execution engine; When the updated version information does not have a security problem, the first data block and the second data block are used to construct an update file of the software, the updated version information and the update file are stored in the cache node, and the software update is performed according to the update file.

2. The software version update method based on operation and maintenance data analysis according to claim 1, wherein The use of crawler technology to detect software update version information includes: Using crawler technology to randomly select a software from the preset virtual machine software as the target software, and crawl the software address of the target software; Access the software address, enter the software page and perform page analysis on the software page, and determine whether there is update information based on the analysis result; If there is no update information, return to the step of randomly selecting a software from the preset virtual machine software as the target software using crawler technology; If update information exists, the update version information is extracted from the version status list of the software.

3. The software version update method based on operation and maintenance data analysis according to claim 1, characterized in that, The updating and verifying the updated version information with the current version file includes: Extract the version format file from the updated version information, and read the current version number corresponding to the current version file; Parsing the version format file to obtain an updated version number corresponding to the updated version information, and comparing the updated version number with the current version number for consistency; When the updated version number is the same as the current version number, it is determined that the update verification fails; When the updated version number is different from the current version number, it is determined that the update verification is passed.

4. The software version update method based on operation and maintenance data analysis according to claim 1, wherein The algorithmic block division of the update version information to obtain multiple update mapping files includes: Extracting an updated version file from the updated version information, and initializing a starting boundary of the updated version file; Using a preset sliding window to perform sliding segmentation starting from the starting boundary to obtain a segmented character string; Calculate the fingerprint data of the split string to obtain multiple data blocks corresponding to the updated version file; Calculate the hash value of the data block, and serialize the size and hash value of the data block into an update mapping file.

5. The software version update method based on operation and maintenance data analysis according to claim 1, wherein The step of performing differential verification on multiple update mapping files and the current version file to obtain a first mapping file with differences and a second mapping file without differences includes: Extract multiple current mapping files corresponding to the current version file, and parse the data structures of the update mapping file and the current mapping file to obtain a first hash array corresponding to the update mapping file and a second hash array corresponding to the current mapping file; Traverse the current subscript of the second hash array, and query for the same hash data in the first hash array according to the current subscript; Use the mapping file corresponding to the first hash array for which the same hash data is not found as the first mapping file, and use the mapping file corresponding to the first hash array for which the same hash data is found as the second mapping file.

6. The software version update method based on operation and maintenance data analysis according to claim 1, characterized in that The step of performing compilation and comparative analysis on the test file and the current version file to obtain test data blocks includes: Compile the test file to obtain an intermediate representation file; Analyze the intermediate representation file and the current version file to obtain a first file flow graph corresponding to the intermediate representation file and a second file flow graph corresponding to the current version file; Through comparative analysis of the first file flow graph and the second file flow graph, obtain the affected data blocks, and use the affected data blocks as test data blocks.

7. The software version update method based on operation and maintenance data analysis according to claim 1, characterized in that, The step of generating test constraint conditions according to the operation and maintenance data includes: Classify the operation and maintenance data to obtain path constraint data and security constraint data; Classify the path constraint data according to the statement type, and extract first test constraint conditions from the classified data according to the statement type; Classify the security constraint data according to the function type, and extract second test constraint conditions from the classified data according to the function type; Summarize the first test constraint conditions and the second test constraint conditions to obtain test constraint conditions.

8. The software version update method based on operation and maintenance data analysis according to any one of claims 1 to 7, characterized in that The step of performing software update according to the update file includes: Unpackage the update file and add internal tags to the data; Send the update file to the virtual machine bridge through a preset port; The virtual machine bridge selects the corresponding subnet through the internal tag, and sends the update file to the virtual machine corresponding to the subnet through the port.

9. A software version update device based on operation and maintenance data analysis, characterized in that, The device includes: A version file acquisition module, configured to detect the update version information of the software using web crawler technology, and obtain the current version file of the software from a preset cache node; A mapping file generation module, configured to perform algorithmic chunking on the update version information after the update verification between the update version information and the current version file passes, to obtain multiple update mapping files, and perform differential verification on the multiple update mapping files and the current version file to obtain a first mapping file with differences and a second mapping file without differences; A test data block generation module, configured to load a first data block corresponding to the first mapping file, extract a second data block corresponding to the second mapping file from the cache node, clean the code statements in the second data block to obtain cleaned data, generate a test file according to the cleaned data and the first data block, and perform compilation and comparative analysis based on the test file and the current version file to obtain a test data block; A version test module, configured to obtain operation and maintenance data in the historical test information of the software, generate test constraint conditions according to the operation and maintenance data, construct a test path by using the test data block, and determine whether there is a security problem in the updated version information according to the test result of executing the test path under the test constraint conditions and a preset execution engine; An update file processing module, configured to, when there is no security problem in the updated version information, construct an update file of the software by using the first data block and the second data block, store the updated version information and the update file in the cache node, and perform software update according to the update file.

10. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the software version update method based on operation and maintenance data analysis according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Testing method and device for software update file

    CN101382914A

  • Data block comparison based data updating method

    CN101770515A

  • Incremental code test data processing method and device, electronic equipment and storage medium

    CN117033215A

  • System update file configuration method and device, system update method and device and storage medium

    CN117369842A