CN115510195A - Comparison method, device, terminal and storage medium - Google Patents

Comparison method, device, terminal and storage medium Download PDF

Info

Publication number
CN115510195A
CN115510195A CN202211314052.7A CN202211314052A CN115510195A CN 115510195 A CN115510195 A CN 115510195A CN 202211314052 A CN202211314052 A CN 202211314052A CN 115510195 A CN115510195 A CN 115510195A
Authority
CN
China
Prior art keywords
comparison
directory
file
compared
computer configuration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211314052.7A
Other languages
Chinese (zh)
Inventor
施天助
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Bank Co Ltd
Original Assignee
Ping An Bank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Bank Co Ltd filed Critical Ping An Bank Co Ltd
Priority to CN202211314052.7A priority Critical patent/CN115510195A/en
Publication of CN115510195A publication Critical patent/CN115510195A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a comparison method, a comparison device, a terminal and a storage medium; the embodiment of the invention can receive the comparison request of the client; determining a directory corresponding to the source information in the comparison request; determining a target comparison file in the at least one comparison file according to the path of the comparison file in the directory; and comparing the computer configuration file to be compared with the target comparison file to obtain a difference log. In the embodiment of the invention, the server side can analyze the comparison request from the client side, match the directory and determine the most appropriate target comparison file, thereby ensuring the accuracy of the comparison result and improving the comparison efficiency.

Description

