WO2020147432A1 - 代码检测方法、装置、计算机设备及存储介质 - Google Patents
代码检测方法、装置、计算机设备及存储介质 Download PDFInfo
- Publication number
- WO2020147432A1 WO2020147432A1 PCT/CN2019/121516 CN2019121516W WO2020147432A1 WO 2020147432 A1 WO2020147432 A1 WO 2020147432A1 CN 2019121516 W CN2019121516 W CN 2019121516W WO 2020147432 A1 WO2020147432 A1 WO 2020147432A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- evaluation
- code
- data
- comparison
- chart
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
Definitions
- This application relates to the field of computer technology, and in particular to a code detection method, device, computer equipment, and storage medium.
- the computer application is built on the basis of code.
- the module When the developer completes a function or completes a piece of code, the module will be compiled in the local environment for verification, that is, a certain model is compiled and verified through the public packaging platform. If the packaging is successful, it means that the compilation is passed and can be handed over to the tester for testing. If the packaging fails, it means that there is a problem with the code and the code needs to be checked. After the modification is completed, the package is packaged again until the packaging is successful. However, current code inspections simply test the code implementation or logic, and cannot reflect the developer's own code development capabilities.
- the embodiments of the present application provide a code detection method, device, computer equipment, and storage medium, to solve the problem of too single code detection.
- a code detection method including:
- a code detection device including:
- the evaluation request acquisition module is used to acquire a code evaluation request, where the code evaluation request includes a user identification, a chart type identification, and an evaluation index;
- the evaluation code document acquisition module is configured to acquire corresponding N evaluation code documents according to the user identification, where N is a positive integer;
- the evaluation code document detection module is configured to obtain a corresponding code inspection tool according to the evaluation index to detect each of the evaluation code documents, and obtain the detection data of each of the evaluation code documents;
- the evaluation data integration module is used to integrate the detection data of each evaluation code document to obtain the evaluation data of the user identification
- a graphical presentation module for graphically presenting the evaluation data according to the chart type identifier
- a computer device including a memory, a processor, and computer readable instructions stored in the memory and capable of running on the processor, and the processor implements the above code when the computer readable instruction is executed Detection method.
- One or more readable storage media storing computer readable instructions, when the computer readable instructions are executed by one or more processors, cause the one or more processors to execute the foregoing code detection method.
- FIG. 1 is a schematic diagram of an application environment of the code detection method in an embodiment of the present application
- FIG. 2 is an example diagram of a code detection method in an embodiment of the present application
- FIG. 3 is another example diagram of a code detection method in an embodiment of the present application.
- FIG. 4 is another example diagram of a code detection method in an embodiment of the present application.
- FIG. 5 is another example diagram of a code detection method in an embodiment of the present application.
- FIG. 6 is another example diagram of a code detection method in an embodiment of the present application.
- FIG. 7 is a functional block diagram of a code detection device in an embodiment of the present application.
- FIG. 8 is a functional block diagram of a code detection device in an embodiment of the present application.
- FIG. 9 is another functional block diagram of the code detection device in an embodiment of the present application.
- FIG. 10 is a schematic diagram of a computer device in an embodiment of the present application.
- the credit data display method for loan review provided in the embodiments of the present application can be applied in an application environment as shown in FIG. 1, where a client (computer device) communicates with a server through a network.
- the client obtains the code evaluation request, and obtains the corresponding N evaluation code documents according to the user ID, where N is a positive integer; obtains the corresponding code inspection tool according to the evaluation index, detects each evaluation code document, and obtains each evaluation code Document inspection data; Integrate the inspection data of each evaluation code document to obtain the evaluation data identified by the user; and present the evaluation data in a graphical format according to the chart type identification.
- the server obtains the corresponding N evaluation code documents according to the user identification, where N is a positive integer; and obtains the corresponding code inspection tool according to the evaluation index. Perform detection to obtain the detection data of each evaluation code document; integrate the detection data of each evaluation code document to obtain the evaluation data of the user identification; and present the evaluation data graphically according to the chart type identification.
- the client computer equipment
- the server can be implemented with an independent server or a server cluster composed of multiple servers [0041]
- a code detection method is provided, and the method is applied to the client in FIG. 1 as an example for description, including the following steps:
- S10 Obtain a code evaluation request, where the code evaluation request includes a user identification, a chart type identification, and an evaluation index.
- the code evaluation request is a trigger request for evaluating a specific code document.
- User identification refers to information that can uniquely identify a user.
- the user identification may be a certificate number, a user name, or a user number.
- User number refers to the identification number assigned to a platform, application or system user, and one user corresponds to a unique user number.
- the chart type identifier is used to identify different types of charts. Each type of chart has a unique corresponding chart type identifier. Based on the chart type identifier, you can quickly find the corresponding type of chart.
- the evaluation index is an item selected by the user for evaluation. Specifically, the evaluation index may include at least one of coding standardization, logic implementation, and code reuse.
- S20 Acquire corresponding N evaluation code documents according to the user identification, where N is a positive integer.
- the evaluation code document is a code document used for evaluation, where the code documents are all with a user identification, that is, it is possible to learn which user wrote the corresponding evaluation code document. Therefore, the evaluation code document written by the user corresponding to the user identification can be obtained through the user identification.
- N is the number of evaluation code documents corresponding to the user ID.
- obtaining the corresponding N evaluation code documents according to the user identification may also include setting a date interval, and then obtaining the user identification according to the date interval to obtain the corresponding N evaluation code documents. That is, it is possible to pre-determine what period of time the evaluation code documents need to be obtained. Since it is possible to obtain all evaluation code documents written by the user corresponding to the user ID only based on the user ID, if the time span is too large, it will not be of reference. Therefore, by adding a date interval, more targeted evaluation can be carried out.
- the evaluation code document can also be obtained according to at least one of different project types, code types, and date intervals.
- S30 Obtain a corresponding code inspection tool according to the evaluation index to detect each evaluation code document, and obtain inspection data of each evaluation code document.
- the server pre-sets different code checking tools for different evaluation indicators.
- a front-end code standardization tool can be used to detect.
- the ESLint inspection tool can be used to Realize the inspection of coding standard degree.
- ESLint is a tool for checking grammar rules and code styles, which can be used to ensure that the code is written with correct grammar and uniform style. You can predefine code writing rules through ESLint configuration files, and then check the coding standard. Integrate the inspection results of each code inspection tool to obtain the inspection data of each evaluation code document. Specifically, each code inspection tool will output an inspection result, which can be quantified as a specific score.
- the test data of each evaluation code file includes the scores corresponding to different evaluation indicators.
- S40 Integrate the detection data of each evaluation code document to obtain the evaluation data of the user identification.
- integrating the detection data of each evaluation code document refers to summarizing the detection data of each evaluation code document according to a certain rule.
- the scores corresponding to the same evaluation index in the detection data of each evaluation code document can be directly averaged, and then an average score of the user ID for each evaluation index can be obtained, and the evaluation data can be composed.
- S50 Graphically present the evaluation data according to the chart type identification.
- graphical presentation refers to a process of graphically transforming evaluation data to form graphical data to be displayed.
- the evaluation data is presented graphically according to the chart type corresponding to the chart type identifier.
- graphically presenting the evaluation data according to the chart type identification specifically includes: graphically displaying the evaluation data on the visualization interface according to the chart type identification.
- the visual interface refers to the use of computer graphics and image processing technology to convert data into graphics or images displayed on the screen.
- the visual interface may be the entire display interface of the client, or a window interface in the display interface of the client.
- Graphical display refers to the conversion of graphs and tables to data and display on the corresponding interface.
- the graphical display may be a bar graph, a bar graph, a line graph, a three-dimensional graph, a pie graph, and the like. Select the corresponding chart according to the chart type identification to graphically display the evaluation data.
- the chart type identification Based on the chart type identification, it can be determined which type of chart the user has selected, so as to obtain the data chart corresponding to the chart type identification from the basic chart list. For example, if the chart type identifier corresponds to a pie chart, the pie chart is obtained from the basic icon list, and the pie chart corresponds to the chart type identifier Infographic. Further, the visualization interface also includes different visualization areas. After the data chart is obtained, the visualization area identification can be used to locate the configuration area corresponding to the visualization area identification in the visualization interface, and place the data chart in the configuration Area, to determine the data chart corresponding to each configuration area in the visualization interface.
- placing the data chart in the configuration area corresponding to the visualization area identifier in the visualization interface specifically includes: on the visualization chart configuration interface, using JQuery
- the UI-draggable plug-in drags the data chart to the configuration area corresponding to the visualization area identifier in the visualization chart configuration interface.
- the JQuery UI-Draggable plug-in is a plug-in used to drag the selected element or object with the mouse.
- the user selects the data chart with the mouse, using JQuery
- the UI-draggable plug-in drags and drops the data chart onto the configuration area corresponding to the visualization area identifier to quickly and efficiently determine the data chart corresponding to each configuration area in the visualization chart configuration interface.
- the J Query UI-draggable plug-in detects that the user releases the mouse on the visualization chart configuration interface, it will place the currently dragged data chart on the configuration area corresponding to the visualization area identifier, that is, use the JQu ery UI-draggable plug-in
- the operation process is simple and convenient, which is beneficial to improve the production efficiency of the visualization chart page.
- the code evaluation request includes user identification, chart type identification and evaluation indicators; obtain corresponding N evaluation code documents according to the user identification, where N is a positive integer; according to the evaluation Index acquisition corresponding code inspection tool detects each evaluation code document, and obtains the inspection data of each evaluation code document; Integrates the inspection data of each evaluation code document to obtain the evaluation data of the user identification; Finally, the identification is based on the chart type Graphical presentation of evaluation data. Evaluate the evaluation code documents corresponding to the user identification through different evaluation indicators, and finally present the evaluation data graphically according to the chart type identification to ensure that the code evaluation is more accurate and intuitive
- the code detection method further includes the following steps:
- S60 Acquire a request for comparison, where the request for comparison includes a comparison identifier.
- the request to be compared refers to a trigger request for comparing the evaluation data corresponding to the user identifier with the data of other users or departments.
- the request for comparison includes a comparison identifier, and the comparison identifier is used to indicate a comparison object.
- the comparison identifier can be directed to other users or a department.
- the comparison mark may consist of two parts: mark type and mark content.
- the identification type is used to indicate the type represented by the identification, such as an individual or a department. Exemplarily, letters may be used to indicate the indication type, and numbers may be used to indicate the identification content, and then the specific pointing object can be learned according to the identification type and identification content in the comparison identification respectively.
- the comparison identifier may also include date information, that is, date information is added to the comparison identifier, and the date information may be a time interval, which represents that the subsequently obtained evaluation code document is within this time interval of. If the comparison identifier includes date information, the type of identifier can be used to first determine that the comparison identifier is composed of three parts.
- S70 Obtain corresponding comparison evaluation data according to the comparison identifier.
- the comparison evaluation data is the evaluation data of the evaluation code document corresponding to the comparison identifier.
- the method of obtaining the comparison evaluation data is similar to steps S10-S50, except that the method of obtaining the evaluation code document is different.
- the evaluation code document in this step is obtained by comparing the identification.
- obtaining corresponding comparison evaluation data according to the comparison identifier may specifically include the following steps:
- S71 Query in the server according to the comparison identifier, and determine whether there is corresponding comparison evaluation data in the corresponding database in the server.
- S74 Obtain a corresponding code inspection tool according to the evaluation index to detect each evaluation code document, and obtain inspection data of each evaluation code document.
- S75 Integrate the detection data of each evaluation code document to obtain the comparison evaluation data of the comparison mark.
- comparison evaluation data corresponding to the comparison identifier already exists in the database of the server, and if it exists, the comparison evaluation data can be directly obtained. If it does not exist, get it according to the comparison identifier Corresponding to M evaluation code documents, evaluate the M evaluation code documents to obtain comparison evaluation data.
- the evaluation process is similar to steps S10-S50 in the foregoing embodiment, and will not be repeated here.
- S80 Perform a graphical display of the evaluation data on the visualization interface according to the chart type identification.
- step S50 This step is similar to step S50, except that the displayed data is different. Understandably, the display area of the comparison evaluation data on the visualization interface can be overlapped or displayed in different areas. When the comparison evaluation data overlaps the display area on the visualization interface, the comparison evaluation data and the evaluation data can be displayed in different patterns or colors.
- the request to be compared includes a comparison identifier. Obtain the corresponding comparison evaluation data according to the comparison mark. Finally, the evaluation data is displayed graphically on the visual interface according to the chart type identification.
- the evaluation code document includes the document date.
- the document date refers to the date when the corresponding document was created or completed.
- integrating the detection data of each evaluation code document to obtain the evaluation data of the user identification includes the following steps:
- S41 Obtain a preset time interval, and divide the evaluation code document according to the document date and time interval
- the preset time intervals are different time periods.
- the interval can be divided by months, and the evaluation code documents of the same month can be grouped into one category, that is, a code document set.
- set the time interval in advance, for example: [January 1, January 31], [February 1, February 28], [March 1, March 31] and so on.
- each evaluation code document is classified into different code document sets according to the document date, and K code document sets are obtained, where K is a positive integer, and K is the number of time intervals.
- the time limit can be limited by the setting of the time interval. For example, if the time interval only includes a time period of nearly one year, the evaluation code documents that are not in the time interval will not be considered.
- S42 Integrate the detection data of each code document set to obtain sub-evaluation data of each code document set.
- integrating the detection data of each code document set refers to summarizing the detection data of the evaluation code documents in each code document set according to a certain rule.
- each comment can be directly The scores corresponding to the same evaluation index in the detection data of the evaluation code file are averaged, and then an average score of the user ID for each evaluation index is obtained, and the evaluation data is composed. Or, further divide the scores corresponding to the same evaluation index in the test data of the evaluation code documents in each code document set into more sub-items according to different time periods, so as to better reflect the scores in different periods .
- S43 Combine the sub-evaluation data of each code document set into user-identified evaluation data.
- the evaluation data of the user identification is reflected from different time intervals, that is, it represents the detection data of the evaluation code document of the user corresponding to the user identification in different time intervals.
- the preset time interval is first obtained, and the evaluation code documents are divided according to the document date and time interval to obtain K code document sets; and then the detection data of each code document set is integrated to obtain The sub-evaluation data of each code document set; Finally, the sub-evaluation data of each code document set is composed of the evaluation data of the user identification, which better reflects the detection data of the user identification in different periods, which helps to make the follow-up more intuitive Perform comparison and analysis.
- graphically presenting the evaluation data according to the chart type identifier specifically includes the following steps:
- S51 Obtain an administrator ID, obtain a corresponding basic chart list according to the administrator ID, and display the basic chart list in the visual chart configuration interface.
- the administrator ID refers to the unique ID corresponding to the seat or staff member that processes the loan review request.
- the administrator ID may be a mobile phone number, ID card information, or a unique ID assigned by the system or platform .
- the basic chart list refers to a list of basic charts that do not contain data content. Through the administrator identification, all the basic charts within the scope of the administrator's authority can be determined, and all the basic charts are displayed in the visualization interface in the form of a list, that is, the basic chart list is displayed in the visualization interface. In this way, the basic chart list can be intuitively presented to the administrator, which is convenient for the administrator to make a reasonable selection.
- S52 Obtain chart selection information, where the chart selection information includes a chart type identification and a visualization area identification
- the chart selection information refers to the information for selecting the basic chart within the authority range corresponding to the administrator identifier and causing the basic chart to be displayed on the visualization interface.
- the chart type identifier is used to identify different types of charts. Each type of chart has a unique corresponding chart type identifier. The chart type identification can quickly find the corresponding type of chart.
- the visualization interface is divided into different configuration areas.
- the visualization area identifier is used to identify different configuration areas on the visualization interface.
- a configuration area corresponds to a unique visualization area identifier, so that it can be quickly located on the visualization interface through the visualization area identifier. Configuration area. Understandably, the number of the chart type identifier and the corresponding visualization area identifier is not limited to one, that is, the user credit data can be displayed through different data tables.
- S53 Obtain the corresponding data chart according to the chart type identification, load the evaluation data in the data chart, and display the visualization area corresponding to the visualization area identification in the visualization interface.
- the chart type identifier Based on the chart type identifier, it can be determined what type of chart the user has selected, so as to obtain the data chart corresponding to the chart type identifier from the basic chart list. For example, if the chart type identifier corresponds to a pie chart, the pie chart is obtained from the basic icon list, and the pie chart is the data chart corresponding to the chart type identifier. After obtaining the data chart, locate the configuration area in the visualization interface corresponding to the visualization area identifier according to the visualization area identifier, and place the data chart on the configuration area to determine the data corresponding to each configuration area in the visualization interface chart.
- the corresponding basic chart list is acquired according to the administrator identifier, and the basic chart list is displayed in the visual chart configuration interface.
- the chart selection information includes the chart type identification and the visualization area identification.
- the corresponding data chart is obtained according to the chart type identification, the evaluation data is loaded in the data chart, and the visualization area identifies the corresponding visualization area in the visualization interface for display. Improve the efficiency of graphic display and make data display more intuitive.
- a code detection device is provided, and the code detection device corresponds to the code detection method in the foregoing embodiment one-to-one.
- the code detection device includes an evaluation request acquisition module 10, an evaluation code document acquisition module 20, an evaluation code document detection module 30, an evaluation data integration module 40, and a graphical presentation module 50.
- the detailed description of each functional module is as follows:
- the evaluation request obtaining module 10 is used to obtain a code evaluation request, where the code evaluation request includes a user identification, Chart type identification and evaluation indicators.
- the evaluation code document acquisition module 20 is configured to acquire corresponding N evaluation code documents according to the user identification, where N is a positive integer.
- the evaluation code document detection module 30 is configured to obtain a corresponding code inspection tool according to the evaluation index to detect each evaluation code document, and obtain the detection data of each evaluation code document.
- the evaluation data integration module 40 is used to integrate the detection data of each evaluation code document to obtain the evaluation data identified by the user.
- the graphic presentation module 50 is configured to perform graphic presentation of the evaluation data according to the chart type identification.
- the code detection device further includes a request for comparison obtaining module 60, a comparison evaluation data obtaining module 70, and a graph display module 80.
- the request for comparison obtaining module 60 is configured to obtain the request for comparison, and the request for comparison includes a comparison identifier.
- the comparison evaluation data acquisition module 70 is configured to acquire corresponding comparison evaluation data according to the comparison identifier.
- the chart display module 80 is used to compare and display the evaluation data in a chart on the visualization interface according to the chart type identification.
- the evaluation code document includes the document date; as shown in FIG. 9, the evaluation data integration module 40 includes an evaluation code document division unit 41, a sub-evaluation data acquisition unit 42 and an evaluation data composition unit 43.
- the evaluation code document dividing unit 41 is configured to obtain a preset time interval, and divide the evaluation code document according to the document date and time interval to obtain K code document sets, where K is a positive integer.
- the sub-assessment data acquisition unit 42 is used to integrate the detection data of each code document set to obtain the sub-evaluation data of each code document set.
- the evaluation data composing unit 43 is used to compose the evaluation data of the user identification into the sub-evaluation data of each code document set.
- the comparison evaluation data acquisition module 70 includes a comparison evaluation data judgment unit, a comparison evaluation data acquisition unit, an evaluation code document acquisition unit, an evaluation code document detection unit, and a comparison evaluation data integration unit.
- the comparison evaluation data judging unit is configured to query the server according to the comparison identifier and determine whether there is corresponding comparison evaluation data in the corresponding database on the server.
- a comparison evaluation data acquisition unit configured to have a corresponding comparison evaluation in a corresponding database on the server side When data is available, the comparison evaluation data is directly obtained.
- the evaluation code document obtaining unit is configured to obtain M corresponding evaluation code documents according to the comparison identifier when the corresponding comparison evaluation data does not exist in the corresponding database in the server, where M is a positive integer.
- the evaluation code document detection unit is configured to obtain the corresponding code inspection tool according to the evaluation index to detect each evaluation code document, and obtain the detection data of each evaluation code document.
- the comparison evaluation data integration unit is used to integrate the detection data of each evaluation code document to obtain the comparison evaluation data of the comparison mark.
- the graphical presentation module 50 includes a basic chart list display unit, a chart selection information acquisition unit, and an evaluation data display unit.
- the basic chart list display unit is used to obtain the administrator ID, obtain the corresponding basic chart list according to the administrator ID, and display the basic chart list in the visual chart configuration interface.
- the chart selection information acquiring unit is configured to acquire chart selection information, where the chart selection information includes a chart type identifier and a visualization area identifier.
- the evaluation data display unit is used to obtain the corresponding data chart according to the chart type identification, load the evaluation data in the data chart, and display the visualization area corresponding to the visualization area identification in the visualization interface
- Each module in the above-mentioned code detection device can be implemented in whole or in part by software, hardware and a combination thereof.
- the foregoing modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can invoke and execute the operations corresponding to the foregoing modules.
- a computer device is provided.
- the computer device may be a terminal, and its internal structure diagram may be as shown in FIG. 10.
- the computer equipment includes a processor, a memory, a network interface, a display screen, and an input device connected through a system bus.
- the processor of the computer device is used to provide calculation and control capabilities.
- the memory of the computer device includes a non-volatile storage medium and an internal memory.
- the non-volatile storage medium stores an operating system and computer readable instructions.
- the internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium.
- the network interface of the computer device is used to communicate with an external server through a network connection.
- the computer readable instructions are executed by the processor Time to implement a code detection method.
- a computer device including a memory, a processor, and computer readable instructions stored in the memory and running on the processor, and the processor executes the following steps when the computer readable instructions are executed :
- one or more readable storage media storing computer readable instructions are provided.
- the computer readable instructions are executed by one or more processors, the one or more The processor performs the following steps:
- the readable storage medium includes a non-volatile readable storage medium and a volatile readable storage medium.
- Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
- Volatile memory may include random access memory (RAM) or external cache memory.
- RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus), direct RAM (RDRAM), direct memory bus dynamic RAM (DRDR AM), and memory bus dynamic RAM (RDRAM), etc.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
一种代码检测方法、代码检测装置、相关计算机设备及存储介质。所述方法先获取代码评估请求,代码评估请求包括用户标识、图表类型标识和评估指标(S10);根据用户标识获取对应的N个评估代码文档,其中,N为正整数(S20);根据评估指标获取对应的代码检查工具对每一评估代码文档进行检测,得到每一评估代码文档的检测数据(S30);对每一评估代码文档的检测数据进行整合,得到用户标识的评估数据(S40);最后根据图表类型标识对评估数据进行图表化呈现(S50)。通过不同的评估指标对对应用户标识的评估代码文档进行评估,并且最终根据图表类型标识对评估数据进行图表化呈现,以保证代码评估更加准确和直观。
Description
代码检测方法、 装置、 计算机设备及存储介质
[0001] 本申请以 2019年 01月 18日提交的申请号为 201910048905.9, 名称为“代码检测方 法、 装置、 计算机设备及存储介质”的中国发明专利申请为基础, 并要求其优先 权。
技术领域
[0002] 本申请涉及计算机技术领域, 尤其涉及一种代码检测方法、 装置、 计算机设备 及存储介质。
[0003]
[0004] 背景技术
[0005] 随着计算机技术地快速发展, 越来越多的计算机应用融入到我们的生活当中。
而计算机应用是以代码为基础构建的, 当开发人员开发完成一个功能或完成一 段代码后, 将在本地环境进行模块编译, 以进行验证, 即通过公共打包平台对 某个机型进行编译验证, 如果打包成功则意味着编译通过, 可以交由测试人员 进行测试, 如果打包失败则意味着代码有问题, 需要对代码进行检查, 完成修 改后再次打包, 直到打包成功。 然而, 当前的代码检查都只是简单地对代码地 实现或者逻辑进行测试, 没法反映开发人员本身的代码开发能力。
[0006]
[0007] 申请内容
[0008] 本申请实施例提供一种代码检测方法、 装置、 计算机设备及存储介质, 以解决 代码检测过于单一的问题。
[0009] 一种代码检测方法, 包括:
[0010] 获取代码评估请求, 所述代码评估请求包括用户标识、 图表类型标识和评估指 标;
[0011] 根据所述用户标识获取对应的 N个评估代码文档, 其中, N为正整数;
[0012] 根据所述评估指标获取对应的代码检查工具对每一所述评估代码文档进行检测 , 得到每一所述评估代码文档的检测数据;
[0013] 对每一所述评估代码文档的检测数据进行整合, 得到所述用户标识的评估数据
[0014] 根据所述图表类型标识对所述评估数据进行图表化呈现。
[0015] 一种代码检测装置, 包括:
[0016] 评估请求获取模块, 用于获取代码评估请求, 所述代码评估请求包括用户标识 、 图表类型标识和评估指标;
[0017] 评估代码文档获取模块, 用于根据所述用户标识获取对应的 N个评估代码文档 , 其中, N为正整数;
[0018] 评估代码文档检测模块, 用于根据所述评估指标获取对应的代码检查工具对每 一所述评估代码文档进行检测, 得到每一所述评估代码文档的检测数据;
[0019] 评估数据整合模块, 用于对每一所述评估代码文档的检测数据进行整合, 得到 所述用户标识的评估数据;
[0020] 图表化呈现模块, 用于根据所述图表类型标识对所述评估数据进行图表化呈现
[0021] 一种计算机设备, 包括存储器、 处理器以及存储在所述存储器中并可在所述处 理器上运行的计算机可读指令, 所述处理器执行所述计算机可读指令时实现上 述代码检测方法。
[0022] 一个或多个存储有计算机可读指令的可读存储介质, 所述计算机可读指令被一 个或多个处理器执行时, 使得所述一个或多个处理器执行上述代码检测方法。
[0023] 本申请的一个或多个实施例的细节在下面的附图和描述中提出, 本申请的其他 特征和优点将从说明书、 附图以及权利要求变得明显。
[0024]
[0025] 附图说明
[0026] 为了更清楚地说明本申请实施例的技术方案, 下面将对本申请实施例的描述中 所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅是本申 请的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动性的前 提下, 还可以根据这些附图获得其他的附图。
[0027] 图 1是本申请一实施例中代码检测方法的一应用环境示意图;
[0028] 图 2是本申请一实施例中代码检测方法的一示例图;
[0029] 图 3是本申请一实施例中代码检测方法的另一示例图;
[0030] 图 4是本申请一实施例中代码检测方法的另一示例图;
[0031] 图 5是本申请一实施例中代码检测方法的另一示例图;
[0032] 图 6是本申请一实施例中代码检测方法的另一示例图;
[0033] 图 7是本申请一实施例中代码检测装置的一原理框图;
[0034] 图 8是本申请一实施例中代码检测装置的一原理框图;
[0035] 图 9是本申请一实施例中代码检测装置的另一原理框图;
[0036] 图 10是本申请一实施例中计算机设备的一示意图。
[0037]
[0038] 具体实施方式
[0039] 下面将结合本申请实施例中的附图, 对本申请实施例中的技术方案进行清楚、 完整地描述, 显然, 所描述的实施例是本申请一部分实施例, 而不是全部的实 施例。 基于本申请中的实施例, 本领域普通技术人员在没有作出创造性劳动前 提下所获得的所有其他实施例, 都属于本申请保护的范围。
[0040] 本申请实施例提供的用于贷款审核的信用数据展示方法, 可应用在如图 1的应 用环境中, 其中, 客户端 (计算机设备) 通过网络与服务端进行通信。 客户端 获取代码评估请求, 并根据用户标识获取对应的 N个评估代码文档, 其中, N为 正整数; 根据评估指标获取对应的代码检查工具对每一评估代码文档进行检测 , 得到每一评估代码文档的检测数据; 对每一评估代码文档的检测数据进行整 合, 得到用户标识的评估数据; 根据图表类型标识对评估数据进行图表化呈现 。 或者, 客户端将代码评估请求发送至服务端之后, 服务端根据用户标识获取 对应的 N个评估代码文档, 其中, N为正整数; 根据评估指标获取对应的代码检 查工具对每一评估代码文档进行检测, 得到每一评估代码文档的检测数据; 对 每一评估代码文档的检测数据进行整合, 得到用户标识的评估数据; 根据图表 类型标识对所述评估数据进行图表化呈现。 其中, 客户端 (计算机设备) 可以 但不限于各种个人计算机、 笔记本电脑、 智能手机、 平板电脑和便携式可穿戴 设备。 服务端可以用独立的服务器或者是多个服务器组成的服务器集群来实现
[0041] 在一实施例中, 如图 2所示, 提供一种代码检测方法, 以该方法应用在图 1中的 客户端为例进行说明, 包括如下步骤:
[0042] S10: 获取代码评估请求, 代码评估请求包括用户标识、 图表类型标识和评估 指标。
[0043] 其中, 代码评估请求为对特定的代码文档进行评估的触发请求。 用户标识是指 可以唯一标识出用户的信息。 在一个具体实施方式中, 用户标识可以为证件号 、 用户名或用户号。 用户号是指为一平台、 应用程序或者系统用户分配的识别 编号, 一个用户对应一个唯一用户号。 图表类型标识是用来识别不同类型图表 的标识, 每一种类型的图表都具有唯一对应的图表类型标识, 基于图表类型标 识可以快速查找到对应类型的图表。 而评估指标为用户选择的来评估的项目, 具体地, 评估指标可以包括编码规范度、 逻辑实现和代码复用等至少一项。
[0044] S20: 根据用户标识获取对应的 N个评估代码文档, 其中, N为正整数。
[0045] 评估代码文档为用来进行评估的代码文档, 其中, 代码文档都是带有用户标识 的, 即可以获悉对应的评估代码文档是由哪个用户编写的。 因此, 通过用户标 识可以获取到该用户标识对应的用户编写的评估代码文档。 N为该用户标识对应 的评估代码文档的数量。
[0046] 在一个具体实施方式中, 根据用户标识获取对应的 N个评估代码文档还可以包 括设定一个日期区间, 再根据这个日期区间获取该用户标识获取对应的 N个评估 代码文档。 即可以预先设定需要获取什么时间段内的评估代码文档。 由于仅根 据用户标识可能会获取到该用户标识对应的用户所编写的所有评估代码文档, 若时间跨度太大, 会不具有参考性。 因此, 通过增加一个日期区间, 可以进行 更有针对性地评估。 优选地, 还可以根据不同的项目类型、 代码种类和日期区 间中的至少一项进行评估代码文档的获取。
[0047] S30: 根据评估指标获取对应的代码检查工具对每一评估代码文档进行检测, 得到每一评估代码文档的检测数据。
[0048] 服务端预先为不同的评估指标设定了不同的代码检查工具。 例如, 对于编码规 范度, 可以采用前端代码规范工具来检测。 具体地, 可以采用 ESLint检查工具来
实现编码规范度的检查。 ESLint是一个语法规则和代码风格的检查工具, 可以用 来保证写出语法正确、 风格统一的代码。 可以通过 ESLint配置文件来预先定义代 码的编写规则, 然后对编码规范度进行检测。 将每一代码检查工具的检查结果 进行整合, 即得到每一评估代码文档的检测数据。 具体地, 每一代码检查工具 都会输出一个检查结果, 该检查结果可以量化为一个具体的分值。 而每一评估 代码文档的检测数据就包括了不同评估指标对应的分值。
[0049] S40: 对每一评估代码文档的检测数据进行整合, 得到用户标识的评估数据。
[0050] 具体地, 对每一评估代码文档的检测数据进行整合是指将每一评估代码文档的 检测数据按照一定的规律进行汇总。 可选地, 可以直接将每一评估代码文档的 检测数据中相同评估指标对应的分值进行求均值, 然后得到该用户标识对于每 个评估指标的一个平均分值, 并组成评估数据。 或者, 进一步地将每一评估代 码文档的检测数据中相同评估指标对应的分值按不同的时间段进行划分成更多 的子项目, 以更好地体现出不同时期的分值。
[0051] S50: 根据图表类型标识对评估数据进行图表化呈现。
[0052] 具体地, 图表化呈现是指将评估数据进行图表化转化的一个过程, 形成待显示 的图表化数据。 并且, 根据图表类型标识所对应的图表类型来对评估数据进行 图表化呈现。
[0053] 优选地, 根据图表类型标识对评估数据进行图表化呈现具体包括: 根据图表类 型标识在可视化界面上对评估数据进行图表化显示。 其中, 可视化界面是指利 用计算机图形学和图像处理技术, 将数据转换成图形或图像在屏幕上显示出来 的界面。 具体地, 该可视化界面可以是客户端的整个显示界面, 或者是客户端 显示界面中的一个窗口界面。 图表化显示是指将图形和表格对数据进行转化并 在对应界面上进行显示。 具体地, 该图表化显示可以是条形图、 柱状图、 折线 图、 三维图和饼状图等。 根据图表类型标识选取对应的图表对评估数据进行图 表化显示。
[0054] 基于图表类型标识, 可以确定用户选择了何种类型的图表, 以从基础图表列表 中获取与图表类型标识相对应的数据图表。 例如, 如果图表类型标识对应的是 饼状图, 则从基础图标列表中获取到饼状图, 该饼状图就是图表类型标识对应
的数据图表。 进一步地, 可视化界面上还包括不同地可视化区域, 在获取到数 据图表之后, 可以根据可视化区域标识, 定位到可视化界面中与可视化区域标 识相对应的配置区域, 并将该数据图表放置在该配置区域上, 以确定可视化界 面中每一配置区域对应的数据图表。
[0055] 在一个具体实施方式中, 将数据图表放置在可视化界面中与可视化区域标识相 对应的配置区域, 具体包括: 在可视化图表配置界面上, 采用 JQuery
UI-draggable插件将数据图表拖拽到可视化图表配置界面中与可视化区域标识相 对应的配置区域上。
[0056] 其中, JQuery UI-Draggable插件是用来使选中的元素或者对象通过鼠标进行拖 动的插件。 在可视化界面上, 用户通过鼠标选中数据图表, 采用 JQuery
UI-draggable插件将数据图表拖拽到与可视化区域标识相对应的配置区域上, 以 实现快速高效地确定可视化图表配置界面中每一配置区域对应的数据图表。 当 J Query UI-draggable插件检测到用户在可视化图表配置界面上松开鼠标时, 则将 当前拖动的数据图表放置在与可视化区域标识相对应的配置区域上, 即采用 JQu ery UI-draggable插件将数据图表配置在对应的配置区域时, 只需控制鼠标从基 础图表列表中选择数据图表并拖拽到配置区域即可, 操作过程简单方便, 有利 于提高可视化图表页面的制作效率。
[0057] 在本实施例中, 先获取代码评估请求, 代码评估请求包括用户标识、 图表类型 标识和评估指标; 根据用户标识获取对应的 N个评估代码文档, 其中, N为正整 数; 根据评估指标获取对应的代码检查工具对每一评估代码文档进行检测, 得 到每一评估代码文档的检测数据; 对每一评估代码文档的检测数据进行整合, 得到用户标识的评估数据; 最后根据图表类型标识对评估数据进行图表化呈现 。 通过不同的评估指标对对应用户标识的评估代码文档进行评估, 并且最终根 据图表类型标识对评估数据进行图表化呈现, 以保证代码评估更加准确和直观
[0058] 在一个实施例中, 在根据图表类型标识对评估数据进行图表化呈现之后, 该代 码检测方法还包括如下步骤:
[0059] S60: 获取待比对请求, 待比对请求包括比对标识。
[0060] 其中, 待比对请求是指将用户标识对应的评估数据和其他用户或者部门的数据 进行比对的触发请求。 该待比对请求包括比对标识, 比对标识用于标示比对的 对象, 例如, 该比对标识可以指向其他用户, 也可以指向一个部门。 优选地, 该比对标识可以由标识类型和标识内容两部分组成。 标识类型用于指示该标识 代表的类型, 例如是个人还是部门。 示例性地, 可以用字母来表示表示类型, 用数字来表示标识内容, 后续分别根据比对标识里面的标识类型和标识内容即 可获悉到具体的指向对象。
[0061] 在一个实施例中, 比对标识还可以包括日期信息, 即在比对标识中加入日期信 息, 该日期信息可以为一个时间区间, 代表后续获取的评估代码文档是在这个 时间区间内的。 若比对标识包括日期信息, 则可以通过标识类型来先确定该比 对标识是由三部分组成的。
[0062] S70: 根据比对标识获取对应的比对评估数据。
[0063] 比对评估数据为比对标识对应的评估代码文档的评估数据。 具体地, 比对评估 数据的获得方式和步骤 S10-S50类似, 仅是评估代码文档的获取方式不同。 该步 骤中的评估代码文档是通过比对标识来获取的。 在该步骤中, 如图 4所示, 根据 比对标识获取对应的比对评估数据具体可以包括如下步骤:
[0064] S71: 根据比对标识在服务端中进行查询, 判断服务端中对应的数据库中是否 存在对应的比对评估数据。
[0065] S72: 若服务端中对应的数据库中存在对应的比对评估数据, 则直接获取该比 对评估数据。
[0066] S73: 若服务端中对应的数据库中不存在对应的比对评估数据, 则根据比对标 识获取对应的 M个评估代码文档, 其中, M为正整数。
[0067] S74: 根据评估指标获取对应的代码检查工具对每一评估代码文档进行检测, 得到每一评估代码文档的检测数据。
[0068] S75: 对每一评估代码文档的检测数据进行整合, 得到比对标识的比对评估数 据。
[0069] 即先判断服务端的数据库中是否已经存在了该比对标识对应的比对评估数据, 若存在, 则直接获取该比对评估数据即可。 若不存在, 则根据比对标识获取到
对应的 M个评估代码文档, 对 M个评估代码文档进行评估, 得到比对评估数据。 该评估过程和上述实施例中步骤 S10-S50类似, 在此不再赘述。
[0070] S80: 根据图表类型标识在可视化界面上对比对评估数据进行图表化显示。
[0071] 该步骤和步骤 S50类似, 仅是显示的数据不同。 可以理解地, 比对评估数据在 可视化界面上的显示区域可以重叠, 也可以分区域显示。 当比对评估数据在可 视化界面上的显示区域重叠时, 可以将比对评估数据和评估数据采用不同的图 案或颜色进行显示。
[0072] 在本实施例中, 通过获取待比对请求, 待比对请求包括比对标识。 根据比对标 识获取对应的比对评估数据。 最终根据图表类型标识在可视化界面上对比对评 估数据进行图表化显示。 通过引入其他用户或部门的比对评估数据, 并且也在 可视化界面上进行图表化显示, 以更好地对代码编写能力进行评估。
[0073] 在一个实施例中, 评估代码文档包括文档日期。 文档日期是指对应文档生成或 者完成的日期。
[0074] 在本实施例中, 如图 5所示, 对每一评估代码文档的检测数据进行整合, 得到 用户标识的评估数据, 具体包括如下步骤:
[0075] S41: 获取预设时间区间, 根据文档日期和时间区间对评估代码文档进行划分
, 得到 K个代码文档集, 其中, K为正整数。
[0076] 其中, 预设时间区间为不同的时间段。 例如可以将以月份来划分区间, 将同一 个月份的评估代码文档归为一类, 即归为一个代码文档集。 此时, 预先设置好 时间区间, 例如: [1月 1日, 1月 31日]、 [2月 1日, 2月 28日]、 [3月 1日, 3月 31日] 等。 然后将每一个评估代码文档按照文档日期归类到不同的代码文档集中, 得 到 K个代码文档集, 其中, K为正整数, K即为时间区间的个数。 可以理解地, 可以通过时间区间的设定对期限进行限定, 例如, 若时间区间只包括了近一年 的时间段, 则不在时间区间内的评估代码文档则不考虑。
[0077] S42: 对每一代码文档集的检测数据进行整合, 得到每一代码文档集的子评估 数据。
[0078] 具体地, 对每一代码文档集的检测数据进行整合是指将每一代码文档集中的评 估代码文档的检测数据按照一定的规律进行汇总。 可选地, 可以直接将每一评
估代码文档的检测数据中相同评估指标对应的分值进行求均值, 然后得到该用 户标识对于每个评估指标的一个平均分值, 并组成评估数据。 或者, 进一步地 将每一代码文档集中的评估代码文档的检测数据中相同评估指标对应的分值按 不同的时间段进行划分成更多的子项目, 以更好地体现出不同时期的分值。
[0079] S43: 将每一代码文档集的子评估数据组成用户标识的评估数据。
[0080] 具体地, 该步骤中从不同时间区间来体现用户标识的评估数据, 即代表了该用 户标识对应的用户在不同时间区间里的评估代码文档的检测数据。
[0081] 在本实施例中, 先获取预设时间区间, 根据文档日期和时间区间对评估代码文 档进行划分, 得到 K个代码文档集; 再对每一代码文档集的检测数据进行整合, 得到每一代码文档集的子评估数据; 最后将每一代码文档集的子评估数据组成 用户标识的评估数据, 更好地体现了该用户标识在不同时期地检测数据, 有助 于后续更加直观地进行比对和分析。
[0082] 在一个实施例中, 如图 6所示, 根据图表类型标识对评估数据进行图表化呈现 , 具体包括如下步骤:
[0083] S51: 获取管理员标识, 根据管理员标识获取对应的基础图表列表, 并在可视 化图表配置界面中显示基础图表列表。
[0084] 其中, 管理员标识是指处理该贷款审核请求地坐席或者工作人员对应的唯一性 标识, 具体地, 该管理员标识可以为手机号码、 身份证信息或者系统或者平台 分配的唯一性标识。 基础图表列表是指不包含数据内容的基础性图表对应的列 表。 通过管理员标识可以确定该管理员权限范围内的所有基础图表, 将所有基 础图表以列表的形式在可视化界面中显示, 即在可视化界面中显示基础图表列 表。 如此, 可直观地将基础图表列表呈现给管理员, 方便管理员进行合理地选 择。
[0085] S52: 获取图表选择信息, 图表选择信息包括图表类型标识和可视化区域标识
[0086] 其中, 图表选择信息是指对在管理员标识对应的权限范围内的基础图表进行选 择, 并使该基础图表在可视化界面上显示的信息。 图表类型标识是用来识别不 同类型图表的标识, 每一种类型的图表都具有唯一对应的图表类型标识, 基于
图表类型标识可以快速查找到对应类型的图表。 可视化界面上划分为不同的配 置区域, 可视化区域标识是用于识别可视化界面上不同配置区域的标识, 一个 配置区域对应一唯一的可视化区域标识, 以便于通过可视化区域标识快速定位 到可视化界面上对应的配置区域。 可以理解地, 图表类型标识和对应的可视化 区域标识的数量不限于一个, 即可以通过不同的数据表格对用户信用数据进行 显不。
[0087] S53: 根据图表类型标识获取对应的数据图表, 在数据图表中加载评估数据, 并在可视化界面中可视化区域标识对应的可视化区域进行显示。
[0088] 基于图表类型标识, 可以确定用户选择了何种类型的图表, 以从基础图表列表 中获取与图表类型标识相对应的数据图表。 例如, 如果图表类型标识对应的是 饼状图, 则从基础图标列表中获取到饼状图, 该饼状图就是图表类型标识对应 的数据图表。 获取到数据图表之后, 根据可视化区域标识, 定位到可视化界面 中与可视化区域标识相对应的配置区域, 并将该数据图表放置在该配置区域上 , 以确定可视化界面中每一配置区域对应的数据图表。
[0089] 在本实施例中, 通过获取管理员标识, 根据管理员标识获取对应的基础图表列 表, 并在可视化图表配置界面中显示基础图表列表。 在获取图表选择信息, 图 表选择信息包括图表类型标识和可视化区域标识。 最终根据图表类型标识获取 对应的数据图表, 在数据图表中加载评估数据, 并在可视化界面中可视化区域 标识对应的可视化区域进行显示。 提高了图表化显示的效率, 使数据显示更加 直观。
[0090] 应理解, 上述实施例中各步骤的序号的大小并不意味着执行顺序的先后, 各过 程的执行顺序应以其功能和内在逻辑确定, 而不应对本申请实施例的实施过程 构成任何限定。
[0091] 在一实施例中, 提供一种代码检测装置, 该代码检测装置与上述实施例中代码 检测方法一一对应。 如图 7所示, 该代码检测装置包括评估请求获取模块 10、 评 估代码文档获取模块 20、 评估代码文档检测模块 30、 评估数据整合模块 40和图 表化呈现模块 50。 各功能模块详细说明如下:
[0092] 评估请求获取模块 10, 用于获取代码评估请求, 代码评估请求包括用户标识、
图表类型标识和评估指标。
[0093] 评估代码文档获取模块 20, 用于根据用户标识获取对应的 N个评估代码文档, 其中, N为正整数。
[0094] 评估代码文档检测模块 30, 用于根据评估指标获取对应的代码检查工具对每一 评估代码文档进行检测, 得到每一评估代码文档的检测数据。
[0095] 评估数据整合模块 40, 用于对每一评估代码文档的检测数据进行整合, 得到用 户标识的评估数据。
[0096] 图表化呈现模块 50, 用于根据图表类型标识对评估数据进行图表化呈现。
[0097] 优选地, 如图 8所示, 该代码检测装置还包括待比对请求获取模块 60、 比对评 估数据获取模块 70和图表化显示模块 80。
[0098] 待比对请求获取模块 60, 用于获取待比对请求, 待比对请求包括比对标识。
[0099] 比对评估数据获取模块 70, 用于根据比对标识获取对应的比对评估数据。
[0100] 图表化显示模块 80, 用于根据图表类型标识在可视化界面上对比对评估数据进 行图表化显示。
[0101] 优选地, 评估代码文档包括文档日期; 如图 9所示, 评估数据整合模块 40包括 评估代码文档划分单元 41、 子评估数据获取单元 42和评估数据组成单元 43。
[0102] 评估代码文档划分单元 41, 用于获取预设时间区间, 根据文档日期和时间区间 对评估代码文档进行划分, 得到 K个代码文档集, 其中, K为正整数。
[0103] 子评估数据获取单元 42, 用于对每一代码文档集的检测数据进行整合, 得到每 一代码文档集的子评估数据。
[0104] 评估数据组成单元 43 , 用于将每一代码文档集的子评估数据组成用户标识的评 估数据。
[0105] 优选地, 比对评估数据获取模块 70包括比对评估数据判断单元、 比对评估数据 获取单元、 评估代码文档获取单元、 评估代码文档检测单元和比对评估数据整 合单元。
[0106] 比对评估数据判断单元, 用于根据比对标识在服务端中进行查询, 判断服务端 中对应的数据库中是否存在对应的比对评估数据。
[0107] 比对评估数据获取单元, 用于在服务端中对应的数据库中存在对应的比对评估
数据时, 则直接获取该比对评估数据。
[0108] 评估代码文档获取单元, 用于在服务端中对应的数据库中不存在对应的比对评 估数据时, 则根据比对标识获取对应的 M个评估代码文档, 其中, M为正整数。
[0109] 评估代码文档检测单元, 用于根据评估指标获取对应的代码检查工具对每一评 估代码文档进行检测, 得到每一评估代码文档的检测数据。
[0110] 比对评估数据整合单元, 用于对每一评估代码文档的检测数据进行整合, 得到 比对标识的比对评估数据。
[0111] 优选地, 图表化呈现模块 50包括基础图表列表显示单元、 图表选择信息获取单 元和评估数据显示单元。
[0112] 基础图表列表显示单元, 用于获取管理员标识, 根据管理员标识获取对应的基 础图表列表, 并在可视化图表配置界面中显示基础图表列表。
[0113] 图表选择信息获取单元, 用于获取图表选择信息, 图表选择信息包括图表类型 标识和可视化区域标识。
[0114] 评估数据显示单元, 用于根据图表类型标识获取对应的数据图表, 在数据图表 中加载评估数据, 并在可视化界面中可视化区域标识对应的可视化区域进行显
[0115] 关于代码检测装置的具体限定可以参见上文中对于代码检测方法的限定, 在此 不再赘述。 上述代码检测装置中的各个模块可全部或部分通过软件、 硬件及其 组合来实现。 上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器 中, 也可以以软件形式存储于计算机设备中的存储器中, 以便于处理器调用执 行以上各个模块对应的操作。
[0116] 在一个实施例中, 提供了一种计算机设备, 该计算机设备可以是终端, 其内部 结构图可以如图 10所示。 该计算机设备包括通过系统总线连接的处理器、 存储 器、 网络接口、 显示屏和输入装置。 其中, 该计算机设备的处理器用于提供计 算和控制能力。 该计算机设备的存储器包括非易失性存储介质、 内存储器。 该 非易失性存储介质存储有操作系统和计算机可读指令。 该内存储器为非易失性 存储介质中的操作系统和计算机可读指令的运行提供环境。 该计算机设备的网 络接口用于与外部服务器通过网络连接通信。 该计算机可读指令被处理器执行
时以实现一种代码检测方法。
[0117] 在一个实施例中, 提供了一种计算机设备, 包括存储器、 处理器及存储在存储 器上并可在处理器上运行的计算机可读指令, 处理器执行计算机可读指令时实 现以下步骤:
[0118] 获取代码评估请求, 所述代码评估请求包括用户标识、 图表类型标识和评估指 标;
[0119] 根据所述用户标识获取对应的 N个评估代码文档, 其中, N为正整数;
[0120] 根据所述评估指标获取对应的代码检查工具对每一所述评估代码文档进行检测 , 得到每一所述评估代码文档的检测数据;
[0121] 对每一所述评估代码文档的检测数据进行整合, 得到所述用户标识的评估数据
[0122] 根据所述图表类型标识对所述评估数据进行图表化呈现。
[0123] 在一个实施例中, 提供了一个或多个存储有计算机可读指令的可读存储介质, 所述计算机可读指令被一个或多个处理器执行时, 使得所述一个或多个处理器 执行以下步骤:
[0124] 获取代码评估请求, 所述代码评估请求包括用户标识、 图表类型标识和评估指 标;
[0125] 根据所述用户标识获取对应的 N个评估代码文档, 其中, N为正整数;
[0126] 根据所述评估指标获取对应的代码检查工具对每一所述评估代码文档进行检测 , 得到每一所述评估代码文档的检测数据;
[0127] 对每一所述评估代码文档的检测数据进行整合, 得到所述用户标识的评估数据
[0128] 根据所述图表类型标识对所述评估数据进行图表化呈现。
[0129] 其中, 所述可读存储介质包括非易失性可读存储介质和易失性可读存储介质。
[0130] 本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程, 是可 以通过计算机可读指令来指令相关的硬件来完成, 所述的计算机可读指令可存 储于一非易失性计算机可读取存储介质中, 该计算机可读指令在执行时, 可包 括如上述各方法的实施例的流程。 其中, 本申请所提供的各实施例中所使用的
对存储器、 存储、 数据库或其它介质的任何引用, 均可包括非易失性和 /或易失 性存储器。 非易失性存储器可包括只读存储器 (ROM) 、 可编程 ROM (PROM ) 、 电可编程 ROM (EPROM) 、 电可擦除可编程 ROM (EEPROM) 或闪存。 易失性存储器可包括随机存取存储器 (RAM) 或者外部高速缓冲存储器。 作为 说明而非局限, RAM以多种形式可得, 诸如静态 RAM (SRAM) 、 动态 RAM ( DRAM) 、 同步 DRAM (SDRAM) 、 双数据率 SDRAM (DDRSDRAM) 、 增强 型 SDRAM (ESDRAM) 、 同步链路 (Synchlink) DRAM (SLDRAM) 、 存储 器总线 (Rambus) 直接 RAM (RDRAM) 、 直接存储器总线动态 RAM (DRDR AM) 、 以及存储器总线动态 RAM (RDRAM) 等。
[0131] 所属领域的技术人员可以清楚地了解到, 为了描述的方便和简洁, 仅以上述各 功能单元、 模块的划分进行举例说明, 实际应用中, 可以根据需要而将上述功 能分配由不同的功能单元、 模块完成, 即将所述装置的内部结构划分成不同的 功能单元或模块, 以完成以上描述的全部或者部分功能。
[0132] 以上所述实施例仅用以说明本申请的技术方案, 而非对其限制; 尽管参照前述 实施例对本申请进行了详细的说明, 本领域的普通技术人员应当理解: 其依然 可以对前述各实施例所记载的技术方案进行修改, 或者对其中部分技术特征进 行等同替换; 而这些修改或者替换, 并不使相应技术方案的本质脱离本申请各 实施例技术方案的精神和范围, 均应包含在本申请的保护范围之内。
Claims
权利要求书
[权利要求 i] 一种代码检测方法, 其特征在于, 包括:
获取代码评估请求, 所述代码评估请求包括用户标识、 图表类型标识 和评估指标;
根据所述用户标识获取对应的 N个评估代码文档, 其中, N为正整数
根据所述评估指标获取对应的代码检查工具对每一所述评估代码文档 进行检测, 得到每一所述评估代码文档的检测数据;
对每一所述评估代码文档的检测数据进行整合, 得到所述用户标识的 评估数据;
根据所述图表类型标识对所述评估数据进行图表化呈现。
[权利要求 2] 如权利要求 1所述的代码检测方法, 其特征在于, 在所述根据所述图 表类型标识对所述评估数据进行图表化呈现之后, 所述代码检测方法 还包括:
获取待比对请求, 所述待比对请求包括比对标识; 根据所述比对标识获取对应的比对评估数据;
[权利要求 3] 如权利要求 2所述的代码检测方法, 其特征在于, 所述根据所述比对 标识获取对应的比对评估数据, 包括:
根据比对标识在服务端中进行查询, 判断服务端中对应的数据库中是 否存在对应的比对评估数据; 若服务端中对应的数据库中存在对应的比对评估数据, 则直接获取该 比对评估数据;
若服务端中对应的数据库中不存在对应的比对评估数据, 则根据比对 标识获取对应的 M个评估代码文档, 其中, M为正整数;
根据所述评估指标获取对应的代码检查工具对每一所述评估代码文档 进行检测, 得到每一所述评估代码文档的检测数据;
对每一所述评估代码文档的检测数据进行整合, 得到所述比对标识的 比对评估数据。
[权利要求 4] 如权利要求 1所述的代码检测方法, 其特征在于, 所述评估代码文档 包括文档日期;
所述对每一所述评估代码文档的检测数据进行整合, 得到所述用户标 识的评估数据, 包括:
获取预设时间区间, 根据所述文档日期和时间区间对所述评估代码文 档进行划分, 得到 K个代码文档集, 其中, K为正整数;
对每一所述代码文档集的检测数据进行整合, 得到每一所述代码文档 集的子评估数据;
将每一所述代码文档集的子评估数据组成所述用户标识的评估数据。
[权利要求 5] 如权利要求 1所述的代码检测方法, 其特征在于, 所述根据所述图表 类型标识对所述评估数据进行图表化呈现, 包括: 获取管理员标识, 根据所述管理员标识获取对应的基础图表列表, 并 在可视化图表配置界面中显不所述基础图表列表; 获取图表选择信息, 所述图表选择信息包括图表类型标识和可视化区 域标识;
根据所述图表类型标识获取对应的数据图表, 在所述数据图表中加载 所述评估数据, 并在可视化界面中所述可视化区域标识对应的可视化 区域进行显示。
[权利要求 6] —种代码检测装置, 其特征在于, 包括:
评估请求获取模块, 用于获取代码评估请求, 所述代码评估请求包括 用户标识、 图表类型标识和评估指标;
评估代码文档获取模块, 用于根据所述用户标识获取对应的 N个评估 代码文档, 其中, N为正整数;
评估代码文档检测模块, 用于根据所述评估指标获取对应的代码检查 工具对每一所述评估代码文档进行检测, 得到每一所述评估代码文档 的检测数据;
评估数据整合模块, 用于对每一所述评估代码文档的检测数据进行整 合, 得到所述用户标识的评估数据;
图表化呈现模块, 用于根据所述图表类型标识对所述评估数据进行图 表化呈现。
[权利要求 7] 如权利要求 6所述的代码检测装置, 其特征在于, 所述代码检测装置 还包括:
待比对请求获取模块, 用于获取待比对请求, 所述待比对请求包括比 对标识;
比对评估数据获取模块, 用于根据所述比对标识获取对应的比对评估 数据;
图表化显示模块, 用于根据所述图表类型标识在可视化界面上对比对 评估数据进行图表化显示。
[权利要求 8] 如权利要求 6所述的代码检测装置, 其特征在于, 所述评估代码文档 包括文档日期;
所述评估数据整合模块包括:
评估代码文档划分单元, 用于获取预设时间区间, 根据所述文档曰期 和时间区间对所述评估代码文档进行划分, 得到 K个代码文档集, 其 中, K为正整数;
子评估数据获取单元, 用于对每一所述代码文档集的检测数据进行整 合, 得到每一所述代码文档集的子评估数据;
评估数据组成单元, 用于将每一所述代码文档集的子评估数据组成所 述用户标识的评估数据。
[权利要求 9] 如权利要求 7所述的代码检测装置, 其特征在于, 所述比对评估数据 获取模块包括比对评估数据判断单元、 比对评估数据获取单元、 评估 代码文档获取单元、 评估代码文档检测单元和比对评估数据整合单元 比对评估数据判断单元, 用于根据比对标识在服务端中进行查询, 判 断服务端中对应的数据库中是否存在对应的比对评估数据;
比对评估数据获取单元, 用于在服务端中对应的数据库中存在对应的 比对评估数据时, 则直接获取该比对评估数据; 评估代码文档获取单元, 用于在服务端中对应的数据库中不存在对应 的比对评估数据时, 则根据比对标识获取对应的 M个评估代码文档, 其中, M为正整数;
评估代码文档检测单元, 用于根据评估指标获取对应的代码检查工具 对每一评估代码文档进行检测, 得到每一评估代码文档的检测数据; 比对评估数据整合单元, 用于对每一评估代码文档的检测数据进行整 合, 得到比对标识的比对评估数据。
[权利要求 10] 如权利要求 6所述的代码检测装置, 其特征在于, 所述图表化呈现模 块包括基础图表列表显示单元、 图表选择信息获取单元和评估数据显 示单元;
基础图表列表显示单元, 用于获取管理员标识, 根据管理员标识获取 对应的基础图表列表, 并在可视化图表配置界面中显不基础图表列表 图表选择信息获取单元, 用于获取图表选择信息, 图表选择信息包括 图表类型标识和可视化区域标识;
评估数据显示单元, 用于根据图表类型标识获取对应的数据图表, 在 数据图表中加载评估数据, 并在可视化界面中可视化区域标识对应的 可视化区域进行显示。
[权利要求 11] 一种计算机设备, 包括存储器、 处理器以及存储在所述存储器中并可 在所述处理器上运行的计算机可读指令, 其特征在于, 所述处理器执 行所述计算机可读指令时实现如下步骤:
获取代码评估请求, 所述代码评估请求包括用户标识、 图表类型标识 和评估指标;
根据所述用户标识获取对应的 N个评估代码文档, 其中, N为正整数 根据所述评估指标获取对应的代码检查工具对每一所述评估代码文档
进行检测, 得到每一所述评估代码文档的检测数据; 对每一所述评估代码文档的检测数据进行整合, 得到所述用户标识的 评估数据;
根据所述图表类型标识对所述评估数据进行图表化呈现。
[权利要求 12] 如权利要求 11所述的计算机设备, 其特征在于, 在所述根据所述图表 类型标识对所述评估数据进行图表化呈现之后, 所述处理器执行所述 计算机可读指令时还实现如下步骤:
获取待比对请求, 所述待比对请求包括比对标识; 根据所述比对标识获取对应的比对评估数据;
[权利要求 13] 如权利要求 12所述的计算机设备, 其特征在于, 所述根据所述比对标 识获取对应的比对评估数据, 包括:
根据比对标识在服务端中进行查询, 判断服务端中对应的数据库中是 否存在对应的比对评估数据; 若服务端中对应的数据库中存在对应的比对评估数据, 则直接获取该 比对评估数据;
若服务端中对应的数据库中不存在对应的比对评估数据, 则根据比对 标识获取对应的 M个评估代码文档, 其中, M为正整数;
根据所述评估指标获取对应的代码检查工具对每一所述评估代码文档 进行检测, 得到每一所述评估代码文档的检测数据;
对每一所述评估代码文档的检测数据进行整合, 得到所述比对标识的 比对评估数据。
[权利要求 14] 如权利要求 11所述的计算机设备, 其特征在于, 所述评估代码文档包 括文档日期;
所述对每一所述评估代码文档的检测数据进行整合, 得到所述用户标 识的评估数据, 包括:
获取预设时间区间, 根据所述文档日期和时间区间对所述评估代码文
档进行划分, 得到 K个代码文档集, 其中, K为正整数; 对每一所述代码文档集的检测数据进行整合, 得到每一所述代码文档 集的子评估数据;
将每一所述代码文档集的子评估数据组成所述用户标识的评估数据。
[权利要求 15] 如权利要求 11所述的计算机设备, 其特征在于, 所述根据所述图表类 型标识对所述评估数据进行图表化呈现, 包括: 获取管理员标识, 根据所述管理员标识获取对应的基础图表列表, 并 在可视化图表配置界面中显不所述基础图表列表; 获取图表选择信息, 所述图表选择信息包括图表类型标识和可视化区 域标识;
根据所述图表类型标识获取对应的数据图表, 在所述数据图表中加载 所述评估数据, 并在可视化界面中所述可视化区域标识对应的可视化 区域进行显示。
[权利要求 16] —个或多个存储有计算机可读指令的可读存储介质, 所述计算机可读 指令被一个或多个处理器执行时, 使得所述一个或多个处理器执行如 下步骤:
获取代码评估请求, 所述代码评估请求包括用户标识、 图表类型标识 和评估指标;
根据所述用户标识获取对应的 N个评估代码文档, 其中, N为正整数 根据所述评估指标获取对应的代码检查工具对每一所述评估代码文档 进行检测, 得到每一所述评估代码文档的检测数据;
对每一所述评估代码文档的检测数据进行整合, 得到所述用户标识的 评估数据;
根据所述图表类型标识对所述评估数据进行图表化呈现。
[权利要求 17] 如权利要求 16所述的可读存储介质, 其特征在于, 在所述根据所述图 表类型标识对所述评估数据进行图表化呈现之后, 所述计算机可读指 令被一个或多个处理器执行时, 使得所述一个或多个处理器还执行如
下步骤:
获取待比对请求, 所述待比对请求包括比对标识; 根据所述比对标识获取对应的比对评估数据;
[权利要求 18] 如权利要求 17所述的可读存储介质, 其特征在于, 所述根据所述比对 标识获取对应的比对评估数据, 包括:
根据比对标识在服务端中进行查询, 判断服务端中对应的数据库中是 否存在对应的比对评估数据; 若服务端中对应的数据库中存在对应的比对评估数据, 则直接获取该 比对评估数据;
若服务端中对应的数据库中不存在对应的比对评估数据, 则根据比对 标识获取对应的 M个评估代码文档, 其中, M为正整数;
根据所述评估指标获取对应的代码检查工具对每一所述评估代码文档 进行检测, 得到每一所述评估代码文档的检测数据;
对每一所述评估代码文档的检测数据进行整合, 得到所述比对标识的 比对评估数据。
[权利要求 19] 如权利要求 16所述的可读存储介质, 其特征在于, 所述评估代码文档 包括文档日期;
所述对每一所述评估代码文档的检测数据进行整合, 得到所述用户标 识的评估数据, 包括:
获取预设时间区间, 根据所述文档日期和时间区间对所述评估代码文 档进行划分, 得到 K个代码文档集, 其中, K为正整数;
对每一所述代码文档集的检测数据进行整合, 得到每一所述代码文档 集的子评估数据;
将每一所述代码文档集的子评估数据组成所述用户标识的评估数据。
[权利要求 20] 如权利要求 16所述的可读存储介质, 其特征在于, 所述根据所述图表 类型标识对所述评估数据进行图表化呈现, 包括:
获取管理员标识, 根据所述管理员标识获取对应的基础图表列表, 并 在可视化图表配置界面中显不所述基础图表列表;
获取图表选择信息, 所述图表选择信息包括图表类型标识和可视化区 域标识;
根据所述图表类型标识获取对应的数据图表, 在所述数据图表中加载 所述评估数据, 并在可视化界面中所述可视化区域标识对应的可视化 区域进行显示。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910048905.9 | 2019-01-18 | ||
| CN201910048905.9A CN109857657A (zh) | 2019-01-18 | 2019-01-18 | 代码检测方法、装置、计算机设备及存储介质 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2020147432A1 true WO2020147432A1 (zh) | 2020-07-23 |
Family
ID=66895165
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2019/121516 Ceased WO2020147432A1 (zh) | 2019-01-18 | 2019-11-28 | 代码检测方法、装置、计算机设备及存储介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN109857657A (zh) |
| WO (1) | WO2020147432A1 (zh) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109857657A (zh) * | 2019-01-18 | 2019-06-07 | 深圳壹账通智能科技有限公司 | 代码检测方法、装置、计算机设备及存储介质 |
| CN111352975B (zh) * | 2020-03-04 | 2024-01-30 | 建信金融科技有限责任公司 | 数据质量管理方法、客户端、服务端和系统 |
| CN112084110B (zh) * | 2020-09-08 | 2024-05-28 | 北京百度网讯科技有限公司 | 数据处理方法、装置、设备以及存储介质 |
| CN113869016A (zh) * | 2021-09-28 | 2021-12-31 | 城云科技(中国)有限公司 | 图表配置方法、装置及计算机程序产品 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20170255547A1 (en) * | 2016-03-02 | 2017-09-07 | Mstar Semiconductor, Inc. | Source code error detection device and method thereof |
| CN108038052A (zh) * | 2017-11-27 | 2018-05-15 | 平安科技(深圳)有限公司 | 自动化测试管理方法、装置、终端设备及存储介质 |
| CN108053117A (zh) * | 2017-12-14 | 2018-05-18 | 北京慧辰资道资讯股份有限公司 | 一种学生学科掌握能力的个性化评估方法 |
| CN108629466A (zh) * | 2017-03-16 | 2018-10-09 | 上海交通大学 | 跨社区的程序员编程能力兴趣评估系统及方法 |
| CN109857657A (zh) * | 2019-01-18 | 2019-06-07 | 深圳壹账通智能科技有限公司 | 代码检测方法、装置、计算机设备及存储介质 |
-
2019
- 2019-01-18 CN CN201910048905.9A patent/CN109857657A/zh active Pending
- 2019-11-28 WO PCT/CN2019/121516 patent/WO2020147432A1/zh not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20170255547A1 (en) * | 2016-03-02 | 2017-09-07 | Mstar Semiconductor, Inc. | Source code error detection device and method thereof |
| CN108629466A (zh) * | 2017-03-16 | 2018-10-09 | 上海交通大学 | 跨社区的程序员编程能力兴趣评估系统及方法 |
| CN108038052A (zh) * | 2017-11-27 | 2018-05-15 | 平安科技(深圳)有限公司 | 自动化测试管理方法、装置、终端设备及存储介质 |
| CN108053117A (zh) * | 2017-12-14 | 2018-05-18 | 北京慧辰资道资讯股份有限公司 | 一种学生学科掌握能力的个性化评估方法 |
| CN109857657A (zh) * | 2019-01-18 | 2019-06-07 | 深圳壹账通智能科技有限公司 | 代码检测方法、装置、计算机设备及存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN109857657A (zh) | 2019-06-07 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2020147432A1 (zh) | 代码检测方法、装置、计算机设备及存储介质 | |
| US20140324866A1 (en) | System for decomposing events from managed infrastructures | |
| CN111026647B (zh) | 代码覆盖率的获取方法、装置、计算机设备和存储介质 | |
| CN114049631A (zh) | 一种数据标注的方法、装置、计算机设备和存储介质 | |
| CN110502531A (zh) | 报表数据校验方法、装置、计算机设备和存储介质 | |
| CN106327546B (zh) | 人脸检测算法的测试方法和装置 | |
| RU2653302C2 (ru) | Система для обеспечения потока операций бизнес-процесса | |
| CN111598707A (zh) | 一种页面的生成方法及电子设备 | |
| US20160042051A1 (en) | Decomposing events from managed infrastructures using graph entropy | |
| CN109800445A (zh) | 基于bim技术实现可视化辅助评标的处理方法和系统 | |
| US20200286100A1 (en) | Payment complaint method, device, server and readable storage medium | |
| WO2020258650A1 (zh) | 页面信息显示方法、装置、计算机设备和存储介质 | |
| CN114880238A (zh) | 移动端界面测试方法、装置、设备及存储介质 | |
| CN114579461A (zh) | 浏览器兼容性检测方法及相关设备 | |
| CN110689224A (zh) | 坐席能力分析方法、装置、电子设备及存储介质 | |
| US20220245591A1 (en) | Membership analyzing method, apparatus, computer device and storage medium | |
| CN115953799B (zh) | 巡检数据处理方法、装置、计算机设备及存储介质 | |
| CN112083925A (zh) | 基于h5页面开发的数据获取方法、装置、设备及存储介质 | |
| CN110764745B (zh) | 变量的传输和收集方法、装置及计算机可读存储介质 | |
| WO2018228001A1 (zh) | 电子装置、信息查询控制方法和计算机可读存储介质 | |
| WO2021036681A1 (zh) | 数据验证方法、装置、计算机设备和存储介质 | |
| JP7670413B2 (ja) | 可視化ミラージュの表面化 | |
| CN110297754A (zh) | 一种测试信息反馈方法及系统 | |
| CN109544661B (zh) | 面积图绘制方法、装置、计算机设备和存储介质 | |
| CN113326202A (zh) | Ui自动化测试代码生成方法、装置、设备及介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19910274 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 03.11.2021) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 19910274 Country of ref document: EP Kind code of ref document: A1 |