Method, device and equipment for detecting compressed file conflict in test environment
By decompressing the compressed file to generate a checklist, and combining the automatic comparison and synchronous feedback method of historical conflict record tables, the problem of manually selecting a server for traversal checks and finding compressed file conflicts is solved in the existing technology, and efficient conflict positioning and processing is achieved.
Patent Information
- Application Number
- CN202311359587.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-19
- Publication Date
- 2025-04-29
AI Technical Summary
In the prior art, it is necessary to manually select a server for traversal checks to find compressed file conflicts. The class file md5 inconsistency caused by multiple compilation of the same code leads to inefficient conflict positioning.
The source code text is obtained by decompressing the compressed file, generating a checklist, and combining the class source code md5 value as the class file identification, analyzing the historical conflict record table, automatically comparing and synchronizing the feedback method, marking conflict data without feedback method, and reducing manual intervention.
It improves the efficiency and accuracy of retrieval of compressed file file paths, avoids repeated confirmation of the same conflict, and improves conflict inspection capabilities and positioning efficiency.
Smart Images

Figure CN119902970A_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of software testing and can be used in the field of financial technology, and in particular to a method, device and equipment for detecting conflicts in compressed files in a test environment. Background Art
[0002] Compressed file is the abbreviation of Java Archive File, which is a document format of Java. It is a platform-independent file format that can combine multiple files into one file. In the process of Java program development, there is often a situation where a compressed file is introduced that depends on other compressed files. When there is a class with the same name in the dependent compressed file, but the class version is inconsistent, a compressed file conflict may occur. If the wrong class is loaded during the program startup process, the startup will report an error. Since the order in which the jvm loads compressed files during the program startup process is determined by the inode order when the compressed files are stored, there is a certain randomness when the compressed files are loaded. For example, if the correct compressed file is loaded on machine A, it can be started normally, but if the wrong compressed file is loaded on machine B, it will report an error when it is started. In the prior art, the compressed file path is generally manually specified or the compressed file path is retrieved by the find command traversal method, and then the class md5 value or jar description information is compared to perform a jar conflict check, but this method requires manual participation and is time-consuming and labor-intensive. In addition, the find command traversal consumes a lot of CPU resources and takes a long time when there are too many files. At the same time, it is also impossible to identify whether the compressed file traversed by find is in use by the program.
[0003] There is an urgent need for a method for detecting conflicts in compressed files in a test environment, so as to solve the problem in the prior art that a server needs to be manually selected to perform traversal checks to find conflicts in compressed files, and the problem that the md5 of the class file is inconsistent due to multiple compilations of the same code, and improve the efficiency of conflict location. Summary of the invention
[0004] In order to solve the problem in the prior art that it is necessary to manually select a server to perform traversal checks to find compressed file conflicts, and the problem that the md5 of the class file is inconsistent due to multiple compilations of the same code, the embodiments of the present specification provide a test environment compressed file conflict detection method, device and equipment, which can analyze the test environment based on historical records, and combine the class source code md5 value as the class file identifier, avoid the inconsistency of the class file md5 caused by multiple compilations of the same code, improve the efficiency and accuracy of compressed file file path retrieval, and avoid repeated confirmation of the same conflict.
[0005] In order to solve the above technical problems, the specific technical solutions of this specification are as follows:
[0006] On the one hand, an embodiment of the present specification provides a method for detecting conflicts in compressed files in a test environment, comprising:
[0007] Decompressing the compressed file to obtain a source code text, and generating a checklist according to the source code text;
[0008] Generate a historical conflict record table based on historical conflicts and their feedback methods;
[0009] Searching for conflict data from the check table, and comparing each found conflict data with the historical conflicts in the historical conflict record table;
[0010] Synchronizing the feedback method of the historical conflict to the conflict data that is the same as the historical conflict, and marking the conflict data that is different from the historical conflict as conflict data without a feedback method;
[0011] The conflict data without feedback method is sent to the user terminal.
[0012] Further, the compressed file is decompressed to obtain the source code text, and a checklist is generated according to the source code text. The specific steps are:
[0013] Decompress and decompile each compressed file in the multiple servers to obtain the source code text of each compressed file in each server;
[0014] Analyzing the source code text to obtain source code text features;
[0015] The source code text features are stored in a storage node to generate a check list.
[0016] Furthermore, the source code text features include: class file name, class name, parent class, class variable name, class variable type, method name, method parameter name, method parameter type, method body MD5 value and source code MD5 value;
[0017] The conflict data is source code text features that the class file names in the compressed files are the same, and the method body md5 value and the source code md5 value are inconsistent.
[0018] Furthermore, the historical conflict record table further includes:
[0019] Historical conflicts that occurred in each server of the plurality of servers and a feedback method thereof;
[0020] The feedback method in the historical conflict record table may be applied to each of the multiple servers.
[0021] Further, each found conflict data is compared with the historical conflicts in the historical conflict record table, and the specific steps are as follows:
[0022] Compare the source code md5 values in the source code text features with the same class file name in the check list of the same server;
[0023] If the source code md5 values in the source code text features with the same class file name are different, query the source code md5 value in the historical conflict record table;
[0024] If the same source code md5 value exists in the historical conflict record table, the corresponding feedback method in the historical conflict record table is recorded in the check table;
[0025] If the same source code md5 value does not exist in the historical conflict record table, compare the class variable name, class variable type and method body md5 value of the source code text with the same class file name;
[0026] If there is a difference, it is confirmed that there is no feedback method conflict data in the checklist.
[0027] Further, the conflict data different from the historical conflict is marked as conflict data without feedback method, further comprising
[0028] Searching for the data without feedback method conflict in the check table of other servers;
[0029] If the same conflicting data exists on multiple servers and exceeds the preset threshold,
[0030] Then, the conflicting data of the other servers are synchronized to the check list of the server according to the feedback method of the conflicting data of the other servers.
[0031] Furthermore, before manually processing the conflicting data without feedback method, the method further includes:
[0032] Determine whether the conflicting data marked as manually processed has any impact according to the class variable name, class variable type, and method body md5 value;
[0033] If there is no impact, updating the status in the checklist to no impact;
[0034] If there is any impact, the relevant entries in the conflict record table will be updated with a status of conflict and the problem will be transferred to manual processing.
[0035] On the other hand, the embodiment of this specification also provides a test environment compressed file conflict detection device, including: a data acquisition module, which is used to decompress the compressed file to obtain a source code text, and generate a checklist according to the source code text;
[0036] A historical data module is used to generate a historical conflict record table based on historical conflicts and their feedback methods;
[0037] A data analysis module, used for searching conflict data from the check table, and comparing each conflict data found with the historical conflicts in the historical conflict record table;
[0038] A data synchronization module, used for synchronizing the feedback method of the historical conflict to the conflict data that is the same as the historical conflict, and marking the conflict data that is different from the historical conflict as conflict data without a feedback method;
[0039] The data processing module is used to send the conflicting data without feedback method to the user terminal.
[0040] On the other hand, an embodiment of the present specification further provides a computer device, including a memory, a processor, and a computer program stored in the memory, and the processor implements the above method when executing the computer program.
[0041] Finally, the embodiments of this specification also provide a computer storage medium on which a computer program is stored. When the computer program is executed by a processor of a computer device, the above method is executed.
[0042] By using the embodiment of the specification, the test environment based on the historical records is analyzed, and the class source code md5 value is combined as the class file identifier. In addition, in order to realize automatic analysis of conflicts, manual confirmation is performed once, and the conclusion is shared by the whole environment, the compressed file is decompressed to obtain the source code text, and a checklist is generated according to the source code text, avoiding the situation of repeated confirmation of the same conflict; a historical conflict record table is generated according to the historical conflicts and their feedback methods; conflict data is searched from the checklist; then each conflict data found is compared with the historical conflicts in the historical conflict record table, and automatic analysis is completed according to the feedback method in the historical data, and no manual selection of servers is required for inspection; finally, the feedback method of the historical conflict is synchronized to the conflict data that is the same as the historical conflict, and the conflict data that is different from the historical conflict is marked as conflict data without feedback method; the conflict data without feedback method is manually processed to generate a new feedback record, so that the compressed file conflict covers the whole environment, improves the conflict inspection capability, and improves the conflict location efficiency. The problem of the inconsistency of the md5 of the class file caused by the manual selection of servers for traversal inspection to find compressed file conflicts and multiple compilations of the same code in the prior art is solved. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For ordinary technical players in this field, other drawings can be obtained based on these drawings without paying creative work.
[0044] Figure 1 It is a schematic diagram of an implementation system of a method for detecting conflicts in compressed files in a test environment according to an embodiment of the present specification;
[0045] Figure 2 It is a flow chart of a method for detecting conflicts in compressed files in a test environment according to an embodiment of the present specification;
[0046] Figure 3 The process of generating a checklist according to an embodiment of this specification is shown;
[0047] Figure 4 The process of comparing conflict data with historical conflicts in the embodiment of this specification is shown;
[0048] Figure 5 The process of finding out the feedback method of conflicting data in the embodiment of this specification is shown;
[0049] Figure 6 The steps before manual processing of the illustrated text description embodiment;
[0050] Figure 7 The figure shows a schematic diagram of the structure of a compressed file conflict detection device in a test environment according to an embodiment of the present specification;
[0051] Figure 8 The figure shows a schematic diagram of the structure of a computer device according to an embodiment of the present specification.
[0052]
Description of the accompanying drawings
[0053] 101. Terminal;
[0054] 102. Server;
[0055] 701, data acquisition module;
[0056] 702. Historical data module;
[0057] 703. Data analysis module;
[0058] 704. Data synchronization module
[0059] 705. Data processing module;
[0060] 802. Computer equipment;
[0061] 804. Processing equipment;
[0062] 806. Storage resources;
[0063] 808, driving mechanism;
[0064] 810, input / output module;
[0065] 812. Input device;
[0066] 814. Output device;
[0067] 816. Presentation equipment;
[0068] 818. Graphical user interface;
[0069] 820, network interface;
[0070] 822, communication link;
[0071] 824. Communication bus. DETAILED DESCRIPTION
[0072] The following will be combined with the drawings in the embodiments of this specification to clearly and completely describe the technical solutions in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on the embodiments in this specification, all other embodiments obtained by ordinary technical players in this field without creative work are within the scope of protection of this specification.
[0073] It should be noted that the terms "first", "second", etc. in the description and claims of this specification and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of this specification described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, device, product or equipment that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0074] like Figure 1The schematic diagram of the system for implementing the method for detecting conflicts of compressed files in a test environment according to an embodiment of the present invention is shown, which may include a terminal 101 and a server 102. A communication connection is established between the terminal 101 and the server 102 to implement data interaction. The terminal 101 may input a compressed file to the server 102, and the server 102 generates a checklist based on the source code text, compares it with the data in the historical conflicts, synchronizes the feedback methods of the historical conflicts in the checklist, and sends the conflict data without the feedback method to the terminal 101 for manual processing.
[0075] In the embodiments of this specification, the server can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, 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 distribution networks (CDN, Content Delivery Network), and big data and artificial intelligence platforms.
[0076] In an optional embodiment, the guiding device may include but is not limited to electronic devices such as smart phones, desktop computers, tablet computers, laptop computers, smart speakers, digital assistants, augmented reality (AR) / virtual reality (VR) devices, smart wearable devices, etc. Optionally, the operating system running on the electronic device may include but is not limited to Android, IOS, Linux, Windows, etc.
[0077] In addition, it should be noted that in practical applications, Figure 1 The application environment shown can be applied in a variety of scenarios, and this specification does not limit it.
[0078] In order to solve the problems existing in the prior art, the embodiments of this specification provide a method, device, equipment and storage medium for detecting conflicts in compressed files in a test environment. Figure 2 The flowchart of a method for detecting conflicts in compressed files in a test environment provided by an embodiment of the present specification is shown in the figure. The process of guiding personnel is described in this figure. The order of steps listed in the embodiment is only one way of executing the steps among many orders, and does not represent the only order of execution. When the actual system or device product is executed, it can be executed in the order or in parallel according to the method shown in the embodiment or the accompanying drawings. Specifically, Figure 2 As shown, the method may include:
[0079] Step 201: decompress the compressed file to obtain a source code text, and generate a checklist according to the source code text;
[0080] Step 202: Generate a historical conflict record table according to historical conflicts and their feedback methods;
[0081] Step 203: searching for conflict data in the check table, and comparing each conflict data found with the historical conflicts in the historical conflict record table;
[0082] Step 204: Synchronize the feedback method of the historical conflict to the conflict data that is the same as the historical conflict, and mark the conflict data that is different from the historical conflict as conflict data without a feedback method;
[0083] The historical conflict feedback method in this step refers to the historical conflict feedback method with the same conflict data as in step 203;
[0084] Step 205: Send the conflict data without feedback method to the user terminal.
[0085] Through the method of the embodiment of this specification, the conflict data in the compressed file is automatically analyzed and checked based on the test environment of the historical records, and in order to improve the efficiency and accuracy of the compressed file path retrieval, the compressed file is decompressed to obtain the source code text and generate a checklist, and the conflict data is searched from the checklist, avoiding the resource consumption and performance problems of traversal. Then, a historical conflict record table is generated according to the historical conflicts and their feedback methods, and then the feedback method of the historical conflicts is synchronized with the existing conflict data in combination with the conflict data found in the checklist, so as to realize the automatic analysis of the conflict data and automatic processing according to the historical data, improve the efficiency of conflict feedback, and avoid the situation where the same conflict is repeatedly confirmed.
[0086] By using the embodiment of this specification, the test environment based on historical records is analyzed, and the class source code md5 value is used as the class file identifier. The class file is a bytecode file generated after the compressed file is compiled, and the md5 value (Message-Digest Algorithm 5) is a widely used cryptographic hash function that can generate a 128-bit hash value to ensure the integrity and consistency of information transmission. In addition, in order to realize automatic conflict analysis, manual confirmation once, and conclusion sharing in the whole environment, the compressed file is decompressed to obtain the source code text, and a checklist is generated based on the source code text, avoiding the situation of repeated confirmation of the same conflict; a historical conflict record table is generated based on historical conflicts and their feedback methods; conflict data is searched from the checklist; each conflict data found is then compared with the historical conflict in the historical conflict record table, completing the automatic analysis based on the feedback method in the historical data, and no longer needing to manually select a server for inspection; finally, the feedback method of the historical conflict is synchronized to the conflict data that is the same as the historical conflict, and the conflict data that is different from the historical conflict is marked as conflict data without a feedback method; the conflict data without a feedback method is manually processed to generate a new feedback record, so that the compressed file conflict covers the whole environment, improves the conflict inspection capability, and improves the conflict location efficiency. It solves the problem that the existing technology requires manual selection of servers to traverse and check to find compressed file conflicts, and the class file md5 inconsistency caused by multiple compilations of the same code.
[0087] According to one embodiment of this specification, Figure 3 As shown, decompressing the compressed file to obtain the source code text, and generating a checklist according to the source code text further includes:
[0088] Step 301: decompress and decompile each compressed file in multiple servers to obtain the source code text of each compressed file in each server;
[0089] In this step, the compressed file path will be collected and stored centrally at regular intervals, and the data sent by the Agent will be received and written to the data storage node. To avoid the performance and efficiency issues of find traversal, the process will always open the dependent compressed files after the Java process is started, and run ps and lsof to obtain the compressed files opened by the process. The compressed file is decompressed and the class is decompiled to obtain the Java source code.
[0090] The specific steps are:
[0091] (1) ps -ef | grep java to obtain the process ID of the Java program.
[0092] (2) lsof -p [process number] | grep "jar$" to obtain the path where the compressed file is located.
[0093] (3) ls [compressed file path] | grep "jar$" to obtain all compressed files in the path.
[0094] Step 302: Analyze the source code text to obtain source code text features;
[0095] The source code text features extracted in this step are necessary features for analyzing compressed file conflicts. Specifically, the source code text features include: class file name, class name, parent class, class variable name, class variable type, method name, method parameter name, method parameter type, method body md5 value and source code md5 value.
[0096] Step 303: The source code text features are stored in the storage node to generate a checklist. The jar name, jar path, jar file creation time, etc. and the source code text features are sent to the storage node for storage, and a checklist is generated.
[0097] In the embodiment of the present specification, the conflict data is a source code text feature in which a class file with the same name exists in the compressed file, but the md5 value of the method body and the md5 value of the source code are inconsistent.
[0098] The source code md5 value is the text formatting of the source code, removing line breaks, deduplication of multiple spaces, and then calculating the source code md5 value obtained by the text. The md5 value of the decompiled source code is compared. If the same, it means that they are the same file. The method body md5 value is the md5 value calculated by the method body text. By comparing the method body md5 value, it is identified whether the code implementation of the method is consistent.
[0099] According to an embodiment of the present specification, in order to process newly added repeated conflicts according to historical conflicts in historical records and corresponding feedback methods, it is necessary to compare newly added conflict data with historical conflicts, such as Figure 4 As shown, each found conflict data is compared with the historical conflicts in the historical conflict record table, and the specific steps are:
[0100] Step 401: comparing the source code md5 values in the source code text features with the same class file name in the check table of the same server;
[0101] In this step, the server list with the latest compressed file update is obtained based on the data storage node of each server and the creation time of the jar file, and then a query is made as to whether there is a class file with the same name. The source code md5 values in the source code text features of the class file names with the same name are the same, indicating that they are the same class files and there is no conflicting data.
[0102] Step 402: If the source code md5 values in the source code text features with the same class file name are different, query the source code md5 value in the historical conflict record table;
[0103] If the same source code md5 value exists in the historical conflict record table, it means that this type of conflict has occurred before. If not, it means that it is a new conflict and needs further analysis and confirmation.
[0104] Step 403: Determine whether there is an identical source code md5 value in the historical conflict record table;
[0105] Step 404: if the same source code md5 value exists in the historical conflict record table, the corresponding feedback method in the historical conflict record table is recorded in the check table;
[0106] Step 405: If the same source code md5 value does not exist in the historical conflict record table, compare the class variable name, class variable type and method body md5 value of the source code text with the same class file name. If there are differences, confirm that there is no feedback method conflict data in the check table.
[0107] In the embodiments of the present specification, since in the process of java program development, it is often the case that a compressed file is introduced that depends on other compressed files. When there is a class with the same name in the dependent compressed file, but the class version is inconsistent, a compressed file conflict may occur. If the startup process loads the wrong class, the startup will report an error, so it is necessary to compare the source code md5 value in the source code text feature with the same class file name. In the prior art, since the jar conflict is a one-time inspection behavior, there is no historical data accumulation, and the accumulated experience in history cannot be applied to the new jar conflict analysis. Therefore, in the embodiments of the present specification, if the same source code md5 value exists in the historical conflict record table, it means that this type of conflict has occurred before, and the feedback method of the historical conflict can be synchronized to the newly added conflict data, avoiding the situation where the same conflict is confirmed repeatedly. If the same source code md5 value does not exist in the historical conflict record table, the class variable name, class variable type and method body md5 value of the source code text with the same class file name are compared. Since it is necessary to perform conflict analysis based on the characteristics of the source code text, automatic conflict analysis is implemented based on the class name, parent class, class method name, method parameter name, method parameter type and other features to improve the efficiency of conflict location. Therefore, it is necessary to compare the class variable name, class variable type and method body md5 value of the source code text with the same class file name. If there is a difference, it is confirmed that it is a new conflict data that needs to be further processed.
[0108] In the embodiment of this specification, in order to share the feedback method in the whole environment, it is also necessary to synchronize the conflicting data in different servers, such as Figure 5 As shown, the conflict data different from the historical conflict is marked as conflict data without feedback method, further comprising
[0109] Step 501: searching the check table of other servers for data without feedback method conflict;
[0110] Step 502: If the same conflicting data exists on multiple servers and exceeds a preset threshold, the conflicting data is synchronized to the check list of the server according to the feedback method of the conflicting data of the other servers.
[0111] In this step, the checklists in different servers include various information such as server IP, jar path, jar name, creation time, etc. Since the order of loading compressed files and the inode order when the compressed files are stored are not fixed, there is a certain randomness when the compressed files are loaded. Exemplarily, the correct compressed file can be loaded first in server A and can be started normally, and the compressed file with error conflicts is loaded first in server B and then an error is reported. Therefore, it is necessary to find the conflict data without feedback method in the checklists of other servers. If multiple servers have adopted the same feedback method for the same conflict data, this feedback method can be synchronized to the newly added conflict data. It is realized that the conflict analysis of compressed files can cover the whole environment, and it is no longer necessary to manually select servers for inspection. The single-point inspection is changed to a comprehensive inspection, which improves the ability of conflict inspection.
[0112] In the embodiments of this specification, in order to realize automatic conflict analysis and improve the efficiency of conflict location, the conflict data without feedback method can be further analyzed before being manually processed, such as Figure 6 As shown, before manually processing the conflicting data without feedback method, it also includes:
[0113] Step 601: judging whether the conflicting data marked as manually processed has any influence according to the class variable name, class variable type, and method body md5 value;
[0114] Step 602: If there is no impact, updating the status in the check table to no impact;
[0115] Step 603: If there is an impact, the update status of the relevant entry in the conflict record table is updated to conflict, and the process is transferred to manual processing.
[0116] By analyzing the code logic, we can determine whether there is any impact from differences in class variable names, class variable types, method body md5 values, etc. If there is an impact, update the relevant entries in the conflict record table to a conflict status, otherwise the status is updated to no impact. After the analysis is completed, the conflict data with an impact will be sent to terminal 101 for feedback, and the conflict situation that requires manual confirmation of the responsible IP will be queried, and the conflict status in the conflict record table will be updated. According to the md5 value of the conflicting class source code, the compressed files of the entire environment and the historical conflict record table will be traversed, the conflict status will be reset, and rectification will be carried out through the relevant person in charge. Complete the conflict handling in the test environment.
[0117] The embodiment of this specification also provides a test environment compressed file conflict detection device, such as Figure 7 As shown, including
[0118] The data collection module 701 is used to decompress the compressed file to obtain the source code text, and generate a checklist according to the source code text;
[0119] A historical data module 702, used to generate a historical conflict record table according to historical conflicts and their feedback methods;
[0120] A data analysis module 703, used to search for conflict data from the check table, and compare each searched conflict data with the historical conflicts in the historical conflict record table;
[0121] A data synchronization module 704 is used to synchronize the feedback method of the historical conflict to the conflict data that is the same as the historical conflict, and mark the conflict data that is different from the historical conflict as conflict data without a feedback method;
[0122] The data processing module 705 is used to send the conflicting data without feedback method to the user terminal.
[0123] Since the principle of solving the problem by the above device is similar to that of the above method, the implementation of the above device can refer to the implementation of the above method, and the repeated parts will not be repeated.
[0124] like Figure 8The structure diagram of the computer device of the embodiment of the present invention is shown. The apparatus in this specification can be the computer device in this embodiment, and executes the method of the above-mentioned specification. The computer device 802 may include one or more processing devices 804, such as one or more central processing units (CPUs), and each processing unit may implement one or more hardware threads. The computer device 802 may also include any storage resource 806, which is used to store any kind of information such as code, settings, data, etc. Non-limitingly, for example, the storage resource 806 may include any one or more combinations of the following: any type of RAM, any type of ROM, flash memory device, hard disk, optical disk, etc. More generally, any storage resource can use any technology to store information. Further, any storage resource can provide volatile or non-volatile retention of information. Further, any storage resource can represent a fixed or removable component of the computer device 802. In one case, when the processing device 804 executes an associated instruction stored in any storage resource or a combination of storage resources, the computer device 802 can perform any operation of the associated instruction. The computer device 802 also includes one or more drive mechanisms 808 for interacting with any storage resources, such as a hard disk drive mechanism, an optical disk drive mechanism, and the like.
[0125] The computer device 802 may also include an input / output module 810 (I / O) for receiving various inputs (via input devices 812) and for providing various outputs (via output devices 814). A specific output mechanism may include a presentation device 816 and an associated graphical user interface (GUI) 818. In other embodiments, the input / output module 810 (I / O), the input device 812, and the output device 814 may not be included, and the computer device 802 may be used as a computer device in a network. The computer device 802 may also include one or more network interfaces 820 for exchanging data with other devices via one or more communication links 822. One or more communication buses 824 couple the components described above together.
[0126] The communication link 822 may be implemented in any manner, for example, through a local area network, a wide area network (e.g., the Internet), a point-to-point connection, etc., or any combination thereof. The communication link 822 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc. governed by any protocol or combination of protocols.
[0127] Corresponds to Figures 2 to 6 The method in the embodiment of the present specification also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method described above are executed.
[0128] The embodiment of the present specification also provides a computer-readable instruction, wherein when the processor executes the instruction, the program therein causes the processor to execute the following Figures 2 to 6 The method shown.
[0129] It should be understood that in the various embodiments of this specification, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this specification.
[0130] It should also be understood that in the embodiments of this specification, the term "and / or" is only a description of the association relationship of the associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this specification generally indicates that the associated objects before and after are in an "or" relationship.
[0131] A person skilled in the art can appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in this specification can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. A professional and technical player can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this specification.
[0132] Technical players in the relevant field can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.
[0133] In the several embodiments provided in this specification, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, or it can be an electrical, mechanical or other form of connection.
[0134] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of this specification.
[0135] In addition, each functional unit in each embodiment of this specification may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0136] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this specification is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of this specification. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0137] Specific embodiments are used in this specification to illustrate the principles and implementation methods of this specification. The description of the above embodiments is only used to help understand the methods and core ideas of this specification. At the same time, for general technical players in this field, according to the ideas of this specification, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on this specification.
Claims
1. A method for detecting conflicts in compressed files in a test environment, characterized in that: The method comprises, Decompressing the compressed file to obtain a source code text, and generating a checklist according to the source code text; Generate a historical conflict record table based on historical conflicts and their feedback methods; Searching for conflict data from the check table, and comparing each found conflict data with the historical conflicts in the historical conflict record table; Synchronizing the feedback method of the historical conflict to the conflict data that is the same as the historical conflict, and marking the conflict data that is different from the historical conflict as conflict data without a feedback method; The conflict data without feedback method is sent to the user terminal.
2. The test environment compressed file conflict detection method according to claim 1, characterized in that: Decompress the compressed file to obtain the source code text, and generate a checklist based on the source code text. The specific steps are: Decompress and decompile each compressed file in the multiple servers to obtain the source code text of each compressed file in each server; Analyzing the source code text to obtain source code text features; The source code text features are stored in a storage node to generate a check list.
3. The test environment compressed file conflict detection method according to claim 2, characterized in that: Source code text features include: class file name, class name, parent class, class variable name, class variable type, method name, method parameter name, method parameter type, method body MD5 value, and source code MD5 value; The conflict data is source code text features that the class file names in the compressed files are the same, and the method body md5 value and the source code md5 value are inconsistent.
4. The test environment compressed file conflict detection method according to claim 2, characterized in that: The historical conflict record table further includes: Historical conflicts that occurred in each server of the plurality of servers and a feedback method thereof; The feedback method in the historical conflict record table may be applied to each of the multiple servers.
5. The test environment compressed file conflict detection method according to claim 4, characterized in that: Each found conflict data is compared with the historical conflicts in the historical conflict record table. The specific steps are: Compare the source code md5 values in the source code text features with the same class file name in the check list of the same server; If the source code md5 values in the source code text features with the same class file name are different, query the source code md5 value in the historical conflict record table; If the same source code md5 value exists in the historical conflict record table, the corresponding feedback method in the historical conflict record table is recorded in the check table; If the same source code md5 value does not exist in the historical conflict record table, compare the class variable name, class variable type and method body md5 value of the source code text with the same class file name; If there is a difference, it is confirmed that there is no feedback method conflict data in the checklist.
6. The test environment compressed file conflict detection method according to claim 5, characterized in that: Marking conflict data different from the historical conflict as conflict data without feedback method, further comprising Searching for the data without feedback method conflict in the check table of other servers; If the same conflicting data exists on multiple servers and exceeds the preset threshold, Then, the conflicting data of the other servers are synchronized to the check list of the server according to the feedback method of the conflicting data of the other servers.
7. The test environment compressed file conflict detection method according to claim 6, characterized in that: Before manually processing the conflicting data without feedback method, the method further includes: Determine whether the conflicting data marked as manually processed has any impact according to the class variable name, class variable type, and method body md5 value; If there is no impact, updating the status in the checklist to no impact; If there is any impact, the relevant entries in the conflict record table will be updated with a status of conflict and the problem will be transferred to manual processing.
8. A test environment compressed file conflict detection device, characterized in that: include, A data acquisition module, used for decompressing the compressed file to obtain the source code text, and generating a checklist according to the source code text; A historical data module is used to generate a historical conflict record table based on historical conflicts and their feedback methods; A data analysis module, used for searching conflict data from the check table, and comparing each conflict data found with the historical conflicts in the historical conflict record table; A data synchronization module, used for synchronizing the feedback method of the historical conflict to the conflict data that is the same as the historical conflict, and marking the conflict data that is different from the historical conflict as conflict data without a feedback method; The data processing module is used to send the conflicting data without feedback method to the user terminal.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory, characterized in that: When the computer program is executed by the processor, the computer program executes the instructions of the method according to any one of claims 1 to 7.
10. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor of a computer device, the computer program executes the instructions of the method according to any one of claims 1 to 7.