Comparison method, device, terminal and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a comparison method, a decoration, a terminal, and a storage medium.
Background
The configuration file of the computer is a set of settings and files of a required environment to be loaded by a software system for a user when the user logs in the computer or uses software. It includes all user-specific configuration settings such as program items, screen colors, network connections, printer connections, mouse settings, and window size and position.
In the process of web page development, it is usually necessary to compare the configuration file with a preset standard configuration file, so as to prevent problems caused by abnormal configuration, such as window position configuration error, web page path error, and the like. Usually, the technical staff uses the file comparison to realize the comparison operation, but the comparison speed of the method is slow, and the actual operation is easy to have errors, so that the comparison process is terminated accidentally, and the working efficiency of the technical staff is seriously influenced.
Disclosure of Invention
The embodiment of the application provides a comparison method, a comparison device, a terminal and a storage medium, which are used for solving the problem of low efficiency in comparison operation in the prior art, and are beneficial to improving the efficiency of identifying abnormal configuration of a computer by technicians, so that the problem caused by abnormal configuration can be prevented in time.
The embodiment of the application provides a comparison method, which comprises the following steps:
receiving a comparison request, wherein the comparison request comprises source information of a client and a computer configuration file to be compared;
determining a directory corresponding to the source information in the comparison request, wherein the directory comprises at least one comparison file and a path of a standard library;
determining a target comparison file in the at least one comparison file according to the path of the comparison file in the directory;
and comparing the computer configuration file to be compared with the target comparison file to obtain a difference log, wherein the difference log comprises the difference sentences between the computer configuration file to be compared and the target comparison file.
The embodiment of the present application further provides a comparison apparatus, the apparatus includes:
the first receiving unit is used for receiving a comparison request, wherein the comparison request comprises source information of a client and a computer configuration file to be compared;
the first matching unit is used for determining a directory corresponding to the source information in the comparison request, wherein the directory comprises at least one comparison file and a path of a standard library;
the second matching unit is used for determining a target comparison file in the at least one comparison file according to the path of the comparison file in the directory;
and the comparison unit is used for comparing the computer configuration file to be compared with the target comparison file to obtain a difference log, and the difference log comprises the difference sentences between the computer configuration file to be compared and the target comparison file.
In some embodiments, the apparatus further comprises:
the third matching unit is used for acquiring the standard library according to the path of the standard library in the catalog;
the conversion unit is used for converting the computer configuration file to be compared into an abstract syntax tree;
the judging unit is used for traversing all the nodes of the converted computer configuration files to be compared and judging the type of each node;
the public configuration unit is used for deleting all contents corresponding to the node when the node is in a public configuration type;
the complex structure unit is used for replacing the node when the node is of a complex structure type;
and the special statement unit is used for performing statement operation on the node when the node is of a special statement type.
In some embodiments, the complex structural unit further comprises:
the judging subunit is used for judging the subtype of the complex structure to which the node belongs;
the matching subunit is used for determining corresponding alternative content from the standard library according to the complicated structure subtype;
and the replacing subunit is used for replacing the node according to the replacing content.
In some embodiments, the special statement unit further comprises:
the identification subunit is used for identifying the subtype of the special sentence to which the node belongs through a regular expression, and the regular expression is set according to the special sentence preset in the standard library;
and the statement operation subunit is used for executing corresponding statement operation on the node according to the special statement subtype.
In some embodiments, the first matching unit further comprises:
the collection subunit is used for acquiring a directory collection, wherein the directory collection comprises a plurality of personal directories and at least one universal directory, and the personal directories and the universal directory comprise at least one comparison file and a path of a standard library;
a traversal subunit, configured to traverse directories in the directory set;
and the personal directory subunit is used for determining the personal directory as an output directory when the personal directory corresponding to the source information exists in the directory set.
And the universal catalog subunit is used for determining the universal catalog as an output catalog when the personal catalog corresponding to the source information does not exist in the catalog set.
In some embodiments, the apparatus further comprises:
a creating unit configured to create the standard library;
a second receiving unit, configured to receive standardized data, where the standardized data includes a plurality of complex structures and their corresponding alternative contents, and a plurality of special statements and their corresponding statement operation commands;
a first saving unit configured to save the standardized data in the standard library.
In some embodiments, the apparatus further comprises:
a second saving unit configured to save the difference log in a log database;
and the sending unit is used for sending the difference log to the client so that the client can display the difference log.
In the comparison method provided by the embodiment of the application, a comparison request of a client is received, and source information in the comparison request is analyzed to determine a corresponding personal directory or standard directory; then determining a target comparison file according to the path stored in the personal directory or the standard directory and finding a standard library; standardizing the computer configuration files to be compared in the source information based on a standard library; and finally, comparing the computer configuration file to be compared with the target comparison file, and saving the sentence with the difference between the computer configuration file to be compared and the target comparison file as a difference log. In the embodiment of the application, for a computer configuration file to be compared, the server side can match the directory and determine the most appropriate target comparison file by analyzing the comparison request, so that the accuracy of the comparison result is ensured, and the comparison efficiency is improved.
Further, in the embodiment of the application, the client side obtains the computer configuration file to be compared, the user information and the equipment information through the comparison interface; according to the user information, the equipment information and the computer configuration file to be compared, comparing requests are sent to the server side; when the server receives a comparison request sent by the client, the server can determine a corresponding directory according to source information of the comparison request; the server side determines a target comparison file and a standard library according to the directory; the server standardizes the computer configuration files to be compared according to a standard library; the server compares the standardized computer configuration file to be compared with the target comparison file to obtain a difference log; and finally, the server can be used for sending the difference log to the client so that the client can display the difference log.
As can be seen from the above, the server side in the embodiment of the present application may perform standardized processing and comparison operations on one computer configuration file to be compared based on analyzing the comparison request from the client side, and in this process, the source computer configuration file to be processed is converted into a form easy to compare, so as to meet the comparison requirements of technicians, reduce the calculation cost required by the comparison operation, and improve the comparison efficiency; in addition, multiple transmission protocol types can be supported between the server side and the client side, a user-defined transmission protocol type is supported, transmitted data are encrypted, and applicability and safety are further improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the description below are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1a is a schematic view of a scene of a comparison method provided in an embodiment of the present application;
FIG. 1b is a schematic flow chart of a comparative method provided in an embodiment of the present application;
FIG. 2 is a schematic flow chart of a normalization process in the comparison method provided in the example of the present application;
FIG. 3a is a schematic flow chart of a comparative method provided in an embodiment of the present application;
FIG. 3b is a schematic interface diagram of a comparative interface provided by an embodiment of the present application;
FIG. 4 is a schematic flow chart diagram of one embodiment provided by the present application;
FIG. 5 is a schematic view of a first structure of a comparison device provided in an embodiment of the present invention;
FIG. 6 is a schematic diagram of a second structure of a comparison device provided in an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
It is noted that the terminology used in the examples section of the present application is for the purpose of describing particular embodiments of the present application only and is not intended to be limiting of the application. In addition, in the description of the embodiments of the present application, "a plurality" means two or more and "at least one" means one, two or more unless otherwise specified. The term "first" is used for descriptive purposes only and is not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," and the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application provides a comparison method, a comparison device, a terminal and a storage medium.
The comparison method may be specifically integrated in an electronic device, and the electronic device may be a terminal, a server, or other devices. The terminal can be a mobile phone, a tablet Computer, an intelligent Bluetooth device, a notebook Computer, or a Personal Computer (PC) or other devices; the server may be a single server or a server cluster composed of a plurality of servers.
In some embodiments, the comparison method may also be integrated in multiple electronic devices, for example, the comparison method may be integrated in multiple servers, and the comparison method of the present application is implemented by the multiple servers.
In some embodiments, the server may also be implemented in the form of a terminal.
For example, referring to fig. 1a, a schematic application scenario diagram of the comparison method provided in the embodiment of the present application is shown.
As shown in fig. 1a, the server 101 and the client 102 are located in a wireless network or a wired network, and the server 101 may perform data interaction with the client 102.
The server side: the server 101 may receive a comparison request from the client 102, where the comparison request includes source information of the client and a computer configuration file to be compared; after receiving a comparison request, determining a directory corresponding to source information in the comparison request, wherein the directory comprises at least one comparison file and a path of a standard library; then determining a target comparison file in the at least one comparison file according to the path of the comparison file in the directory; further, comparing the computer configuration file to be compared with the target comparison file to obtain a difference log, wherein the difference log comprises the difference sentences between the computer configuration file to be compared and the target comparison file; finally, the server 101 may be configured to send the difference log to the client 102, so that the client 102 presents the difference log to a user.
The client side comprises: the client 102 may display a contrast interface; acquiring a computer configuration file to be compared based on request comparison operation of a user in a comparison interface; acquiring user information and equipment information of a server 101; generating a comparison request according to the user information, the equipment information and the computer configuration file to be compared; sending a comparison request to the server 101 so that the server 101 generates a corresponding difference log according to the comparison request; and receiving and displaying the difference log returned by the server 101.
Specifically, when a user needs to compare a certain computer configuration file to determine whether the computer configuration file is abnormal, the client 102 obtains the computer configuration file to be compared, user information and device information through a comparison interface; according to the user information, the equipment information and the comparison request of the computer configuration file to be compared, sending the comparison request to the server 101; when the server 101 receives a comparison request sent by the client 102, the server 101 may determine a corresponding directory according to source information of the comparison request; the server 101 determines a target comparison file and a standard library according to the directory; the server 101 standardizes the computer configuration files to be compared according to the standard library; the server 101 compares the standardized computer configuration file to be compared with the target comparison file to obtain a difference log; finally, the server 101 may be configured to send the difference log to the client 102, so that the client 102 presents the difference log.
The following are detailed below. The numbers in the following examples are not intended to limit the order of preference of the examples.
In this embodiment, the comparison apparatus may be integrated in the server, and configured to receive a comparison request from the client, generate a difference log, and return the difference log to the client. The server may be an electronic device, for example, a server, a terminal, and the like. For example, the server may be a server, such as a single server, a server cluster, and the like. As another example, the terminal may be a mobile phone, a notebook computer, a personal computer, or the like.
As shown in fig. 1b, the specific flow of the comparison method may include the following steps S110 to S140:
s110, receiving a comparison request, wherein the comparison request comprises source information of a client and a computer configuration file to be compared.
The comparison request refers to a request initiated by the client to the server, and the request is used for requesting to perform comparison operation on the computer configuration file to confirm whether an exception exists. The comparison request may include the computer configuration files to be compared and source information.
The source information may include device information of the client that made the comparison request and user information for performing an operation on the client comparison interface. The device information may include a network IP address of the client, geographical location information, physical device information, and the like, where the physical device information may include device identification information, and the device identification information may be user-defined and uploaded to the server to characterize uniqueness of the device within a certain space-time range. The user information may include user account information, user identity information, and the like for the user initiating the comparison request to log in the client. The device information and the user information may be character strings formed by combining elements such as english letters, numbers, separators and the like, or may be in formats converted by specific standards, such as binary conversion, hexadecimal conversion and the like. The specific device information and the format of the user information may be determined according to the wishes of the skilled person, and should not be construed as limiting the application.
The computer configuration file may be a set of settings and files for a software system to load a desired environment for a user when the user logs in to a computer or when the user uses software. It includes all user-specific configuration settings such as program items, screen color, network connections, printer connections, mouse settings, and window size and position. Computer profiles may be saved using a variety of computer-recognizable file formats, such as js, ini, cfg, env, and the like. In some embodiments, the client may obtain the computer configuration file locally through a specified path, perform encoding and encryption on the computer configuration file and the source information, and then send a generated comparison request packet to the server, where specific packaging and parsing modes are described in detail later.
The manner of receiving the comparison request sent by the client is various, for example, the comparison request sent by the client may be received through a wireless network, or the comparison request sent by the client may be received through a communication medium, for example, the comparison request sent by the client may be received through a network cable, a usb disk, a floppy disk, an optical disk, and the like.
S120, determining a directory corresponding to the source information in the comparison request, wherein the directory comprises at least one comparison file and a path of a standard library.
A directory, i.e. a directory file, refers to a special file that stores files, folders in a structured list in a computer device, and can save the path of the file or folder without saving the file itself. The path is an address of the file stored in the client, the path and the file corresponding to the path are in one-to-one relationship, and the corresponding file can be quickly found through the path.
The comparison files refer to standard computer configuration files which are uploaded to a server side by technicians through a client side in advance, the uploaded standard computer configuration files are connected with a specified directory, and one or more paths of the comparison files can be stored in one directory. The file type of the standard computer configuration file stored in the computer can be consistent with that of the general computer configuration file; a standard computer configuration file may contain standard formats for various syntactic structures, and each syntactic structure may correspond to more than one standard format; compared with a computer configuration file in a real test environment or a development environment, a standard computer configuration file may not be directly brought into the real environment for use; a standard computer configuration file may be specific to at least one computer environment. Thus, there may be more than one standard computer configuration file corresponding to the same development environment. The specific grammatical structure included in the standard computer configuration file, and the elements such as the standard format corresponding to the grammatical structure are determined by the will of the skilled person and the actual operation requirements, and should not be construed as limitations of the present application.
In some embodiments, before step S120, the present embodiment may further include the following standard library establishing processes A1 to A3:
a1, creating the standard library;
a2, receiving standardized data, wherein the standardized data comprises a plurality of complex structures and corresponding replacement contents thereof, and a plurality of special sentences and corresponding sentence operation commands thereof;
and A3, storing the standardized data in the standard library.
The standard library is a database which is stored in a server, has a uniformly managed data set and can be shared by a plurality of technicians. The standard library stores standardized data uploaded by each technician, wherein the standardized data can comprise a plurality of complex structures, a plurality of replacement contents and mapping relations between the complex structures and the replacement contents; the standardized data may further include a plurality of special sentences, a plurality of sentence operation commands, and a mapping relationship between the special sentences and the sentence operation commands. The complex structure can comprise functions, arrays, objects and other formats, and the replacement content, the special statement and the statement operation command are usually in a character string format, wherein the statement operation command can be a command which can be recognized by a server and can be executed by the server through a specific programming language environment. The mapping relation between the complex structure and the replacement content, the special sentences and the sentence operation commands can be one-to-one, many-to-one, one-to-many, many-to-many and the like, and the mapping relation is set by technicians according to actual comparison requirements.
In some embodiments, a complex structure may correspond to a plurality of alternative contents and a special sentence may correspond to a plurality of sentence operation commands, and the priority information may be set for the plurality of alternative contents and the sentence operation commands. Further, when a complex structure corresponds to a plurality of alternative contents and a special sentence corresponds to a plurality of sentence operation commands, priority information among a plurality of corresponding objects can be acquired, and the object with the highest priority information is set as the corresponding alternative content or the sentence operation command. The priority information may be preset by a technician, determined based on user information, analyzed based on historical records, and the like. In particular, the history may be a count of the number of uses of a single replacement content, which may be corrected based on feedback from the technician regarding the comparison.
In some embodiments, a technician may perform addition, deletion, modification, etc. operations on the established standard library, mainly by adding, deleting, modifying one or more elements in the standardized data, so as to update the standard library.
In the embodiment, the standard library is established in advance, so that the computer configuration files to be compared can be standardized quickly, and the comparison efficiency is improved; and the setting of the priority information and the real-time updating of the standard library can ensure that the comparison result meets the requirements of technical personnel.
Specifically, in some embodiments, in step S120, the determining the directory corresponding to the source information in the comparison request may include the following steps S121 to S124:
s121, acquiring a directory set, wherein the directory set comprises a plurality of personal directories and at least one universal directory, and the personal directories and the universal directory comprise at least one comparison file and a path of a standard library;
s122, traversing the directories in the directory set;
s123, when the personal directory corresponding to the source information exists in the directory set, determining the personal directory as an output directory;
and S124, when the personal directory corresponding to the source information does not exist in the directory set, determining the universal directory as an output directory.
The difference is that the personal directory has unique directory identification information determined according to the device information and the user information when technicians upload standard computer configuration files through clients. Specifically, the directory identification information may include a network IP address, geographic location information, device identification information, user account information, user identity information, and the like of the client, and the directory identification information may be obtained by directly splicing these elements after arranging them in a certain order, for example: directory identification information = network IP address + device identification information + user account information, where "+" may only indicate that a front part and a rear part are spliced, that is, "+" may not appear in directory identification information, and "+" may also appear between two adjacent elements as an adapter; the directory identification information may also be a result of performing a conversion and then performing an operation on the above-mentioned elements, for example, setting the directory identification information as a binary string with a length of N, binarizing and adding the above-mentioned elements, if the length of the result of addition is smaller than N, padding zero to the rest positions to be the directory identification information, and if the length of the result of addition is larger than N, taking N bits in the result as the directory identification information according to a preset rule. The specific format of the directory identification information is determined by the discretion of the skilled person, in order to achieve uniqueness of the directory identification information within a certain time-space range. Generally, the contents stored in the personal directory may be modified, but need to be limited by means of a password, device information identification, user information identification, and the like. The universal catalog does not have catalog identification information, and all technicians can modify the contents stored in the universal catalog as required.
For example, the source information may be converted in a manner consistent with the generation manner of the directory identification information, the directory identification information of all the personal directories is traversed, and when the converted source information is completely consistent with or partially consistent with a certain directory identification information, the personal directory corresponding to the directory identification information is determined as the output directory. And after traversing is finished, when no directory identification information meeting the condition is found, namely no personal directory corresponding to the source information exists, taking the universal directory as an output directory.
In the embodiment, by means of matching the personal directories corresponding to the source information through traversing the directory set, the comparison result is ensured to meet the requirements of technical personnel under the condition that a plurality of technical personnel participate in the comparison of the configuration files of the computer; in addition, the setting of the universal catalog can prevent the contrast stop caused by no proper personal catalog, and further improve the contrast efficiency.
S130, determining a target comparison file in the at least one comparison file according to the path of the comparison file in the directory.
The storage position of the comparison file at the server can be directly found through the path, and a target comparison file is further determined in at least one comparison file. For example, when a plurality of comparison files appear, the server can feed back information to the client so that technicians can select appropriate comparison files, and the server receives selection information of the client and then determines the target comparison file; in addition, each comparison file may also have priority information, and the server determines the target comparison file after comprehensively analyzing the source information and the priority information, where the setting of the priority information is described above specifically and is not described herein again.
In some embodiments, before step S140, as shown in fig. 2, the embodiment of the present application may further include the following processes S210 to S260 of standardizing the computer configuration file to be compared:
s210, obtaining the standard library according to the path of the standard library in the catalog.
S220, converting the computer configuration file to be compared into an abstract syntax tree.
The Abstract Syntax Tree (AST) is an Abstract representation of a Syntax structure of a source code, and represents the Syntax structure of a programming language in a Tree form, each node on the Tree represents a structure in the source code, and the Abstract Syntax Tree rewrites a statement of a source computer configuration file, for example, a nested bracket is hidden, a conditional statement is identified by using a branch node, and the like, so as to facilitate subsequent standardized operations. There are various methods for converting the computer configuration file to be compared into the abstract syntax tree, for example, configuring computer software capable of realizing the conversion function in a server or other servers, and obtaining corresponding abstract syntax tree output by inputting the computer configuration file to be compared; the conversion can also be realized by calling a programming environment inside the server. Specifically, the programming language format used by the computer configuration file to be compared is judged first, and then the computer configuration file is placed into a corresponding compiling environment to be analyzed, for example, javaScript may be compiled using node. How to implement the conversion of the computer configuration file to be compared into the abstract syntax tree can be determined according to the will of the skilled person and the actual comparison requirement, and should not be construed as a limitation to the present application.
And S230, traversing all the nodes of the computer configuration file to be compared after conversion, and judging the type of each node.
S240, when the node is in the public configuration type, deleting all the contents corresponding to the node.
The common configuration is a configuration common to different development environments or test environments, and technicians can independently set the common configuration to simplify the operation flow, and the configurations are not changed by the change of the elements such as the technicians and the development projects. Generally, a common configuration is imported by using a fixed statement, and the imported statement can be directly identified to determine whether the node is a common configuration type. For example, import common configuration is imported in JavaScript of a programming language, so that when the import statement is import, it can be determined that the node is a common configuration type, and all contents corresponding to the node are deleted, thereby avoiding comparison of common configuration and improving comparison efficiency.
And S250, when the node is of a complex structure type, carrying out replacement operation on the node.
In some embodiments, in step S250, the replacing the node may further include the following steps S251 to S253:
s251, judging the subtype of the complex structure to which the node belongs;
s252, determining corresponding replacement content from the standard library according to the subtype of the complex structure;
and S253, replacing the node according to the replacing content.
Generally, a node satisfying a complex structure type is assumed to be an assignment node, where the assignment node includes at least one statement, and each statement includes a key/value pair, where a key may be a configuration variable, generally in a string format, and a value is a data content stored by the key, and may be in any format, such as a string, a function, an array, an object, a null format, and the like; when the value is a function, array, or nested object, the node may not contain configuration information for the desired comparison.
According to the steps A1-A3, the complex structures stored in the standard library comprise functions, arrays, composite objects and the like, each complex structure corresponds to a complex operation subtype, and the complex structures such as the functions, the arrays and the like all have specific import sentences in the abstract syntax tree, so that the complex structure subtypes can be judged by identifying the import sentences; furthermore, because the complex structures stored in the standard library are all linked with the replacement contents through the mapping relation, the replacement contents corresponding to the sub-types of the complex structures can be found through the mapping relation; and finally, replacing the values of the corresponding sentences of the nodes by replacing contents integrally, so that only the replaced contents need to be compared during comparison, the error reporting condition caused by the comparison of complex structures is avoided, and the comparison efficiency is improved.
And S260, when the node is of a special statement type, performing statement operation on the node.
In some embodiments, in step S260, performing a statement operation on the node may further include the following steps S261 to S262:
s261, identifying the subtype of the special sentence to which the node belongs through a regular expression, wherein the regular expression is set according to the special sentence preset in the standard library;
s262, executing corresponding statement operation on the node according to the special statement subtype.
According to the steps A1-A3, each special sentence stored in the standard library corresponds to a special sentence subtype, wherein the special sentence can be inserted into a computer configuration file to be compared in advance by a technician, and the purpose is mainly to skip the comparison and analysis of some sentences. The special statements all comprise a preset import statement which can be a character string customized by a technician, such as actmp, so that when the import statement is actmp, the node can be judged to be of the special statement type; then, other contents of the special statement can be identified through the regularization expression, so that the subtype of the special statement to which the special statement belongs is judged; furthermore, because the special sentences stored in the standard library are linked with the sentence operation commands through the mapping relation, the sentence operation commands corresponding to the special sentence subtypes can be found through the mapping relation; and finally, the server executes the statement operation command in a corresponding programming language environment to complete the processing of the node. Through statement operation, the comparison analysis of the specified statement can be skipped, and the comparison efficiency is improved.
S140, comparing the computer configuration file to be compared with the target comparison file to obtain a difference log, wherein the difference log comprises the difference sentences between the computer configuration file to be compared and the target comparison file.
In some embodiments, the step of comparing the computer configuration file to be compared with the target comparison file may include:
a. establishing a sandbox environment, and placing the computer configuration file to be compared and the target comparison file in the sandbox environment;
the sandbox environment is a closed independent operation environment, in the environment, technicians can perform various preset operations on files in the sandbox environment, so that generated data changes can be deleted later, permanent influence on a computer can not be generated, and the safe operation of comparison operation is guaranteed.
b. Traversing all nodes of the computer configuration file to be compared, and judging whether a target comparison file contains a grammar structure corresponding to the nodes or not;
c. when the target comparison file contains a grammar structure corresponding to the node, judging whether the node meets a standard format of the grammar structure;
d. and recording all sentences with differences in the computer configuration file to be matched in the difference log.
Through the steps b and c, nodes which are more excessive than the target comparison file of the computer configuration file to be compared and nodes which do not conform to the standard format can be obtained, wherein the non-conforming to the standard format specifically can be that the nodes are lack of the standard format or excessive sentences, sentence configuration errors exist and the like; finally, all statements of the nodes with the excess and statements of the nodes which are lack, excess and wrong in configuration and do not conform to the standard format can be stored in the difference log according to categories.
In some embodiments, after step S140, the present embodiment may further include the following difference log sending process:
b1, storing the difference log into a log database;
and B2, sending the difference log to the client so that the client can display the difference log.
In some embodiments, each time the server completes a comparison operation, the server may store the difference log of the comparison into the log database, so that a technician may analyze the difference log, check whether a standard library or a comparison file has a setting problem, and provide a space for optimization of the comparison operation.
In the embodiment of the application, a comparison request of a client is received, and source information in the comparison request is analyzed to determine a corresponding personal directory or standard directory; then determining a target comparison file according to the path stored in the personal directory or the standard directory and finding a standard library; standardizing the computer configuration files to be compared in the source information based on a standard library; and finally, comparing the computer configuration file to be compared with the target comparison file, and saving the difference sentences between the computer configuration file to be compared and the target comparison file as difference logs.
As can be seen from the above, in the embodiment of the present application, for a computer configuration file to be compared, the server may match the directory and determine the most appropriate target comparison file by analyzing the comparison request, so as to meet the personalized comparison requirement of the technician, thereby ensuring the accuracy of the comparison result and improving the comparison efficiency; in addition, the setting of the sandbox environment can ensure the contrast safety; the standard library and the log database are arranged, so that the whole comparison method has a space for further improving the efficiency.
In this embodiment, the description will be made from the perspective of a comparison device, which may be specifically integrated in a client, and is used to generate and send a comparison request to a server, and receive and display response content returned by the server.
As shown in fig. 3a, the specific flow of the comparison method may include the following steps S310 to S360:
and S310, displaying a contrast interface.
The comparison page can comprise a request area and a response area, the client can acquire a computer environment configuration file to be compared edited in the request area by a user, send the computer environment configuration file to be compared to the server, acquire the difference log from the server, and display the difference log in the response area.
And S320, responding to the comparison request operation of the user for the comparison interface, and acquiring the computer configuration file to be compared.
The method includes the steps that in response to a comparison request operation of a user for a comparison interface, a plurality of modes of obtaining a computer configuration file to be compared exist, for example, the computer configuration file to be compared is dragged to a request area of the comparison interface; inputting a path of a computer configuration file to be compared in a receiving window of the request area, and acquiring the file by the client through the path; and the user enters a file selection interface through the file selection control, selects and uploads the specified computer configuration file to be compared, and the like.
For example, referring to FIG. 3b, the request area may include a path receive window, a request edit control for an added request, a request delete control, a request send control, and so forth. The user can create an added request by receiving a path of the window input computer configuration file to be compared, edit the content of the added request by clicking the request editing control, and delete the added request by clicking the request deleting control. The user can drag the computer configuration file to be compared to the request area of the comparison interface, so that the client generates an added request according to the computer configuration file to be compared.
And S330, acquiring user information and equipment information.
The user information may include user account information, such as an account number, a user name, and the like.
The device information may include a network IP address of the client, geographical location information, physical device information, and the like.
And S340, generating a comparison request according to the user information, the equipment information and the computer configuration file to be compared.
In some embodiments, in order to improve security, the content to be requested may be encrypted before being transmitted, and the comparison request may be carried by an encrypted request data packet, where step S340 may specifically include the following steps:
a. and acquiring the type information of the transmission protocol and a data packet wrapper corresponding to the type information of the transmission protocol.
The transmission protocol type information is data information carrying the transmission protocol type. The transmission Protocol (Communications Protocol), also referred to as communication Protocol, refers to a system standard that allows two or more terminals in a transmission system to communicate information between each other in any physical medium. The type of the Transmission Protocol is various, for example, a TCP/IP Protocol type (Transmission Control Protocol/Internet Protocol), a UDP Protocol type (User data Protocol), an IPX/SPX Protocol type (Internet Packet Exchange), and a User-defined Transmission Protocol type.
For example, the transport protocol types may include an HTTP (a protocol that transports using TCP) type, an svrkit (a protocol that transports using TCP or UDP) type, a logcsvr (a protocol that transports using HTTP) type, and so on.
b. And packaging the user information, the equipment information, the computer configuration file to be compared and the transmission protocol type information according to the data packet packaging device to obtain a comparison request data packet.
The data packet wrapper may be understood as a section of algorithm code, which is used to encrypt the content to be encrypted by using a transmission protocol to generate an encrypted data packet. Different transport protocols may correspond to their proprietary packet encapsulators. For example, the TCP/IP protocol corresponds to a TCP/IP packet wrapper.
And S350, sending a comparison request to the server so that the server can generate a difference log according to the comparison request.
And S360, receiving and displaying the difference log returned by the server.
After receiving the difference log returned by the server, the client can display the text content of the difference log in the response area.
In some embodiments, the server returns the encrypted difference log data packet, and the response content can be obtained only after the difference log data packet needs to be analyzed, so step S360 may specifically include the following steps:
a. receiving a difference log data packet returned by the server;
b. acquiring a data packet analyzer corresponding to the transmission protocol type information;
c. analyzing the difference log data packet by using a data packet analyzer to obtain a difference log;
the data packet parser is used for parsing the data packet encrypted by adopting the transmission protocol encapsulation, and different transmission protocols can correspond to the proprietary data packet parser. The packet parser may be understood as a section of algorithmic code for decrypting packets encrypted using a transmission protocol.
d. And displaying the difference log.
From the above, the embodiment of the invention can display a contrast interface; responding to a comparison request operation of a user for a comparison interface, and acquiring a computer configuration file to be compared; acquiring user information and equipment information; generating a comparison request according to the user information, the equipment information and the computer configuration file to be compared; sending a comparison request to the server side so that the server side can generate a difference log according to the comparison request; and receiving and displaying the difference log returned by the server. In the scheme, the client can synthesize various information to generate an individualized comparison request, so that the server generates a computer configuration file to be compared according to the comparison request to perform standardized processing, the computer configuration file is converted into a simplified form required by technicians, and the comparison efficiency is improved; in addition, the encrypted comparison request is sent to the server, so that the server can safely and stably process the comparison request.
In the embodiment of the present application, a specific embodiment of a comparison method is further provided, and as shown in fig. 4, a specific flow of the comparison method may include steps S401 to S411:
s401, a client displays a comparison interface, wherein the comparison interface comprises a request area and a response area;
s402, the client responds to the comparison request operation of the user for the comparison interface, and acquires the configuration file of the computer to be compared, user information and equipment information;
s403, the client side configures a file comparison request according to the user information, the equipment information and the computer to be compared;
s404, the client sends the comparison request to the server;
s405, the server receives a comparison request;
s406, the server side determines a directory corresponding to the source information in the comparison request;
s407, the server side determines a target comparison file and a standard library based on the directory;
s408, standardizing the computer configuration files to be compared by the server based on the standard library;
s409, the server compares the computer configuration file to be compared with the target comparison file to generate a difference log.
S410, the server side sends the difference log to the client side;
s411, the client receives the difference log and displays the difference log through the response area.
In the specific embodiment, the client acquires the computer configuration file to be compared, the user information and the equipment information through the comparison interface; according to the user information, the equipment information and the computer configuration file to be compared, comparing requests are sent to the server side; when the server receives a comparison request sent by the client, the server can determine a corresponding directory according to source information of the comparison request; the server side determines a target comparison file and a standard library according to the directory; the server side standardizes the computer configuration files to be compared according to the standard library; the server compares the standardized computer configuration file to be compared with the target comparison file to obtain a difference log; and finally, the server side can be used for sending the difference log to the client side so that the client side can display the difference log.
As can be seen from the above, in this embodiment, the server matches the most suitable comparison file for one to-be-compared computer configuration file based on the comparison request of the client, and performs the standardized processing to complete the comparison operation, and in this process, the source to-be-compared computer configuration file is converted into a form easy to compare, so as to meet the comparison requirement of the technician, reduce the calculation cost required by the comparison operation, and improve the comparison efficiency; in addition, the specific embodiment can also support various transmission protocol types, support the user-defined transmission protocol type and encrypt the transmitted data, thereby further improving the applicability and the safety.
In order to better implement the method, an embodiment of the present invention provides a comparison apparatus, which is suitable for a server, and the comparison apparatus may be specifically integrated in an electronic device, and the electronic device may be a terminal, a server, or other devices.
For example, in the present embodiment, a method according to an embodiment of the present invention will be described in detail with reference to a comparison device, which is specifically integrated in a server.
For example, as shown in fig. 5, the comparison apparatus 500 may include a first receiving unit 510, a first matching unit 520, a second matching unit 530, and a comparison unit 540.
A first receiving unit 510, configured to receive a comparison request, where the comparison request includes source information of a client and a computer configuration file to be compared;
a first matching unit 520, configured to determine a directory corresponding to the source information in the comparison request, where the directory includes at least one comparison file and a path of a standard library;
a second matching unit 530, configured to determine a target comparison file in the at least one comparison file according to a path of the target comparison file in the directory;
a comparing unit 540, configured to compare the to-be-compared computer configuration file with the target comparison file, so as to obtain a difference log, where the difference log includes statements of differences between the to-be-compared computer configuration file and the target comparison file.
In some embodiments, the apparatus further comprises:
a third matching unit, configured to obtain the standard library according to a path of the standard library in the directory;
the conversion unit is used for converting the computer configuration files to be compared into abstract syntax trees;
the judging unit is used for traversing all the nodes of the converted computer configuration files to be compared and judging the type of each node;
the public configuration unit is used for deleting all contents corresponding to the node when the node is in a public configuration type;
the complex structure unit is used for replacing the node when the node is of a complex structure type;
and the special statement unit is used for performing statement operation on the node when the node is of a special statement type.
In some embodiments, the complex structural unit further comprises:
the judging subunit is used for judging the complicated structure subtype to which the node belongs;
the matching subunit is used for determining corresponding alternative content from the standard library according to the complicated structure subtype;
and the replacing subunit is used for replacing the node according to the replacing content.
In some embodiments, the special statement unit further comprises:
the recognition subunit is used for recognizing the subtype of the special sentence to which the node belongs through a regular expression, and the regular expression is set according to the special sentence preset in the standard library;
and the statement operation subunit is used for executing corresponding statement operation on the node according to the special statement subtype.
In some embodiments, the first matching unit further comprises:
the collection subunit is used for acquiring a directory collection, wherein the directory collection comprises a plurality of personal directories and at least one universal directory, and the personal directories and the universal directory comprise at least one comparison file and a path of a standard library;
a traversal subunit, configured to traverse directories in the directory set;
and the personal directory subunit is used for determining the personal directory as an output directory when the personal directory corresponding to the source information exists in the directory set.
And the universal catalog subunit is used for determining the universal catalog as an output catalog when the personal catalog corresponding to the source information does not exist in the catalog set.
In some embodiments, the apparatus further comprises:
a creating unit configured to create the standard library;
the second receiving unit is used for receiving standardized data, wherein the standardized data comprises a plurality of complex structures and corresponding replacement contents thereof, and a plurality of special sentences and corresponding sentence operation commands thereof;
a first saving unit configured to save the normalized data in the standard library.
In some embodiments, the apparatus further comprises:
a second saving unit configured to save the difference log in a log database;
and the sending unit is used for sending the difference log to the client so that the client can display the difference log.
In specific implementation, the above units may be implemented as independent entities, or may be combined arbitrarily, and implemented as the same or several entities, and specific implementations of the above units may refer to the foregoing method embodiment, which is not described herein again.
As can be seen from the above, in the embodiment of the present application, for a to-be-compared computer configuration file, the server may match the directory and determine the most appropriate target comparison file by analyzing the comparison request, perform standardization processing on the to-be-compared computer configuration file to convert the to-be-compared computer configuration file into a form easy to compare, and further perform a comparison operation with the target comparison file, thereby meeting personalized comparison requirements of technicians, ensuring accuracy of comparison results, reducing calculation cost, and improving comparison efficiency.
In order to better implement the above method, an embodiment of the present invention further provides a comparison apparatus, which is suitable for a client, where the test apparatus may be specifically integrated in an electronic device, and the electronic device may be a terminal, such as a mobile phone, a notebook computer, a tablet computer, a personal computer, and the like.
For example, in the embodiment, the method of the embodiment of the invention will be described in detail by taking the comparison apparatus integrated in a notebook computer as an example.
For example, as shown in fig. 6, the comparison apparatus 600 includes a display unit 610, a response unit 620, an acquisition unit 630, a generation unit 640, a transmission unit 650, and a reception unit 660.
A display unit 610 for displaying a contrast interface;
a response unit 620, configured to respond to a comparison request operation of a user for a comparison interface, and acquire a computer configuration file to be compared;
an obtaining unit 630, configured to obtain user information and device information;
the generating unit 640 is configured to generate a comparison request according to the user information, the device information, and the computer configuration file to be compared;
the sending unit 650 is configured to send a comparison request to the server, so that the server generates a difference log according to the comparison request;
the receiving unit 660 is configured to receive and display the difference log returned by the server.
In a specific implementation, the above units may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and the specific implementation of the above units may refer to the foregoing method embodiments, which are not described herein again.
Therefore, the client can synthesize various information to generate an individualized comparison request, so that the server can match the most appropriate comparison file according to the comparison request, carry out standardized processing on the configuration files of the computer to be compared and convert the configuration files into a form easy to compare, and improve the comparison efficiency; in addition, the encrypted comparison request is sent to the server, so that the server can safely and stably process the comparison request.
The embodiment of the invention also provides the electronic equipment which can be equipment such as a terminal, a server and the like.
For example, the terminal may be a mobile phone, a tablet computer, an intelligent bluetooth device, a notebook computer, a personal computer, or the like; the server may be a single server or a server cluster composed of a plurality of servers.
In this embodiment, a detailed description will be given by taking an example in which the electronic device of this embodiment is a server, for example, as shown in fig. 7, which shows a schematic structural diagram of a server according to an embodiment of the present invention, specifically:
the server may include components such as a processor 701 of one or more processing cores, memory 702 of one or more computer-readable storage media, a power supply 703, an input module 704, and a communication module 705. Those skilled in the art will appreciate that the server architecture shown in FIG. 7 is not meant to be limiting and may include more or fewer components than shown, or a combination of certain components, or a different arrangement of components. Wherein:
the processor 701 is a control center of the server, connects various parts of the entire server using various interfaces and lines, performs various functions of the server and processes data by running or executing software programs and/or modules stored in the memory 702 and calling data stored in the memory 702, thereby performing overall monitoring of the server. In some embodiments, processor 701 may include one or more processing cores; in some embodiments, processor 701 may integrate an application processor, which handles primarily the operating system, user pages, applications, etc., and a modem processor, which handles primarily wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 701.
The memory 702 may be used to store software programs and modules, and the processor 701 executes various functional applications and data processing by operating the software programs and modules stored in the memory 702. The memory 702 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, application programs (such as a sound playing function, an image playing function, etc.) required by at least one function, and the like; the storage data area may store data created according to the use of the server, and the like. Further, the memory 702 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 702 may also include a memory controller to provide the processor 701 with access to the memory 702.
The server also includes a power supply 703 for supplying power to the various components, and in some embodiments, the power supply 703 may be logically connected to the processor 701 via a power management system, so that the power management system may perform functions of managing charging, discharging, and power consumption. The power supply 703 may also include any component including one or more of a dc or ac power source, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
The server may also include an input module 704, the input module 704 being operable to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
The server may also include a communication module 705, and in some embodiments the communication module 705 may include a wireless module, through which the server may wirelessly transmit over short distances to provide wireless broadband internet access to the user. For example, the communication module 705 may be used to assist a user in sending and receiving e-mail, browsing web pages, accessing streaming media, and the like.
Although not shown, the server may further include a display unit and the like, which will not be described in detail herein. Specifically, in this embodiment, the processor 701 in the server loads the executable file corresponding to the process of one or more application programs into the memory 702 according to the following instructions, and the processor 701 runs the application program stored in the memory 702, thereby implementing various functions as follows:
receiving a comparison request, wherein the comparison request comprises source information of a client and a computer configuration file to be compared;
determining a directory corresponding to the source information in the comparison request, wherein the directory comprises at least one comparison file and a path of a standard library;
determining a target comparison file in the at least one comparison file according to the path of the target comparison file in the directory;
and comparing the computer configuration file to be compared with the target comparison file to obtain a difference log, wherein the difference log comprises the difference sentences between the computer configuration file to be compared and the target comparison file.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
As can be seen from the above, in the embodiment of the present application, for a computer configuration file to be compared, the server may match the directory and determine the most appropriate target comparison file by analyzing the comparison request, perform standardized processing on the computer configuration file to be compared to convert the computer configuration file to be compared into a form easy to compare, and further perform comparison operation on the computer configuration file and the target comparison file, thereby satisfying personalized comparison requirements of technicians, ensuring accuracy of comparison results, reducing calculation cost, and improving comparison efficiency.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor.
To this end, the embodiment of the present invention provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any one of the testing methods provided by the embodiment of the present invention. For example, the instructions may perform the steps of:
receiving a comparison request, wherein the comparison request comprises source information of a client and a computer configuration file to be compared;
determining a directory corresponding to the source information in the comparison request, wherein the directory comprises at least one comparison file and a path of a standard library;
determining a target comparison file in the at least one comparison file according to the path of the target comparison file in the directory;
and comparing the computer configuration file to be compared with the target comparison file to obtain a difference log, wherein the difference log comprises the difference sentences between the computer configuration file to be compared and the target comparison file.
Since the instructions stored in the storage medium can execute the steps in any test method provided in the embodiments of the present invention, the beneficial effects that can be achieved by any test method provided in the embodiments of the present invention can be achieved, for details, see the foregoing embodiments, and are not described herein again.
The above detailed description is provided for a testing method and device provided by the embodiments of the present invention, and the principle and the embodiments of the present invention are explained in detail by applying specific embodiments, and the description of the embodiments is only used to help understanding the method and the core idea of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A method of comparing, comprising:
receiving a comparison request, wherein the comparison request comprises source information of a client and a computer configuration file to be compared;
determining a directory corresponding to the source information in the comparison request, wherein the directory comprises at least one comparison file and a path of a standard library;
determining a target comparison file in the at least one comparison file according to the path of the comparison file in the directory;
and comparing the computer configuration file to be compared with the target comparison file to obtain a difference log, wherein the difference log comprises the difference sentences between the computer configuration file to be compared and the target comparison file.
2. The comparison method as claimed in claim 1, wherein before comparing said computer configuration file to be compared with said target comparison file, it comprises:
acquiring the standard library according to the path of the standard library in the catalog;
converting the computer configuration file to be compared into an abstract syntax tree;
traversing all the nodes of the converted computer configuration files to be compared, and judging the type of each node;
when the node is in a public configuration type, deleting all contents corresponding to the node;
when the node is of a complex structure type, carrying out replacement operation on the node;
and when the node is of a special statement type, performing statement operation on the node.
3. A comparison method as claimed in claim 2, wherein said performing a replacement operation on said node comprises:
judging the subtype of the complex structure to which the node belongs;
determining corresponding replacement content from the standard library according to the complex structure subtype;
and replacing the node according to the replacement content.
4. The comparison method as claimed in claim 2, wherein said performing a statement operation on said node comprises:
identifying the sub-type of the special sentences to which the nodes belong through regular expressions, wherein the regular expressions are set according to the special sentences preset in the standard library;
and executing corresponding statement operation on the node according to the special statement subtype.
5. The comparison method as claimed in claim 1, wherein said determining the directory corresponding to the source information in the comparison request comprises:
acquiring a directory set, wherein the directory set comprises a plurality of personal directories and at least one universal directory, and the personal directories and the universal directory comprise at least one comparison file and a path of a standard library;
traversing the directories in the directory set;
when the personal directory corresponding to the source information exists in the directory set, determining the personal directory as an output directory;
and when the personal directory corresponding to the source information does not exist in the directory set, determining the universal directory as an output directory.
6. The comparison method as claimed in claim 1, wherein before determining the directory corresponding to the source information in the comparison request, further comprising:
creating the standard library;
receiving standardized data, wherein the standardized data comprises a plurality of complex structures and replacement contents corresponding to the complex structures, and a plurality of special sentences and sentence operation commands corresponding to the special sentences;
storing the normalized data in the standards repository.
7. The comparison method as claimed in claim 1, wherein after comparing the computer configuration file to be compared with the target comparison file to obtain a difference log, the method further comprises:
saving the difference log to a log database;
and sending the difference log to the client so that the client can display the difference log.
8. A contrast device, comprising:
the system comprises a receiving unit, a comparing unit and a comparing unit, wherein the receiving unit is used for receiving a comparison request, and the comparison request comprises source information of a client and a computer configuration file to be compared;
the first matching unit is used for determining a directory corresponding to the source information in the comparison request, wherein the directory comprises at least one comparison file and a path of a standard library;
the second matching unit is used for determining a target comparison file in the at least one comparison file according to the path of the comparison file in the directory;
and the comparison unit is used for comparing the computer configuration file to be compared with the target comparison file to obtain a difference log, and the difference log comprises the difference sentences between the computer configuration file to be compared and the target comparison file.
9. A terminal comprising a processor and a memory, said memory storing a plurality of instructions; the processor loads instructions from the memory to perform the steps of the comparison method as claimed in any one of claims 1 to 7.
10. A storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the steps of the comparison method as claimed in any one of claims 1 to 7.
CN202211314052.7A 2022-10-25 2022-10-25 Comparison method, device, terminal and storage medium Pending CN115510195A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211314052.7A CN115510195A (en) 2022-10-25 2022-10-25 Comparison method, device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211314052.7A CN115510195A (en) 2022-10-25 2022-10-25 Comparison method, device, terminal and storage medium

