Data inspection method and device, equipment and medium
Through the automated configuration item data inspection method, the API is used to query configuration item data and generate inspection reports, the problem of low efficiency in configuration item auditing during the production stage is solved, and more efficient data management and problem handling is achieved.
Patent Information
- Application Number
- CN202411271348.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2024-12-06
AI Technical Summary
The data audit of configuration items in the production stage is inefficient, resulting in large labor and time consumption, and manual registration and audits are prone to deviations, traceability and management difficulties.
Provide a data check method, by obtaining the data list of objects to be inspected, using the application program interface (API) to query configuration item data, perform automatic inspections based on the set compliance conditions, generate configuration item check reports, and reduce manual operation errors. And improve transparency.
It greatly shortens the configuration item data inspection time, reduces manual management costs, and the generated reports are more transparent and clear, making it easier to deal with problems in code projects. The configuration item inspection report can be used as a basis for problem backtracking.
Smart Images

Figure CN119088403A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a data checking method, device, equipment and medium. Background Art
[0002] In the employment practice of enterprises, the audit content of configuration item data in the production stage is usually scattered across multiple projects, and the focus of data audit is also scattered across multiple platforms, which requires a lot of manpower and material resources. There are two prominent problems: On the one hand, the audit of configuration item data in the production stage is carried out with the version iteration. The production frequency is high, and different versions of code projects are released at any time and are fully put into production. There are many code projects in production. A physical subsystem may have more than 20 code projects put into production at the same time. Each production may involve more than 50 physical subsystems at most, and there are more than 1,000 code projects that need to be audited. The audit frequency is frequent and the audit content covers a wide range. The code warehouse audit needs to open each warehouse to check whether it is compliant. The business group has more than 1,200 code warehouses, and the audit work is difficult to carry out. Due to manpower and time constraints, the tracking of configuration items is complicated, and it is necessary to constantly trace back problems regularly, resulting in low audit efficiency. On the other hand, the configuration item audit in the production stage uses manual registration of audit problems, which is time-consuming and labor-intensive. Manual operations are prone to deviations and difficult to trace. Statistical analysis takes a lot of time. Each change requires overall adjustment of data, and the work is highly repetitive and difficult to manage.
[0003] Therefore, the related technology lacks a method for improving the efficiency of data auditing. Summary of the invention
[0004] The embodiments of the present application provide a data inspection method, apparatus, device and medium, which are used to solve the problem of low audit inspection efficiency of code engineering configuration item data in the production stage in the related technology.
[0005] In a first aspect, an embodiment of the present application provides a data checking method, the method comprising:
[0006] In response to the received data inspection instruction, obtaining a data list of an object to be inspected; the object to be inspected includes at least one code release process file;
[0007] Based on the uniform resource identifier URL of the application program interface corresponding to each code release process file in the data list, an interface response message corresponding to the code release process file is obtained, and the data content of the interface response message is queried using a query method corresponding to a plurality of configuration items to obtain a plurality of configuration item data to be checked;
[0008] Checking the configuration item data using the set compliance conditions to obtain a check result;
[0009] A configuration item inspection report of the at least one code release process file is generated according to the inspection result, and the configuration item inspection report is output to prompt a user to handle problems displayed in the configuration item inspection report.
[0010] In the embodiment of the present application, a computer language is used to generate an automated tool to mine the configuration item data that needs to be checked, and the configuration item data is checked using the set compliance conditions to obtain the inspection results, which greatly shortens the inspection time of the configuration item data, reduces the manual management cost, and reduces manual operation errors. The generated configuration item inspection report displays the problems more transparently and clearly, and at the same time displays the completion status of the rectification of the code project, which is convenient for users to deal with problems arising in the code project. Moreover, the retention of the configuration item inspection report can be used as a basis for problem backtracking, and the data has a basis to rely on and can be checked.
[0011] In a possible embodiment, the uniform resource identifier URL of the application program interface corresponding to each code release process file in the data list is used to obtain an interface response message corresponding to the code release process file, and a query method corresponding to multiple configuration items is used to query the data content of the interface response message to obtain multiple configuration item data to be checked, including:
[0012] For each code release process file in the data list, perform the following operations respectively:
[0013] Using the baseline identifier of the code publishing process file as the uniform resource identifier URL of the application program interface;
[0014] Based on the uniform resource identifier URL, an interface response message corresponding to the baseline identifier is obtained, and a first temporary variable is generated based on the interface response message; the first temporary variable includes configuration item data associated with the code release process file;
[0015] For multiple configuration items included in the preset template, respectively generate query methods corresponding to the multiple configuration items to obtain multiple query methods;
[0016] Using the multiple query methods, respectively query the configuration item data corresponding to the multiple query methods from the first temporary variable, and write the obtained multiple configuration item data into the first temporary list;
[0017] The first temporary list is segmented and the data format is converted to obtain a plurality of configuration item data to be checked.
[0018] In a possible embodiment, the configuration item data includes code projects, production branches, trunk branches, protection branch settings, code walkthroughs, code library labels, and responsible members of production branches; each code project includes multiple production branches, and the production branches are derived from the trunk branches; the configuration item data is checked using the set compliance conditions, including at least one of the following:
[0019] Determine whether the name format of each production branch complies with the set rules;
[0020] Determine whether the information of each production branch is synchronized to the trunk branch corresponding to the production branch;
[0021] Determine whether each production branch is a protection branch;
[0022] Determine whether there is a corresponding inspection record for each production branch;
[0023] Determine whether the code base label corresponding to each code project complies with the set rules;
[0024] Determine whether the management authority of the responsible member of each production branch complies with the set rules.
[0025] In a possible embodiment, determining whether the name format of each production branch complies with a set rule includes:
[0026] For each production branch, if the name of the production branch includes the first specified field, it is determined that the name format of the production branch complies with the set rule;
[0027] If the name of the production branch does not include the first designated field, it is determined that the format of the production branch does not comply with a set rule.
[0028] In a possible embodiment, the determining whether the information of each production branch is synchronized to the trunk branch corresponding to the production branch includes:
[0029] For each production branch, if the second temporary variable is an empty set, it is determined that the information of the production branch is synchronized to the trunk branch;
[0030] If the second temporary variable is not an empty set, it is determined that the information of the production branch has not been synchronized to the main branch;
[0031] Among them, the second temporary variable is to determine the existence of the main branch corresponding to the production branch, use the production branch and the main branch as the unified resource identifier of the application interface, and based on the unified resource identifier, obtain the interface response message corresponding to the production code branch and the main branch, and generate it based on the interface response message.
[0032] In a possible embodiment, determining whether each production branch is a protection branch includes:
[0033] For each production branch, if the key value of the protected attribute of the third temporary variable is empty, it is determined that the production branch is not a protection branch;
[0034] If the key value of the protected attribute of the third temporary variable is not empty, it is determined that the production branch is a protection branch;
[0035] The third temporary variable is to use the production branch as the uniform resource identifier of the application program interface, obtain the interface response message corresponding to the production branch based on the uniform resource identifier, and generate it based on the interface response message.
[0036] In a possible embodiment, determining whether there is a corresponding walkthrough record for each production branch includes:
[0037] For each production branch, if the fourth temporary variable is an empty set, it is determined that there is no corresponding walkthrough record for the production branch;
[0038] If the fourth temporary variable is not an empty set, it is determined that the production branch has a corresponding walkthrough record;
[0039] The fourth temporary variable uses the production branch as the uniform resource identifier of the application program interface, obtains the interface response message corresponding to the production branch based on the uniform resource identifier, and is generated based on the interface response message.
[0040] In a possible embodiment, if it is determined that a corresponding walkthrough record exists for the production branch, the method further includes:
[0041] For multiple pieces of walkthrough data associated with the code walkthrough situation, respectively generate query methods corresponding to the multiple pieces of walkthrough data to obtain multiple query methods;
[0042] Using the multiple query methods, query the walkthrough data corresponding to the multiple query methods from the fourth temporary variable respectively, and write the obtained multiple walkthrough data into the second temporary list;
[0043] The second temporary list is segmented and the data format is converted to obtain multiple pieces of code walkthrough data associated with the code walkthrough situation; wherein the multiple pieces of code walkthrough data include a walkthrough identifier, a walkthrough creator, a walkthrough branch, and a walkthrough title.
[0044] In a possible embodiment, determining whether the code library label corresponding to each code project complies with regulations includes:
[0045] For each code project, if the third temporary list includes a code library tag corresponding to the code project, determining that the code library tag corresponding to the code project is in the preset list;
[0046] If the third temporary list includes the code library tag corresponding to the code project, determining that the code library tag corresponding to the code project is not in the preset list;
[0047] Among them, the third temporary list uses the code tag corresponding to the code project as the uniform resource identifier of the application interface; based on the uniform resource identifier, obtains the interface response message corresponding to the code tag, and generates a fifth temporary variable based on the interface response message; generates a query method corresponding to the code tag, and uses the query method to obtain it from the fifth temporary variable.
[0048] In a possible embodiment, the determining whether the management authority of the responsible member of each production branch complies with the set rules includes:
[0049] For each production branch, if the fourth temporary list is not an empty set, it is determined that the management authority of the responsible member of the production branch is compliant;
[0050] If the fourth temporary list is an empty set, and the length of the fifth temporary list is greater than the preset length or the fifth temporary list contains the second specified field, it is determined that there is a problem with the management authority of the responsible member of the production branch;
[0051] Among them, the fourth temporary list uses the responsible member of the production branch as the uniform resource identifier of the application interface; based on the uniform resource identifier, the interface response message corresponding to the responsible member of the production branch is obtained, and the sixth temporary variable is generated based on the interface response message; the query method corresponding to the code administrator is generated, and the query method is used to obtain it from the sixth temporary variable; the fifth temporary list is obtained from the sixth temporary variable using the query method after the query method corresponding to the code member is generated.
[0052] In a second aspect, the present application provides a data checking device, the device comprising:
[0053] A data acquisition unit, configured to acquire a data list of an object to be inspected in response to a received data inspection instruction; the object to be inspected includes at least one code release process file;
[0054] A configuration item data extraction unit, configured to obtain an interface response message corresponding to the code release process file based on the uniform resource identifier URL of the application program interface corresponding to each code release process file in the data list, and query the data content of the interface response message using query methods corresponding to multiple configuration items to obtain multiple configuration item data to be checked;
[0055] A data checking unit, used to check the configuration item data using a set compliance condition to obtain a check result;
[0056] The inspection report generating unit is used to generate a configuration item inspection report of the at least one code release process file according to the inspection result, and output the configuration item inspection report to prompt the user to handle the problems displayed in the configuration item inspection report.
[0057] In a possible embodiment, based on the uniform resource identifier URL of the application program interface corresponding to each code release process file in the data list, an interface response message corresponding to the code release process file is obtained, and a query method corresponding to multiple configuration items is used to query the data content of the interface response message to obtain multiple configuration item data to be checked. The configuration item data extraction unit is specifically used to:
[0058] For each code release process file in the data list, perform the following operations respectively:
[0059] Using the baseline identifier of the code publishing process file as the uniform resource identifier URL of the application program interface;
[0060] Based on the uniform resource identifier URL, an interface response message corresponding to the baseline identifier is obtained, and a first temporary variable is generated based on the interface response message; the first temporary variable includes configuration item data associated with the code release process file;
[0061] For multiple configuration items included in the preset template, respectively generate query methods corresponding to the multiple configuration items to obtain multiple query methods;
[0062] Using the multiple query methods, respectively query the configuration item data corresponding to the multiple query methods from the first temporary variable, and write the obtained multiple configuration item data into the first temporary list;
[0063] The first temporary list is segmented and the data format is converted to obtain a plurality of configuration item data to be checked.
[0064] In a possible embodiment, the configuration item data includes code projects, production branches, trunk branches, protection branch settings, code walkthroughs, code library labels, and responsible members of production branches; each code project includes multiple production branches, and the production branches are derived from the trunk branches; the configuration item data is checked using the set compliance conditions, including at least one of the following:
[0065] Determine whether the name format of each production branch complies with the set rules;
[0066] Determine whether the information of each production branch is synchronized to the trunk branch corresponding to the production branch;
[0067] Determine whether each production branch is a protection branch;
[0068] Determine whether there is a corresponding inspection record for each production branch;
[0069] Determine whether the code base label corresponding to each code project complies with the set rules;
[0070] Determine whether the management authority of the responsible member of each production branch complies with the set rules.
[0071] In a possible embodiment, the determining whether the name format of each production branch complies with a set rule, the data checking unit is specifically configured to:
[0072] For each production branch, if the name of the production branch includes the first specified field, it is determined that the name format of the production branch complies with the set rule;
[0073] If the name of the production branch does not include the first designated field, it is determined that the format of the production branch does not comply with a set rule.
[0074] In a possible embodiment, the determining whether the information of each production branch is synchronized to the trunk branch corresponding to the production branch, the data checking unit is specifically used to:
[0075] For each production branch, if the second temporary variable is an empty set, it is determined that the information of the production branch is synchronized to the trunk branch;
[0076] If the second temporary variable is not an empty set, it is determined that the information of the production branch has not been synchronized to the main branch;
[0077] Among them, the second temporary variable is to determine the existence of the main branch corresponding to the production branch, use the production branch and the main branch as the unified resource identifier of the application interface, and based on the unified resource identifier, obtain the interface response message corresponding to the production code branch and the main branch, and generate it based on the interface response message.
[0078] In a possible embodiment, the determining whether each production branch is a protection branch, the data checking unit is specifically used to:
[0079] For each production branch, if the key value of the protected attribute of the third temporary variable is empty, it is determined that the production branch is not a protection branch;
[0080] If the key value of the protected attribute of the third temporary variable is not empty, it is determined that the production branch is a protection branch;
[0081] The third temporary variable is to use the production branch as the uniform resource identifier of the application program interface, obtain the interface response message corresponding to the production branch based on the uniform resource identifier, and generate it based on the interface response message.
[0082] In a possible embodiment, in determining whether there is a corresponding walkthrough record for each production branch, the data checking unit is specifically configured to:
[0083] For each production branch, if the fourth temporary variable is an empty set, it is determined that there is no corresponding walkthrough record for the production branch;
[0084] If the fourth temporary variable is not an empty set, it is determined that the production branch has a corresponding walkthrough record;
[0085] The fourth temporary variable uses the production branch as the uniform resource identifier of the application program interface, obtains the interface response message corresponding to the production branch based on the uniform resource identifier, and is generated based on the interface response message.
[0086] In a possible embodiment, if it is determined that a corresponding walkthrough record exists for the production branch, the device further includes a walkthrough data acquisition unit, which is used to:
[0087] For multiple pieces of walkthrough data associated with the code walkthrough situation, respectively generate query methods corresponding to the multiple pieces of walkthrough data to obtain multiple query methods;
[0088] Using the multiple query methods, query the walkthrough data corresponding to the multiple query methods from the fourth temporary variable respectively, and write the obtained multiple walkthrough data into the second temporary list;
[0089] The second temporary list is segmented and the data format is converted to obtain multiple pieces of code walkthrough data associated with the code walkthrough situation; wherein the multiple pieces of code walkthrough data include a walkthrough identifier, a walkthrough creator, a walkthrough branch, and a walkthrough title.
[0090] In a possible embodiment, the determining whether the code library label corresponding to each code project complies with the regulations, the data checking unit is specifically used to:
[0091] For each code project, if the third temporary list includes a code library tag corresponding to the code project, determining that the code library tag corresponding to the code project is in the preset list;
[0092] If the third temporary list includes the code library tag corresponding to the code project, determining that the code library tag corresponding to the code project is not in the preset list;
[0093] Among them, the third temporary list uses the code tag corresponding to the code project as the uniform resource identifier of the application interface; based on the uniform resource identifier, obtains the interface response message corresponding to the code tag, and generates a fifth temporary variable based on the interface response message; generates a query method corresponding to the code tag, and uses the query method to obtain it from the fifth temporary variable.
[0094] In a possible embodiment, the determination of whether the management authority of the responsible member of each production branch complies with the set rules, the data checking unit is specifically used to:
[0095] For each production branch, if the fourth temporary list is not an empty set, it is determined that the management authority of the responsible member of the production branch is compliant;
[0096] If the fourth temporary list is an empty set, and the length of the fifth temporary list is greater than the preset length or the fifth temporary list contains the second specified field, it is determined that there is a problem with the management authority of the responsible member of the production branch;
[0097] Among them, the fourth temporary list uses the responsible member of the production branch as the uniform resource identifier of the application interface; based on the uniform resource identifier, the interface response message corresponding to the responsible member of the production branch is obtained, and the sixth temporary variable is generated based on the interface response message; the query method corresponding to the code administrator is generated, and the query method is used to obtain it from the sixth temporary variable; the fifth temporary list is obtained from the sixth temporary variable using the query method after the query method corresponding to the code member is generated.
[0098] In a third aspect, the present application provides an electronic device, including:
[0099] A memory for storing program instructions;
[0100] The processor is used to call the program instructions stored in the memory, and execute the steps included in any one of the data checking methods in the first aspect according to the obtained program instructions.
[0101] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes the data checking method described in any one of the first aspects.
[0102] In a fifth aspect, the present application provides a computer program product, comprising: a computer program code, which, when executed on a computer, enables the computer to execute the data checking method described in any one of the first aspects.
[0103] The technical effects brought about by any one of the implementation methods of the second to fifth aspects can refer to the technical effects brought about by the implementation method of the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0104] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technical personnel in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0105] Figure 1 A schematic diagram of an application scenario of a data checking method provided in an embodiment of the present application;
[0106] Figure 2 A flowchart of a data checking method provided in an embodiment of the present application;
[0107] Figure 3 A schematic diagram of the process of step S202 provided in an embodiment of the present application;
[0108] Figure 4 A schematic diagram of a process for obtaining multiple walkthrough data provided in an embodiment of the present application;
[0109] Figure 5 A structural diagram of a data checking device provided in an embodiment of the present application;
[0110] Figure 6 A structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0111] In order to make the purpose, technical scheme and advantages of the present application clearer, the technical scheme in the embodiment of the present application will be clearly and completely described below in conjunction with the drawings in the embodiment of the present application. Obviously, the described embodiment is only a part of the embodiment of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technical personnel in the field without making creative work are within the scope of protection of the present application. In the absence of conflict, the embodiments in the present application and the features in the embodiments can be arbitrarily combined with each other. In addition, although the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in an order different from that here.
[0112] The terms "first" and "second" in the specification and claims of the present application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any of their variations are intended to cover non-exclusive protection. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices. "Multiple" in the present application can mean at least two, for example, two, three or more, and the embodiments of the present application are not limited.
[0113] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description. It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, which should be considered as exemplary, and their purpose is only to illustrate the feasibility of the implementation of the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0114] In the technical solution of this application, the acquisition, transmission, storage, and use of data are in compliance with the requirements of relevant national laws and regulations.
[0115] Before introducing the data checking method provided in the embodiment of the present application, in order to facilitate understanding, the technical background of the embodiment of the present application is first introduced in detail below.
[0116] In the employment practice of enterprises, the audit content of configuration item data in the production stage is usually scattered across multiple projects, and the focus of data audit is also scattered across multiple platforms, which requires a lot of manpower and material resources. There are two prominent problems: On the one hand, the audit of configuration item data in the production stage is carried out with the version iteration. The production frequency is high, and different versions of code projects are released at any time and are fully put into production. There are many code projects in production. A physical subsystem may have more than 20 code projects put into production at the same time. Each production may involve more than 50 physical subsystems at most, and there are more than 1,000 code projects that need to be audited. The audit frequency is frequent and the audit content covers a wide range. The code warehouse audit needs to open each warehouse to check whether it is compliant. The business group has more than 1,200 code warehouses, and the audit work is difficult to carry out. Due to manpower and time constraints, the tracking of configuration items is complicated, and it is necessary to constantly trace back problems regularly, resulting in low audit efficiency. On the other hand, the configuration item audit in the production stage uses manual registration of audit problems, which is time-consuming and labor-intensive. Manual operations are prone to deviations and difficult to trace. Statistical analysis takes a lot of time. Each change requires overall adjustment of data, and the work is highly repetitive and difficult to manage.
[0117] Therefore, the related technology lacks a method for improving the efficiency of data auditing.
[0118] In view of this, the embodiments of the present application provide a data inspection method, apparatus, device and medium for solving the problem of low audit inspection efficiency of code engineering configuration item data in the production stage in the related technology.
[0119] The inventive concept of the present application can be summarized as follows: in an embodiment of the present application, in response to a received data check instruction, a data list of the object to be checked is obtained, the configuration item data to be checked is extracted from the data list, and then the configuration item data is checked using the set compliance conditions to obtain the inspection results, and finally, a configuration item inspection report is generated according to the inspection results, and the configuration item inspection report is output to prompt the user to deal with the problems displayed in the configuration item inspection report.
[0120] Therefore, in the embodiment of the present application, computer language is used to generate an automated tool to mine the configuration item data that needs to be checked, and the configuration item data is checked using the set compliance conditions to obtain the inspection results, which greatly shortens the inspection time of the configuration item data, reduces the manual management cost, and reduces manual operation errors. The generated configuration item inspection report displays the problems more transparently and clearly, and at the same time displays the completion status of the rectification of the code project, which is convenient for users to deal with problems arising in the code project. Moreover, the retention of the configuration item inspection report can be used as a basis for problem backtracking, and the data has a basis to rely on and can be checked.
[0121] After introducing the inventive concept of this application, Figure 1, the application scenarios of the embodiments of the present application are introduced.
[0122] Reference Figure 1 , is an application scenario diagram of a data inspection method provided in an embodiment of the present application. Figure 1 As shown, the scenario includes: a terminal device 110 and a server 120, and the terminal device 110 and the server 120 can communicate with each other through a communication network.
[0123] In an optional implementation, the communication network may be a wired network or a wireless network. Therefore, the terminal device 110 and the server 120 may be directly or indirectly connected via a wired or wireless communication. For example, the terminal device 110 may be indirectly connected to the server 120 via a wireless access point, or the terminal device 110 may be directly connected to the server 120 via the Internet, and this application does not limit this.
[0124] In the embodiment of the present application, the terminal device 110 includes but is not limited to mobile phones, tablet computers, laptop computers, desktop computers, e-book readers, intelligent voice interaction devices, smart home appliances, car terminals and other devices.
[0125] The server 120 is a background server corresponding to the terminal device 110. The server 120 may be an independent physical server, or a server cluster or 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 delivery networks (CDNs), and big data and artificial intelligence platforms.
[0126] It should be noted that the data checking method in the embodiment of the present application can be deployed in an electronic device, which may be a server or a terminal device.
[0127] The server can be Figure 1 The server 120 shown in FIG. Figure 1 The terminal device may be other servers other than the server 120 shown in FIG. Figure 1 The terminal device 110 shown in FIG. Figure 1 Other terminal devices other than the terminal device 110 shown in FIG.
[0128] Figure 1 The figure is only an example. In fact, the number of terminal devices 110 and servers 120 is not limited and is not specifically limited in the embodiments of the present application.
[0129] In the embodiment of the present application, when there are multiple servers 120, the multiple servers 120 can form a blockchain, and the server 120 is a node on the blockchain; as in the data inspection method disclosed in the embodiment of the present application, the data list of the object to be inspected, the configuration item data to be inspected, etc. involved can be saved on the blockchain.
[0130] Based on the above application scenarios, the data inspection method provided by the exemplary embodiment of the present application is described below in combination with the application scenarios described above according to the accompanying drawings. It should be noted that the above application scenarios are only shown to facilitate understanding of the spirit and principles of the present application, and the implementation methods of the present application are not limited in this regard.
[0131] refer to Figure 2 , Figure 2 A data checking method in an embodiment of the present application is exemplarily provided, and the method can be executed by an electronic device, comprising the following steps:
[0132] Step S201, in response to the received data inspection instruction, obtain a data list of the object to be inspected; the object to be inspected includes at least one code release process file. The code release process includes multiple stages such as planning (Plan), development (Development), building and packaging (Build & Package), testing (Test), and release (Release). The file containing the above stages is the code release process file.
[0133] In a possible embodiment, the data list of the object to be inspected may be "xx production point production details list.xlsx", as shown in the following table:
[0134]
[0135] Among them, the above table shows the basic data of the object to be inspected, which includes the following fields: commissioning baseline ID, commissioning point, commissioning type, physical subsystem, system unit, baseline plan status, and commissioning method.
[0136] Baseline ID: refers to the production process work order number.
[0137] Production deployment time: production deployment time.
[0138] Production type: includes production on a version date (a scheduled version calendar production point) and production on a non-version date (a non-scheduled version point).
[0139] Physical Subsystem: The name of the system that is put into production.
[0140] System affiliated unit: The system belongs to the business group or center.
[0141] Production method: refers to the production package production method, which is generally divided into product warehouse production, assembly line production, and non-assembly line production.
[0142] It should be noted that the data list of the object to be inspected is not limited to the multiple data in the above table, and the embodiment of the present application does not impose any restrictions on this.
[0143] Step S202, based on the uniform resource identifier URL of the application program interface corresponding to each code release process file in the data list, obtain the interface response message corresponding to the code release process file, and use the query method corresponding to multiple configuration items to query the data content of the interface response message to obtain multiple configuration item data to be checked.
[0144] In a possible embodiment, in step S202, based on the uniform resource identifier URL of the application program interface corresponding to each code release process file in the data list, an interface response message corresponding to the code release process file is obtained, and a query method corresponding to multiple configuration items is used to query the data content of the interface response message to obtain multiple configuration item data to be checked. The process is as follows: Figure 3 As shown, it can be implemented as:
[0145] For each code release process file in the data list, perform the following operations respectively:
[0146] Step S301: Use the baseline identifier of the code publishing process file as the uniform resource identifier URL of the application program interface.
[0147] Step S302, based on the uniform resource identifier URL, obtain an interface response message corresponding to the baseline identifier, and generate a first temporary variable based on the interface response message; the first temporary variable includes configuration item data associated with the code release process file.
[0148] Step S303: for the multiple configuration items included in the preset template, query methods corresponding to the multiple configuration items are generated respectively to obtain multiple query methods.
[0149] Step S304: Query the configuration item data corresponding to the multiple query methods from the first temporary variable using the multiple query methods respectively, and write the obtained multiple configuration item data into the first temporary list.
[0150] Step S305 , segmenting and converting the data format of the first temporary list to obtain a plurality of configuration item data to be checked.
[0151] In a possible embodiment, the embodiment of the present application can use Python's openpynxl, requests, datetime and other methods to call the system API to obtain an interface response message, and parse the message json data to mine the configuration item data. The configuration item data includes the physical subsystem information, code project name, production branch, trunk branch, code walkthrough, code walkthrough trace, responsible member of the production branch (administrator information), protection branch setting, code library tag Tag, etc. Code engineering refers to a set of codes that are layered and modularized according to a certain logic and organization method to improve the readability, maintainability and scalability of the code. Each code project includes multiple production branches. The production branch is the process of merging the developed code from the development branch to the main branch and deploying it to the formal environment.
[0152] For example, taking the acquisition of the three configuration item data of code engineering, production branch and tag as an example, based on the preset template "Production Point Audit List Template.xlsx", each column of the template is the configuration item data that needs to be obtained, take the data list of the object to be checked (xx Production Point Production Details List.xlsx") Column A data (baseline ID) as the uniform resource identifier URL of the application program interface API, use the request get method to obtain the interface response message corresponding to the baseline ID, parse the message json content as the first temporary variable test to be stored for use; then, generate multiple query methods corresponding to the configuration items, such as coderpro_is, branch_na me_list, tag_is method, use the query method to traverse the first temporary variable test to obtain code engineering information, production branch information and tag information, and write them into the first temporary list coderpro_name_List, branch_name_List, tag_name_List; finally, since the data in the above list cannot be written directly into the table, the embodiment of the present application splits the first temporary list coderpro_name_List, branch_name_List, tag_name_List and converts the data format to obtain code engineering, production branch information and tag information.
[0153] It should be added that the embodiment of the present application can write basic data such as baseline plan ID, production type, production time, associated physical subsystem, production method, production status, etc. into the 'A-F' column of the data audit table, write the system abbreviation into the 'G' column, and write the newly acquired configuration item data such as the belonging physical subsystem, code project name, branch name, tag name, etc. into the "HU" column of the data audit table to obtain the "Production Point Audit List Detail Table.xlsx".
[0154] It should be added that in the above-mentioned "Production Point Audit Checklist Template.xlsx", the associated physical subsystem in column D is the physical subsystem of the baseline plan, which is used to determine the product group to which the baseline plan belongs. Since the same code project may be shared by multiple physical subsystems, it is necessary to clarify the relationship between the belonging physical subsystem and the associated physical subsystem. The associated physical subsystem here is actually the production physical subsystem, which may be inconsistent with the physical subsystem to which the code project belongs that needs to be obtained later. Because the physical subsystem to which the code project belongs needs to be used as the interface call path, it is necessary to parse the abbreviation of the physical subsystem of the code project in the baseline plan, and split baselineSys (associated physical subsystem) according to the "()" brackets to obtain a temporary list list. The value of list[0] is used as baselineSysJ (abbreviation of the associated physical subsystem). Because the name of the physical subsystem will be revised periodically, but the abbreviation will not change, it is more stable to use the abbreviation of the physical subsystem to determine the system belonging team in the embodiment of the present application.
[0155] Among them, the configuration item data in the embodiment of the present application can be set according to actual needs, and the embodiment of the present application does not limit this.
[0156] Step S203: Check the configuration item data using the set compliance conditions to obtain a check result.
[0157] In a possible embodiment, after obtaining the configuration item data, the embodiment of the present application uses a set compliance condition to check the configuration item data, including at least one of the following:
[0158] Determine whether the name format of each production branch complies with the set rules;
[0159] Determine whether the information of each production branch is synchronized to the trunk branch corresponding to the production branch;
[0160] Determine whether each production branch is a protection branch;
[0161] Determine whether there is a corresponding inspection record for each production branch;
[0162] Determine whether the code base label corresponding to each code project complies with the set rules;
[0163] Determine whether the management authority of the responsible member of each production branch complies with the set rules.
[0164] In a possible embodiment, judging whether the name format of each production branch complies with the set rules may be implemented as follows:
[0165] For each production branch, if the name of the production branch includes the first specified field, it is determined that the name format of the production branch complies with the set rule;
[0166] If the name of the production branch does not include the first designated field, it is determined that the format of the production branch does not comply with the set rule.
[0167] For example, the set rule requires that a production branch be created with "release-production point". A production branch name that is not in this format is considered non-compliant. Determine whether the release field is in the name of the production branch. If the name of the production branch contains release, the name format of the production branch complies with the set rules, and the result is returned as "yes". If the name of the production branch does not contain release, the format of the production branch does not comply with the set rules, and the result is returned as "no". The result is written into column K (whether the use of the production branch is compliant) in the "Production Point Audit List Detail Table.xlsx".
[0168] In a possible embodiment, determining whether the information of each production branch is synchronized to the trunk branch corresponding to the production branch may be implemented as follows:
[0169] For each production branch, if the second temporary variable is an empty set, it is determined that the information of the production branch is synchronized to the trunk branch;
[0170] If the second temporary variable is not an empty set, it is determined that the information of the production branch has not been synchronized to the main branch;
[0171] Among them, the second temporary variable is to determine the existence of the main branch corresponding to the production branch, use the production branch and the main branch as the unified resource identifier of the application interface, and based on the unified resource identifier, obtain the interface response message corresponding to the production code branch and the main branch, which is generated based on the interface response message.
[0172] For example, the content of the production branch needs to be synchronized to the master trunk branch. First, determine whether the master trunk branch corresponding to the production branch exists. If it does not exist, directly return "Inconsistent, please complete master balancing" and write it into the "Production Point Audit List Detail Table.xlsx". If it exists, the production branch and the trunk branch are used as the unified resource identifier of the application interface. Based on the unified resource identifier, the get method of request is used to obtain the interface response message, and the interface response message is parsed and stored in the second temporary variable test_merge. If the second temporary variable is an empty set, it is determined that the information of the production branch is synchronized to the trunk branch, and the result "Consistent, master balancing has been completed" is returned. If the second temporary variable is not an empty set, it is determined that the information of the production branch is not synchronized to the trunk branch, and the result "Inconsistent, please complete master balancing" is returned, and the return value is written to the "Production Point Audit List Detail Table.xlsx".
[0173] In a possible embodiment, determining whether each production branch is a protection branch may be implemented as follows:
[0174] For each production branch, if the key value of the protected attribute of the third temporary variable is empty, it is determined that the production branch is not a protection branch;
[0175] If the key value of the protected attribute of the third temporary variable is not empty, it is determined that the production branch is a protection branch;
[0176] Among them, the third temporary variable uses the production branch as the unified resource identifier of the application program interface, obtains the interface response message corresponding to the production branch based on the unified resource identifier, and is generated based on the interface response message.
[0177] For example, the preset rules require that all production branches need to be set as protection branches. The production branch serves as the uniform resource identifier of the application program interface, that is, req_ProBranch_Url is set as the URL of the api. Based on the uniform resource identifier, the interface response message corresponding to the production branch is obtained, and a third temporary variable is generated based on the interface response message, that is, the json content of the interface response message is obtained by using the get method of request, and written into the third temporary variable test_branch. If the key value of the protected attribute of test_branch is not an empty set, it is determined that the production branch is a protection branch, and the result is "yes". If the key value of the protected attribute of test_branch is an empty set, it is determined that the production branch is not a protection branch, and the result is "no". Finally, the result is written to the "Production Point Audit List Detail Table.xlsx".
[0178] In a possible embodiment, determining whether there is a corresponding walkthrough record for each production branch may be implemented as follows:
[0179] For each production branch, if the fourth temporary variable is an empty set, it is determined that there is no corresponding walkthrough record for the production branch;
[0180] If the fourth temporary variable is not an empty set, it is determined that the production branch has a corresponding walkthrough record;
[0181] Among them, the fourth temporary variable uses the production branch as the unified resource identifier of the application program interface, obtains the interface response message corresponding to the production branch based on the unified resource identifier, and is generated based on the interface response message.
[0182] For example, the production branch is used as the uniform resource identifier of the application program interface, that is, req_Merge_Url is set as the URL of the API, where Git_Url is the warehouse address, project_owner is the physical subsystem to which it belongs, and project_Name is the code project name. The parameter access_token is set as the interface call authorization, and the branch name is used as the branch target base value to be tested; based on the uniform resource identifier, the interface response message corresponding to the production branch is obtained, and a fourth temporary variable is generated based on the interface response message, that is, the json content of the interface response message is obtained by using the get method of request and written into the fourth temporary variable test_merge. If test_merge is not an empty set, it is determined that the production branch has a corresponding walkthrough record. If test_merge is an empty set, it is determined that the production branch does not have a corresponding walkthrough record.
[0183] In a possible embodiment, if it is determined that there is a corresponding inspection record for the production branch, the embodiment of the present application will also obtain multiple inspection data, and the process is as follows: Figure 4 As shown, it can be implemented as:
[0184] Step S401 : for multiple pieces of code review data associated with the code review situation, respectively generate query methods corresponding to the multiple pieces of code review data to obtain multiple query methods.
[0185] Step S402: Query the scan data corresponding to the multiple query methods from the fourth temporary variable using the multiple query methods respectively, and write the obtained multiple scan data into the second temporary list.
[0186] Step S403, the second temporary list is segmented and the data format is converted to obtain multiple pieces of code walkthrough data associated with the code walkthrough situation; wherein the multiple pieces of code walkthrough data include a walkthrough identifier, a walkthrough creator, a walkthrough branch, and a walkthrough title.
[0187] For example, the query methods for multiple walkthrough data are as follows: is_in_Mergenum, is_in_Mergecreate, is_in_Mergebranch, and is_in_Mergetitle, which are used to query the walkthrough id, the walkthrough initiator, the walkthrough branch source information, and the walkthrough title, respectively. The fourth temporary variable is test_merge. Multiple query methods are used to query the walkthrough data corresponding to the multiple query methods from the fourth temporary variable, that is, number in test_merge[p] is the walkthrough number, the label value under head of test_merge[p] is the walkthrough branch source, name under user under test_merge[p] is the walkthrough initiator, and title under test_merge[p] is the walkthrough title name, where p takes values within the range of len(test_merge) and starts from 0; the searched data are written into the second temporary lists zoucha_id, create_name, create_branch, and title_name, respectively, and the second temporary lists are segmented and the data format is converted to obtain the walkthrough data. It should be added that the embodiments of the present application can also obtain the trace content according to a method similar to the above, which will not be repeated here.
[0188] In a possible embodiment, judging whether the code base label corresponding to each code project complies with the regulations may be implemented as follows:
[0189] For each code project, if the third temporary list includes a code library tag corresponding to the code project, determining that the code library tag corresponding to the code project is in the preset list;
[0190] If the third temporary list includes the code library tag corresponding to the code project, determining that the code library tag corresponding to the code project is not in the preset list;
[0191] Among them, the third temporary list uses the code tag corresponding to the code project as the uniform resource identifier of the application interface; based on the uniform resource identifier, obtains the interface response message corresponding to the code tag, and generates the fifth temporary variable based on the interface response message; generates the query method corresponding to the code tag, and obtains it from the fifth temporary variable using the query method.
[0192] For example, set req_ProTag_Url as the URL of the API, use the get method of request to obtain the json information of the interface response message and write it into the fifth temporary variable test_pro_tag, generate the query method is_in_Tag method corresponding to the code tag, parse all the tag names in the code warehouse, write the tag name into the third temporary list member_Tag_list, and determine whether the code library tag project_Tag corresponding to the code project is in the list. If so, return the result "yes", otherwise return the result "no", and finally write the result into "Production Point Audit List Detail Table.xlsx".
[0193] In a possible embodiment, judging whether the management authority of the responsible member of each production branch complies with the set rules may be implemented as follows:
[0194] For each production branch, if the fourth temporary list is not an empty set, it is determined that the management authority of the responsible member of the production branch is compliant;
[0195] If the fourth temporary list is an empty set, and the length of the fifth temporary list is greater than the preset length or the fifth temporary list contains the second specified field, it is determined that there is a problem with the management authority of the responsible member of the production branch;
[0196] Among them, the fourth temporary list uses the responsible member of the production branch as the unified resource identifier of the application interface; based on the unified resource identifier, the interface response message corresponding to the responsible member of the production branch is obtained, and the sixth temporary variable is generated based on the interface response message; the query method corresponding to the code administrator is generated, and the query method is used to obtain it from the sixth temporary variable; the fifth temporary list is obtained from the sixth temporary variable using the query method after the query method corresponding to the code member is generated.
[0197] For example, set req__ProMember_url as the URL information of the API, set the role parameter to admin, get the json information of the interface response message and write it into the sixth temporary variable test_pro_member, generate the query method is_in_Admin method corresponding to the code administrator, use is_in_Admin to find the administrator of the production branch, and write it into the fourth temporary list member_Admin_list; write the query method is_in_pro method corresponding to the generated code member, use the is_in_pro method to find the ordinary members of the production branch, and write them into the fifth temporary list memberlist. If "cancelled" appears in the fifth temporary list, return the result "pending rectification". If the length of the fifth temporary list member_Admin_list exceeds 5, return the result "pending rectification". Otherwise, return the result "no problem". Finally, write the result into "Production Point Audit List Detail Sheet.xlsx".
[0198] Step S204: Generate a configuration item inspection report for at least one code release process file according to the inspection result, and output the configuration item inspection report to prompt the user to handle the problems displayed in the configuration item inspection report.
[0199] For example, the data in "Audit List of Production Points.xlsx" is used as the basic data of the configuration item inspection report, and statistical analysis is performed on the problem status of the configuration items. It is displayed according to the team dimension, and the production audit work of each team is compared horizontally. The conutifs function is mainly used to perform statistical analysis on the data in "Audit List of Production Points.xlsx". According to the team dimension, the number of team appearances and the number of "no" are counted, and the production version time and other data are added to form a configuration item inspection report. The specific configuration item inspection report example is as follows:
[0200]
[0201]
[0202] The above inspection report is a report related to the overall code compliance review, including information such as the branch compliance ratio and the protection branch setting ratio.
[0203] Based on the foregoing description, in the embodiment of the present application, a computer language is used to generate an automated tool to mine the configuration item data that needs to be checked, and the configuration item data is checked using the set compliance conditions to obtain the inspection results, which greatly shortens the inspection time of the configuration item data, reduces the manual management cost, and reduces manual operation errors. The generated configuration item inspection report displays the problems more transparently and clearly, and at the same time displays the completion status of the rectification of the code project, which is convenient for users to deal with problems arising in the code project, and the retention of the configuration item inspection report can be used as a basis for problem backtracking, and the data has a basis to rely on and can be checked.
[0204] Based on the same inventive concept, the present application embodiment provides a data checking device, please refer to Figure 5 The device comprises: a data acquisition unit 501, a configuration item data extraction unit 502, a data inspection unit 503 and an inspection report generation unit 504, wherein:
[0205] The data acquisition unit 501 is used to acquire a data list of an object to be checked in response to a received data check instruction; the object to be checked includes at least one code release process file;
[0206] The configuration item data extraction unit 502 is used to obtain the interface response message corresponding to the code release process file based on the uniform resource identifier URL of the application program interface corresponding to each code release process file in the data list, and use the query method corresponding to multiple configuration items to query the data content of the interface response message to obtain multiple configuration item data to be checked;
[0207] The data checking unit 503 is used to check the configuration item data using the set compliance conditions to obtain a check result;
[0208] The inspection report generating unit 504 is used to generate a configuration item inspection report of the at least one code release process file according to the inspection result, and output the configuration item inspection report to prompt the user to handle the problems displayed in the configuration item inspection report.
[0209] In a possible embodiment, based on the uniform resource identifier URL of the application program interface corresponding to each code release process file in the data list, an interface response message corresponding to the code release process file is obtained, and a query method corresponding to multiple configuration items is used to query the data content of the interface response message to obtain multiple configuration item data to be checked. The configuration item data extraction unit 502 is specifically used to:
[0210] For each code release process file in the data list, perform the following operations respectively:
[0211] Using the baseline identifier of the code publishing process file as the uniform resource identifier URL of the application program interface;
[0212] Based on the uniform resource identifier URL, an interface response message corresponding to the baseline identifier is obtained, and a first temporary variable is generated based on the interface response message; the first temporary variable includes configuration item data associated with the code release process file;
[0213] For multiple configuration items included in the preset template, respectively generate query methods corresponding to the multiple configuration items to obtain multiple query methods;
[0214] Using the multiple query methods, respectively query the configuration item data corresponding to the multiple query methods from the first temporary variable, and write the obtained multiple configuration item data into the first temporary list;
[0215] The first temporary list is segmented and the data format is converted to obtain a plurality of configuration item data to be checked.
[0216] In a possible embodiment, the configuration item data includes code projects, production branches, trunk branches, protection branch settings, code walkthroughs, code library labels, and responsible members of production branches; each code project includes multiple production branches, and the production branches are derived from the trunk branches; the configuration item data is checked using the set compliance conditions, including at least one of the following:
[0217] Determine whether the name format of each production branch complies with the set rules;
[0218] Determine whether the information of each production branch is synchronized to the trunk branch corresponding to the production branch;
[0219] Determine whether each production branch is a protection branch;
[0220] Determine whether there is a corresponding inspection record for each production branch;
[0221] Determine whether the code base label corresponding to each code project complies with the set rules;
[0222] Determine whether the management authority of the responsible member of each production branch complies with the set rules.
[0223] In a possible embodiment, the determining whether the name format of each production branch complies with a set rule, the data checking unit 503 is specifically configured to:
[0224] For each production branch, if the name of the production branch includes the first specified field, it is determined that the name format of the production branch complies with the set rule;
[0225] If the name of the production branch does not include the first designated field, it is determined that the format of the production branch does not comply with a set rule.
[0226] In a possible embodiment, the determining whether the information of each production branch is synchronized to the trunk branch corresponding to the production branch, the data checking unit 503 is specifically used to:
[0227] For each production branch, if the second temporary variable is an empty set, it is determined that the information of the production branch is synchronized to the trunk branch;
[0228] If the second temporary variable is not an empty set, it is determined that the information of the production branch has not been synchronized to the main branch;
[0229] Among them, the second temporary variable is to determine the existence of the main branch corresponding to the production branch, use the production branch and the main branch as the unified resource identifier of the application interface, and based on the unified resource identifier, obtain the interface response message corresponding to the production code branch and the main branch, and generate it based on the interface response message.
[0230] In a possible embodiment, in determining whether each production branch is a protection branch, the data checking unit 503 is specifically configured to:
[0231] For each production branch, if the key value of the protected attribute of the third temporary variable is empty, it is determined that the production branch is not a protection branch;
[0232] If the key value of the protected attribute of the third temporary variable is not empty, it is determined that the production branch is a protection branch;
[0233] The third temporary variable is to use the production branch as the uniform resource identifier of the application program interface, obtain the interface response message corresponding to the production branch based on the uniform resource identifier, and generate it based on the interface response message.
[0234] In a possible embodiment, the determining whether there is a corresponding walkthrough record for each production branch, the data checking unit 503 is specifically used to:
[0235] For each production branch, if the fourth temporary variable is an empty set, it is determined that there is no corresponding walkthrough record for the production branch;
[0236] If the fourth temporary variable is not an empty set, it is determined that the production branch has a corresponding walkthrough record;
[0237] The fourth temporary variable uses the production branch as the uniform resource identifier of the application program interface, obtains the interface response message corresponding to the production branch based on the uniform resource identifier, and is generated based on the interface response message.
[0238] In a possible embodiment, if it is determined that a corresponding walkthrough record exists for the production branch, the device further includes a walkthrough data acquisition unit, which is used to:
[0239] For multiple pieces of walkthrough data associated with the code walkthrough situation, respectively generate query methods corresponding to the multiple pieces of walkthrough data to obtain multiple query methods;
[0240] Using the multiple query methods, query the walkthrough data corresponding to the multiple query methods from the fourth temporary variable respectively, and write the obtained multiple walkthrough data into the second temporary list;
[0241] The second temporary list is segmented and the data format is converted to obtain multiple pieces of code walkthrough data associated with the code walkthrough situation; wherein the multiple pieces of code walkthrough data include a walkthrough identifier, a walkthrough creator, a walkthrough branch, and a walkthrough title.
[0242] In a possible embodiment, the determining whether the code library tag corresponding to each code project complies with the regulations, the data checking unit 503 is specifically used to:
[0243] For each code project, if the third temporary list includes a code library tag corresponding to the code project, determining that the code library tag corresponding to the code project is in the preset list;
[0244] If the third temporary list includes the code library tag corresponding to the code project, determining that the code library tag corresponding to the code project is not in the preset list;
[0245] Among them, the third temporary list uses the code tag corresponding to the code project as the uniform resource identifier of the application interface; based on the uniform resource identifier, obtains the interface response message corresponding to the code tag, and generates a fifth temporary variable based on the interface response message; generates a query method corresponding to the code tag, and uses the query method to obtain it from the fifth temporary variable.
[0246] In a possible embodiment, the determination of whether the management authority of the responsible member of each production branch complies with the set rules, the data checking unit 503 is specifically used to:
[0247] For each production branch, if the fourth temporary list is not an empty set, it is determined that the management authority of the responsible member of the production branch is compliant;
[0248] If the fourth temporary list is an empty set, and the length of the fifth temporary list is greater than the preset length or the fifth temporary list contains the second specified field, it is determined that there is a problem with the management authority of the responsible member of the production branch;
[0249] Among them, the fourth temporary list uses the responsible member of the production branch as the uniform resource identifier of the application interface; based on the uniform resource identifier, the interface response message corresponding to the responsible member of the production branch is obtained, and the sixth temporary variable is generated based on the interface response message; the query method corresponding to the code administrator is generated, and the query method is used to obtain it from the sixth temporary variable; the fifth temporary list is obtained from the sixth temporary variable using the query method after the query method corresponding to the code member is generated.
[0250] The data checking device provided in the embodiment of the present application has the same beneficial effects as the data checking method in the above embodiment, which will not be described one by one here.
[0251] After introducing the data checking method and the data checking device according to the exemplary embodiments of the present application, next, an electronic device provided according to an embodiment of the present application is introduced.
[0252] Based on the same inventive concept, the present application embodiment provides an electronic device, which can implement the functions of the data checking method discussed above. Please refer to Figure 6 , the device includes a processor 601 and a memory 602.
[0253] The processor 601 may include one or more central processing units (CPU) or a digital processing unit, etc. The processor 601 is used to implement the data checking method in the above embodiment when calling the computer program stored in the memory 602 .
[0254] The memory 602 is used to store computer programs executed by the processor 601. The memory 602 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and programs required for running the instant messaging function, etc.; the data storage area may store various instant messaging information and operation instruction sets, etc.
[0255] The memory 602 may be a volatile memory, such as a random-access memory (RAM); the memory 602 may also be a non-volatile memory, such as a read-only memory, a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), or the memory 602 may be any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 602 may be a combination of the above memories.
[0256] Based on the same inventive concept, the embodiment of the present application provides a computer-readable storage medium, and the computer program product includes: computer program code, when the computer program code is run on a computer, the computer executes any of the data checking methods discussed above. Since the principle of solving the problem by the above-mentioned computer-readable storage medium is similar to that of the data checking method, the implementation of the above-mentioned computer-readable storage medium can refer to the implementation of the method, and the repeated parts will not be repeated.
[0257] Based on the same inventive concept, the embodiment of the present application also provides a computer program product, which includes: computer program code, when the computer program code is run on a computer, the computer executes any of the data checking methods discussed above. Since the principle of solving the problem by the above computer program product is similar to that of the data checking method, the implementation of the above computer program product can refer to the implementation of the method, and the repeated parts will not be repeated.
[0258] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0259] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0260] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0261] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of user-operated steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0262] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A data checking method, characterized in that: The method comprises: In response to the received data inspection instruction, obtaining a data list of an object to be inspected; the object to be inspected includes at least one code release process file; Based on the uniform resource identifier URL of the application program interface corresponding to each code release process file in the data list, an interface response message corresponding to the code release process file is obtained, and the data content of the interface response message is queried using a query method corresponding to a plurality of configuration items to obtain a plurality of configuration item data to be checked; Checking the configuration item data using the set compliance conditions to obtain a check result; A configuration item inspection report of the at least one code release process file is generated according to the inspection result, and the configuration item inspection report is output to prompt a user to handle problems displayed in the configuration item inspection report.
2. The method according to claim 1, characterized in that: The uniform resource identifier URL of the application program interface corresponding to each code release process file in the data list is used to obtain an interface response message corresponding to the code release process file, and a query method corresponding to multiple configuration items is used to query the data content of the interface response message to obtain multiple configuration item data to be checked, including: For each code release process file in the data list, perform the following operations respectively: Using the baseline identifier of the code publishing process file as the uniform resource identifier URL of the application program interface; Based on the uniform resource identifier URL, an interface response message corresponding to the baseline identifier is obtained, and a first temporary variable is generated based on the interface response message; the first temporary variable includes configuration item data associated with the code release process file; For multiple configuration items included in the preset template, respectively generate query methods corresponding to the multiple configuration items to obtain multiple query methods; Using the multiple query methods, respectively query the configuration item data corresponding to the multiple query methods from the first temporary variable, and write the obtained multiple configuration item data into the first temporary list; The first temporary list is segmented and the data format is converted to obtain a plurality of configuration item data to be checked.
3. The method according to claim 1, characterized in that The configuration item data includes code projects, production branches, trunk branches, protection branch settings, code walkthroughs, code library labels, and responsible members of production branches; each code project includes multiple production branches, and the production branches are derived from the trunk branches; the configuration item data is checked using the set compliance conditions, including at least one of the following: Determine whether the name format of each production branch complies with the set rules; Determine whether the information of each production branch is synchronized to the trunk branch corresponding to the production branch; Determine whether each production branch is a protection branch; Determine whether there is a corresponding inspection record for each production branch; Determine whether the code base label corresponding to each code project complies with the set rules; Determine whether the management authority of the responsible member of each production branch complies with the set rules.
4. The method according to claim 3, characterized in that The step of judging whether the name format of each production branch complies with the set rules includes: For each production branch, if the name of the production branch includes the first specified field, it is determined that the name format of the production branch complies with the set rule; If the name of the production branch does not include the first designated field, it is determined that the format of the production branch does not comply with a set rule.
5. The method according to claim 3, characterized in that: The determining whether the information of each production branch is synchronized to the trunk branch corresponding to the production branch includes: For each production branch, if the second temporary variable is an empty set, it is determined that the information of the production branch is synchronized to the trunk branch; If the second temporary variable is not an empty set, it is determined that the information of the production branch has not been synchronized to the main branch; Among them, the second temporary variable is to determine the existence of the main branch corresponding to the production branch, use the production branch and the main branch as the unified resource identifier of the application interface, and based on the unified resource identifier, obtain the interface response message corresponding to the production code branch and the main branch, and generate it based on the interface response message.
6. The method according to claim 3, characterized in that The step of judging whether each production branch is a protection branch includes: For each production branch, if the key value of the protected attribute of the third temporary variable is empty, it is determined that the production branch is not a protection branch; If the key value of the protected attribute of the third temporary variable is not empty, it is determined that the production branch is a protection branch; The third temporary variable is to use the production branch as the uniform resource identifier of the application program interface, obtain the interface response message corresponding to the production branch based on the uniform resource identifier, and generate it based on the interface response message.
7. The method according to claim 3, characterized in that The step of determining whether there is a corresponding inspection record for each production branch includes: For each production branch, if the fourth temporary variable is an empty set, it is determined that there is no corresponding walkthrough record for the production branch; If the fourth temporary variable is not an empty set, it is determined that the production branch has a corresponding walkthrough record; The fourth temporary variable uses the production branch as the uniform resource identifier of the application program interface, obtains the interface response message corresponding to the production branch based on the uniform resource identifier, and is generated based on the interface response message.
8. The method according to claim 7, characterized in that If it is determined that a corresponding inspection record exists for the production branch, the method further includes: For multiple pieces of walkthrough data associated with the code walkthrough situation, respectively generate query methods corresponding to the multiple pieces of walkthrough data to obtain multiple query methods; Using the multiple query methods, query the walkthrough data corresponding to the multiple query methods from the fourth temporary variable respectively, and write the obtained multiple walkthrough data into the second temporary list; The second temporary list is segmented and the data format is converted to obtain multiple pieces of code walkthrough data associated with the code walkthrough situation; wherein the multiple pieces of code walkthrough data include a walkthrough identifier, a walkthrough creator, a walkthrough branch, and a walkthrough title.
9. The method according to claim 3, characterized in that: The step of judging whether the code base label corresponding to each code project complies with the regulations includes: For each code project, if the third temporary list includes a code library tag corresponding to the code project, determining that the code library tag corresponding to the code project is in the preset list; If the third temporary list includes the code library tag corresponding to the code project, determining that the code library tag corresponding to the code project is not in the preset list; Among them, the third temporary list uses the code tag corresponding to the code project as the uniform resource identifier of the application interface; based on the uniform resource identifier, obtains the interface response message corresponding to the code tag, and generates a fifth temporary variable based on the interface response message; generates a query method corresponding to the code tag, and uses the query method to obtain it from the fifth temporary variable.
10. The method according to claim 3, characterized in that The determination of whether the management authority of the responsible member of each production branch complies with the set rules includes: For each production branch, if the fourth temporary list is not an empty set, it is determined that the management authority of the responsible member of the production branch is compliant; If the fourth temporary list is an empty set, and the length of the fifth temporary list is greater than the preset length or the fifth temporary list contains the second specified field, it is determined that there is a problem with the management authority of the responsible member of the production branch; Among them, the fourth temporary list uses the responsible member of the production branch as the uniform resource identifier of the application interface; based on the uniform resource identifier, the interface response message corresponding to the responsible member of the production branch is obtained, and the sixth temporary variable is generated based on the interface response message; the query method corresponding to the code administrator is generated, and the query method is used to obtain it from the sixth temporary variable; the fifth temporary list is obtained from the sixth temporary variable using the query method after the query method corresponding to the code member is generated.
11. A data checking device, characterized in that: The device comprises: A data acquisition unit, configured to acquire a data list of an object to be checked in response to a received data check instruction; the object to be checked includes at least one code release process file; A configuration item data extraction unit, configured to obtain an interface response message corresponding to the code release process file based on the uniform resource identifier URL of the application program interface corresponding to each code release process file in the data list, and query the data content of the interface response message using query methods corresponding to multiple configuration items to obtain multiple configuration item data to be checked; A data checking unit, used to check the configuration item data using a set compliance condition to obtain a check result; The inspection report generating unit is used to generate a configuration item inspection report of the at least one code release process file according to the inspection result, and output the configuration item inspection report to prompt the user to handle the problems displayed in the configuration item inspection report.
12. An electronic device, characterized in that: include: A memory for storing program instructions; A processor is used to call the program instructions stored in the memory, and execute the data checking method according to any one of claims 1 to 10 according to the obtained program instructions.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes the data checking method according to any one of claims 1 to 10.
14. A computer program product, characterized in that The computer program product comprises: a computer program code, and when the computer program code is run on a computer, the computer is enabled to execute the data checking method according to any one of claims 1 to 10.