Publications (1)

Publication Number Publication Date
CN115510195A true CN115510195A (en) 2022-12-23

Family

ID=84512575

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211314052.7A Pending CN115510195A (en) 2022-10-25 2022-10-25 Comparison method, device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN115510195A (en)

Similar Documents

Publication Publication Date Title
US11595477B2 (en) Cloud storage methods and systems
US11269694B2 (en) Automated API code generation
CN108696381B (en) Protocol configuration method and device
CN110324169B (en) Interface management method and device
CN108519967A (en) Chart method for visualizing, device, terminal and storage medium
CN112445700B (en) Test method and device
CN111459415A (en) Cross-cloud data migration method, device, equipment and storage medium
CN108287894B (en) Data processing method, device, computing equipment and storage medium
CN111556158B (en) Access method, access device, access equipment and storage medium of Internet of things platform
CN113254534B (en) Data synchronization method, device and computer storage medium
CN111338637A (en) Code generation method and device
CN111683066A (en) Heterogeneous system integration method and device, computer equipment and storage medium
CN112860247B (en) Custom generation method, device, equipment and medium of model component
CN113238740A (en) Code generation method, code generation device, storage medium, and electronic apparatus
CN114466047B (en) Method, platform, equipment and medium for conveniently accessing Internet of things equipment to Internet of things platform
WO2024060926A1 (en) Constraint file import method and apparatus, device, and storage medium
CN115510195A (en) Comparison method, device, terminal and storage medium
CN111428252A (en) User authority control method and device
CN116467274A (en) Data sharing method and device for multi-source heterogeneous data, storage medium and terminal
CN118170629A (en) Automatic test method and device
CN112925766B (en) Data security management and control device, system and method and readable storage medium thereof
CN114840574A (en) Data query method, server, node and storage medium
CN113347062A (en) SIP performance test method, device, equipment and storage medium
CN110515905B (en) Method, device and server for configuring route
CN117555533B (en) Code generation method, electronic device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination