WO2019184159A1 - Application program code detection method, device, server and medium - Google Patents

Application program code detection method, device, server and medium Download PDF

Info

Publication number
WO2019184159A1
WO2019184159A1 PCT/CN2018/097115 CN2018097115W WO2019184159A1 WO 2019184159 A1 WO2019184159 A1 WO 2019184159A1 CN 2018097115 W CN2018097115 W CN 2018097115W WO 2019184159 A1 WO2019184159 A1 WO 2019184159A1
Authority
WO
WIPO (PCT)
Prior art keywords
code
user terminal
program code
abnormal
historical
Prior art date
Application number
PCT/CN2018/097115
Other languages
French (fr)
Chinese (zh)
Inventor
温素剑
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2019184159A1 publication Critical patent/WO2019184159A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/43Checking; Contextual analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3628Software debugging of optimised code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/72Code refactoring
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/75Structural analysis for program understanding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44589Program code verification, e.g. Java bytecode verification, proof-carrying code

Definitions

  • the present application belongs to the field of data processing technologies, and in particular, to an application code detection method, apparatus, server, and medium.
  • the embodiment of the present application provides an application code detection method and a server, so as to solve the problem that after the test environment is deployed on the initially completed program code, the program code is returned, causing time resources. The problem of wasting.
  • a first aspect of the embodiments of the present application provides an application code detection method, including:
  • a certain program code block includes an abnormality code corresponding to the historical abnormality information in the historical abnormal code database, determining a user terminal identifier corresponding to the program code block, and corresponding to the determined user terminal identifier
  • the user terminal sends a code exception warning message.
  • a second aspect of the embodiments of the present application provides an application code detecting apparatus, including:
  • a code receiving module configured to acquire program code blocks generated by each user terminal, each program code block corresponding to one user terminal identifier, and different program code blocks sent by the same user terminal correspond to the same user terminal identifier;
  • a detecting module configured to detect, according to the historical abnormal code database, whether the program code block sent by each user terminal includes an abnormal code that matches a historical abnormal code in the historical abnormal code database; wherein the historical abnormal code database Includes multiple historical exception codes;
  • a warning module configured to: when detecting that an abnormal code corresponding to the historical abnormality information in the historical abnormal code database is included in a certain program code block, determine a user terminal identifier corresponding to the program code block, and determine the The user terminal corresponding to the user terminal identifier sends a code abnormal warning message.
  • a third aspect of the embodiments of the present application provides a server, including a memory, a processor, and the computer storing computer readable instructions executable on the processor, the processor executing the computer readable The following steps are implemented when the instruction is executed:
  • a certain program code block includes an abnormality code corresponding to the historical abnormality information in the historical abnormal code database, determining a user terminal identifier corresponding to the program code block, and corresponding to the determined user terminal identifier
  • the user terminal sends a code exception warning message.
  • a fourth aspect of the embodiments of the present application provides a computer readable storage medium storing computer readable instructions, wherein the computer readable instructions are implemented by at least one processor The following steps:
  • a certain program code block includes an abnormality code corresponding to the historical abnormality information in the historical abnormal code database, determining a user terminal identifier corresponding to the program code block, and corresponding to the determined user terminal identifier
  • the user terminal sends a code exception warning message.
  • a program code block generated by each user terminal is first acquired, and each program terminal code sent by each user terminal corresponds to a user terminal identifier; and then, according to the historical abnormal code database, the program code block sent by each user terminal is detected. Whether or not the exception code matching the historical exception code in the historical exception code database is included; when it is detected that a certain program code block contains an exception code corresponding to the historical exception information in the historical exception code database Determining a user terminal identifier corresponding to the program code block, and sending code abnormality warning information to the determined user terminal corresponding to the user terminal identifier, so the foregoing method can acquire the program code block generated by each user terminal in the application development process.
  • FIG. 1 is a flowchart of an application code detecting method provided by an embodiment of the present application.
  • step S102 in FIG. 1 is a flowchart of an implementation of step S102 in FIG. 1;
  • FIG. 3 is a flowchart of an implementation of step S201 in FIG. 2;
  • FIG. 4 is a schematic diagram of an operating environment of an application code detection program according to an embodiment of the present application.
  • FIG. 5 is a program module diagram of an application code detection program according to an embodiment of the present application.
  • FIG. 1 is a flowchart showing an implementation process of an application code detection method according to Embodiment 1 of the present application, which is described in detail as follows:
  • Step S101 Acquire a program code block generated by each user terminal.
  • Each program code block corresponds to one user terminal identifier, and different program code blocks sent by the same user terminal correspond to the same user terminal identifier.
  • each user terminal corresponds to an application technology developer, and each technology developer is responsible for the development of a part of the application code of the application, for example, each technical developer is responsible for the development of a functional module of the application, or multiple technical developments.
  • the person responsible for the development of a functional module of the application is not limited.
  • the development software When a technology developer develops an application part that is responsible for it, the development software usually blocks the completed program code to form a program code block. At this point, the application block can be actively acquired to detect the program code block and whether there is an exception code. How to detect whether the program code block contains the exception code part of the content is elaborated in the next step, and will not be explained too much here.
  • the program code may be java code, js code, html code, xml code or sql script code, etc., and is not limited thereto.
  • Step S102 detecting, according to the historical abnormal code database, whether the program code block sent by each user terminal includes an abnormal code matching the historical abnormal code in the historical abnormal code database.
  • the historical abnormal code database may include a plurality of historical abnormal codes.
  • the historical exception code can be an exception code obtained before the current time. For example, it can be an exception code detected by each technical employee within a department when the application was previously developed.
  • the exception code can be a bug (bug) contained in the program code block.
  • the generation of the exception code may be due to insufficient experience of the technology developer. Specifically, when developing an application, a technical developer may have an abnormal code (such as a trap) in the target file that cannot be foreseen by the technology developer due to lack of experience.
  • step S102 can be implemented by the following process:
  • Step S201 determining a detection manner corresponding to the program code block sent by each user terminal.
  • the detection mode may include a skip scan detection mode, a partial scan detection mode, and all scan detection modes.
  • the skip scan detection mode is that the program code block can not be scanned and detected, and the partial scan detection mode can perform partial scan detection on the program code block, and all scan detection methods require that all scan detection of the program code block be performed.
  • step S201 can be implemented by the following process:
  • Step S301 Acquire a history code error rate of each user terminal.
  • the historical code error rate of the user terminal is a historical code error rate corresponding to the program code generated by the user terminal. For example, a total of X program code blocks are produced by a certain user terminal, and when there are Y program code blocks including the abnormal code, and Y is less than or equal to X, the history code error rate of the user terminal is Y/X.
  • Step S302 determining a detection mode for each program code block according to the history code error rate and the function of each program code.
  • the detection mode of the program code block is determined according to the history code error rate of the user terminal and the function of the corresponding program code.
  • a first threshold can be set for the history code error rate. Specifically, for a user terminal whose history code error rate is greater than the first threshold, the detection mode corresponding to the program code block generated by the user terminal is all scan detection modes; and for the user terminal whose history code error rate is less than the first threshold, if the program code is The function of the function is the core function, and the detection mode corresponding to the program code block generated by the user terminal is all scanning detection mode. If the function of the program code is a non-core function, the detection mode corresponding to the program code block generated by the user terminal is part Scan detection method. For a user terminal whose history code has an error rate of zero, the detection mode corresponding to the program code block generated by the user terminal is a skip scan detection mode;
  • the detection mode can be replaced. For example, if the historical error rate of the program code block corresponding to a certain user terminal is always lower than the first threshold within the preset duration, the entire scan detection mode may be replaced with the partial scan detection mode; the program code block within the preset duration When the historical error rate is always zero, the partial scan detection method can be replaced with the ignore scan detection method.
  • the program code blocks generated by different user terminals are detected by corresponding detection manners, and different detection modes of the program code blocks can be detected in a targeted manner to reduce unnecessary program code blocks generated by some user terminals.
  • the detection time reduces the detection time of the entire application code, and also ensures the detection accuracy of the program code block and improves the detection efficiency of the program code block.
  • Step S202 according to the historical abnormal code database, detecting each program code by a detection mode corresponding to each program code block, and determining whether each program code block includes an abnormality matching the historical abnormal code in the historical abnormal code database.
  • the detection manner may include multiple types, such as a skip scan detection mode, a partial scan detection mode, and all scan detection modes.
  • the historical abnormal code database includes three types of historical abnormal codes, which are a first type of historical abnormal code and a second type of historical abnormal code; and the program code blocks generated by each user terminal are classified into two types according to a preset rule. They are a first type of program code block and a second type of program code block.
  • the first type of program code block is a program code block corresponding to the core function, corresponding to the first type of historical exception code;
  • the second type of program code block is a program code block corresponding to the non-core function, corresponding to the second type of historical abnormal code .
  • the program code block belonging to the first type of program code block and the program code block belonging to the second type of program code block are scanned and detected according to the corresponding detection manner, specifically Refer to the related content in step S302, and details are not described herein again.
  • the determining, by using each of the program code blocks, an exception code that matches a historical exception code in the historical exception code database may be: for each program code block, by using a keyword and a pre- The algorithm is configured to perform scan detection to detect whether each program code block contains an exception code that is the same as or similar to the historical exception code.
  • the code in the program code block is identical to the historical exception code, or the similarity between the code in the program code block and the historical exception code exceeds a similar threshold, it can be determined that the program code block contains the historical exception. Exception code with the same or similar code.
  • step S102 may further include: determining that the abnormal code is in the program code block when it is determined that the program code block includes an abnormal code matching the historical abnormal code in the historical abnormal code database. location information. Specifically, the location code information of the exception code in the program code block may be acquired while determining that the program code block includes the exception code matching the historical exception code in the historical exception code database.
  • Step S103 when detecting that an abnormal code corresponding to the historical abnormality information in the historical abnormal code database is included in a certain program code block, determining a user terminal identifier corresponding to the program code block, and determining the user terminal identifier The user terminal corresponding to the terminal identifier sends a code abnormal warning message.
  • the sending the code abnormality warning information to the user terminal corresponding to the determined user terminal identifier includes: generating the code abnormality by using location information of the abnormal code in the program code block and a reference code corresponding to the abnormal code. The information is alerted and sent to the corresponding user terminal.
  • the reference code is a program code for technical developers to refer to, so that the technical developer can correct the abnormal code according to the reference code.
  • the reference code can be derived from the statistical history program code. For example, when the historical abnormal code is determined, the corresponding reference code is also stored in the historical abnormal code database in one-to-one correspondence with the historical abnormal code.
  • the foregoing application code detecting method may further include: acquiring the number of program code blocks including the abnormal code detected within the preset time period, and according to the program code block including the abnormal code. The number displays the correspondence between the number of program code blocks including the exception code and each user terminal.
  • the correspondence between the number of program code blocks including the abnormal code and each user terminal can be displayed through the scoreboard.
  • the display area of the scoreboard can be divided into multiple areas, each area corresponding to a team, and the information of the team is displayed: the number of program code errors (which may include monthly error numbers and annual error counts), number of teams, history Error rate (which can include monthly historical error rate and annual historical error rate), completion progress (which can include monthly completion progress and annual completion progress), etc., and each team based on the number of program errors, historical error rate, and completion progress Rankings are performed, and the ranking changes of each team are marked by preset features.
  • the monthly historical error rate is the number of program code blocks for monthly errors divided by the total number of program code blocks completed in a month.
  • the annual history error rate is the number of program code blocks that are erroneous during the year divided by the total number of program code blocks completed in the year.
  • the public information can be displayed in the same way, for example, the display technology developer: the number of program code errors (which can include monthly error counts and annual error counts), historical error rate (can include monthly historical error rate and annual Historical error rate), completion progress (which may include monthly completion progress and annual completion progress), etc., and ranking each technical developer according to the number of program errors, historical error rate, and completion progress, and through preset feature pairs The ranking changes of various technology developers are marked.
  • the display technology developer the number of program code errors (which can include monthly error counts and annual error counts), historical error rate (can include monthly historical error rate and annual Historical error rate), completion progress (which may include monthly completion progress and annual completion progress), etc.
  • the above application code detecting method first acquires a program code block generated by each user terminal, and each program terminal block sent by the user terminal corresponds to a user terminal identifier; and then detects a program code block sent by each user terminal according to the historical abnormal code database. Whether the exception code matching the historical exception code in the historical exception code database is included; detecting that a certain program code block contains an exception code corresponding to the historical exception information in the historical exception code database Determining, by the user terminal identifier corresponding to the program code block, and sending the code abnormality warning information to the determined user terminal corresponding to the user terminal identifier, the foregoing method can acquire the program code block generated by each user terminal in the application development process.
  • FIG. 4 is a schematic diagram showing an operating environment of the application code detection program provided by the embodiment of the present application. For the convenience of explanation, only the parts related to the present embodiment are shown.
  • the application code detection program 400 is installed and runs in the server 40.
  • the server 40 can include, but is not limited to, a memory 401 and a processor 402.
  • Figure 5 shows only server 40 with components 401-402, but it should be understood that not all illustrated components may be implemented, and more or fewer components may be implemented instead.
  • the memory 401 may be an internal storage unit of the server 40, such as a hard disk or memory of the server 40, in some embodiments.
  • the memory 401 may also be an external storage device of the server 40 in other embodiments, such as a plug-in hard disk equipped on the server 40, a smart memory card (SMC), and a secure digital number (Secure). Digital, SD) cards, flash cards, etc.
  • the memory 401 may also include both an internal storage unit of the terminal device 40 and an external storage device.
  • the memory 401 is configured to store application software and various types of data installed in the server 40, such as program codes of the application code detection program 400, and the like.
  • the memory 401 can also be used to temporarily store data that has been output or is about to be output.
  • the processor 402 in some embodiments, can be a central processor (Central) A processing unit (CPU), a microprocessor or other data processing chip for running program code or processing data stored in the memory 401, such as executing the application code detecting program 400 and the like.
  • CPU central processor
  • microprocessor or other data processing chip for running program code or processing data stored in the memory 401, such as executing the application code detecting program 400 and the like.
  • the server 40 can also include a display, which in some embodiments can be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic) Light-Emitting Diode, organic light-emitting diodes, etc.
  • a display which in some embodiments can be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic) Light-Emitting Diode, organic light-emitting diodes, etc.
  • FIG. 5 is a program module diagram of the application code detection program 400 provided by the embodiment of the present application.
  • the application code detection program 400 may be divided into one or more modules, the one or more modules being stored in the memory 401 and being processed by one or more processors ( This embodiment is executed by the processor 402) to complete the application.
  • the application code detection program 400 can be divided into a code receiving module 501, a detecting module 502, and a warning module 503.
  • a module as referred to in this application refers to a series of computer readable instruction instructions that are capable of performing a particular function, and are more suitable than the program to describe the execution of the application code detection program 400 in the server 40. The following description will specifically describe the functions of the modules 501-503.
  • the code receiving module 501 is configured to obtain a program code block generated by each user terminal, where each program code block corresponds to one user terminal identifier, and different program code blocks sent by the same user terminal correspond to the same user terminal identifier.
  • the detecting module 502 is configured to detect, according to the historical abnormal code database, whether the program code block sent by each user terminal includes an abnormal code that matches a historical abnormal code in the historical abnormal code database; wherein the historical abnormal code
  • the database includes multiple historical exception codes.
  • the warning module 503 is configured to: when detecting that the abnormal code corresponding to the historical abnormality information in the historical abnormal code database is included in a certain program code block, determine the user terminal identifier corresponding to the program code block, and The user terminal corresponding to the determined user terminal identifier sends a code abnormal warning message.
  • the detection module 502 can be used to:
  • each program code is detected by a detection method corresponding to each program code block, and it is determined whether or not each program code block includes an abnormal code matching the historical abnormal code in the history abnormal code database.
  • the process of the detecting module 502 determining the detection manner corresponding to the program code block sent by each user terminal may include:
  • a history code error rate of the user terminal is a history code error rate corresponding to the program code generated by the user terminal;
  • the detection method for each program code block is determined based on the history code error rate and the function of each program code.
  • the detecting module 502 is further configured to determine location information of the exception code in the program code block when determining that the program code block includes an exception code that matches the historical exception code in the historical exception code database;
  • the alert module 503 is configured to generate the code abnormality alert information by using the location information of the exception code in the program code block and the reference code corresponding to the exception code, and send the code abnormality alert information to the corresponding user terminal.
  • application code detection program 400 can also be divided into:
  • a display module configured to acquire the number of program code blocks including the exception code detected within the preset time period, and display the number of program code blocks including the exception code according to the number of program code blocks including the exception code Correspondence with each user terminal.
  • the disclosed device/terminal device and method may be implemented in other manners.
  • the device/terminal device embodiments described above are merely illustrative.
  • the division of the modules or units is only a logical function division.
  • there may be another division manner for example, multiple units.
  • components may be combined or integrated into another system, or some features may be omitted or not performed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated modules/units if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium.
  • the present application implements all or part of the processes in the foregoing embodiments, and may also be implemented by computer readable instructions, which may be stored in a computer readable storage medium.
  • the computer readable instructions when executed by a processor, may implement the steps of the various method embodiments described above.
  • the computer readable instructions comprise computer readable instruction code, which may be in the form of source code, an object code form, an executable file or some intermediate form or the like.
  • the computer readable medium can include any entity or device capable of carrying the computer readable instruction code, a recording medium, a USB flash drive, a removable hard drive, a magnetic disk, an optical disk, a computer memory, a read only memory (ROM, Read-Only) Memory), random access memory (RAM, Random) Access Memory), electrical carrier signals, telecommunications signals, and software distribution media.
  • ROM Read Only memory
  • RAM Random Access Memory
  • electrical carrier signals telecommunications signals
  • telecommunications signals and software distribution media. It should be noted that the content contained in the computer readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in a jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, computer readable media Does not include electrical carrier signals and telecommunication signals.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Computer Security & Cryptography (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present application is applicable to the technical field of computer security, and provides an application program code detection method, device, server and medium. The method comprises: acquiring program code blocks generated by each user terminal, each program code block being corresponding to one user terminal identifier, and the different program code blocks sent by a same user terminal being corresponding to a same user terminal identifier; detecting, according to a historical abnormal code database, whether the program code blocks sent by the each user terminal contain an abnormal code which matches the historical abnormal code of the historical abnormal code database; and when it is detected that a certain program code block contains an abnormal code corresponding to the historical abnormal information in the historical abnormal code database, determining the user terminal identifier corresponding to the program code block, and sending code abnormal warning information to the user terminal corresponding to the determined user terminal identifier. The method can prevent the problem that the program code return may occur after testing the environment on the program code block deployment.

Description

一种应用程序代码检测方法、装置、服务器及介质Application code detection method, device, server and medium
本申请要求于2018年03月30日提交中国专利局、申请号为201810276623.X 、发明名称为“应用程序代码检测方法及服务器”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 201, 810, 276, 623, filed on March 30, 2018, and entitled "Application Code Detection Method and Server", the entire contents of which are incorporated herein by reference. In the application.
技术领域Technical field
本申请属于数据处理技术领域,尤其涉及一种应用程序代码检测方法、装置、服务器及介质。The present application belongs to the field of data processing technologies, and in particular, to an application code detection method, apparatus, server, and medium.
背景技术Background technique
在对应用程序开发的过程中,需要对相应的程序代码做持续集成,而在对相应的程序代码做持续集成时,各个技术开发人员的关注重点往往在于提交版本构建上,而忽略了程序代码自身可能存在的问题。在对初步完成后的程序代码部署上测试环境后,很可能会接连出现一些问题导致初步完成的程序代码被退回,造成时间资源上的浪费。In the process of application development, continuous integration of the corresponding program code is required. When the corresponding program code is continuously integrated, the focus of each technology developer is often on the commit version build, and the program code is ignored. Possible problems with yourself. After the test environment is deployed on the initial completion of the program code, it is likely that some problems will occur successively, causing the initially completed program code to be returned, resulting in wasted time resources.
技术问题technical problem
有鉴于此,本申请实施例提供了应用程序代码检测方法及服务器,以解决在对应用程序开发的过程中对初步完成的程序代码部署上测试环境后出现问题导致程序代码被退回,造成时间资源上浪费的问题。In view of this, the embodiment of the present application provides an application code detection method and a server, so as to solve the problem that after the test environment is deployed on the initially completed program code, the program code is returned, causing time resources. The problem of wasting.
技术解决方案Technical solution
本申请实施例的第一方面提供了一种应用程序代码检测方法,包括:A first aspect of the embodiments of the present application provides an application code detection method, including:
获取各个用户终端生成的程序代码块,每个程序代码块均对应一个用户终端标识,且相同用户终端发送的不同的程序代码块对应同一个用户终端标识;Obtaining program code blocks generated by each user terminal, each program code block corresponding to one user terminal identifier, and different program code blocks sent by the same user terminal correspond to the same user terminal identifier;
根据历史异常代码数据库,检测各个用户终端发送的程序代码块中是否包含有与所述历史异常代码数据库中的历史异常代码相匹配的异常代码;其中,所述历史异常代码数据库中包括多条历史异常代码;Detecting, according to the historical abnormal code database, whether the program code block sent by each user terminal includes an abnormal code matching the historical abnormal code in the historical abnormal code database; wherein the historical abnormal code database includes multiple pieces of history Exception code
在检测到某个程序代码块中包含有与所述历史异常代码数据库中的历史异常信息相对应的异常代码时,确定该程序代码块对应的用户终端标识,并向所确定的用户终端标识对应的用户终端发送代码异常警示信息。When it is detected that a certain program code block includes an abnormality code corresponding to the historical abnormality information in the historical abnormal code database, determining a user terminal identifier corresponding to the program code block, and corresponding to the determined user terminal identifier The user terminal sends a code exception warning message.
本申请实施例的第二方面提供了一种应用程序代码检测装置,包括:A second aspect of the embodiments of the present application provides an application code detecting apparatus, including:
代码接收模块,用于获取各个用户终端生成的程序代码块,每个程序代码块均对应一个用户终端标识,且相同用户终端发送的不同的程序代码块对应同一个用户终端标识;a code receiving module, configured to acquire program code blocks generated by each user terminal, each program code block corresponding to one user terminal identifier, and different program code blocks sent by the same user terminal correspond to the same user terminal identifier;
检测模块,用于根据历史异常代码数据库,检测各个用户终端发送的程序代码块中是否包含有与所述历史异常代码数据库中的历史异常代码相匹配的异常代码;其中,所述历史异常代码数据库中包括多条历史异常代码;a detecting module, configured to detect, according to the historical abnormal code database, whether the program code block sent by each user terminal includes an abnormal code that matches a historical abnormal code in the historical abnormal code database; wherein the historical abnormal code database Includes multiple historical exception codes;
警示模块,用于在检测到某个程序代码块中包含有与所述历史异常代码数据库中的历史异常信息相对应的异常代码时,确定该程序代码块对应的用户终端标识,并向所确定的用户终端标识对应的用户终端发送代码异常警示信息。a warning module, configured to: when detecting that an abnormal code corresponding to the historical abnormality information in the historical abnormal code database is included in a certain program code block, determine a user terminal identifier corresponding to the program code block, and determine the The user terminal corresponding to the user terminal identifier sends a code abnormal warning message.
本申请实施例的第三方面提供了一种服务器,包括存储器、处理器,所述存储器上存储有可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:A third aspect of the embodiments of the present application provides a server, including a memory, a processor, and the computer storing computer readable instructions executable on the processor, the processor executing the computer readable The following steps are implemented when the instruction is executed:
获取各个用户终端生成的程序代码块,每个程序代码块均对应一个用户终端标识,且相同用户终端发送的不同的程序代码块对应同一个用户终端标识;Obtaining program code blocks generated by each user terminal, each program code block corresponding to one user terminal identifier, and different program code blocks sent by the same user terminal correspond to the same user terminal identifier;
根据历史异常代码数据库,检测各个用户终端发送的程序代码块中是否包含有与所述历史异常代码数据库中的历史异常代码相匹配的异常代码;其中,所述历史异常代码数据库中包括多条历史异常代码;Detecting, according to the historical abnormal code database, whether the program code block sent by each user terminal includes an abnormal code matching the historical abnormal code in the historical abnormal code database; wherein the historical abnormal code database includes multiple pieces of history Exception code
在检测到某个程序代码块中包含有与所述历史异常代码数据库中的历史异常信息相对应的异常代码时,确定该程序代码块对应的用户终端标识,并向所确定的用户终端标识对应的用户终端发送代码异常警示信息。When it is detected that a certain program code block includes an abnormality code corresponding to the historical abnormality information in the historical abnormal code database, determining a user terminal identifier corresponding to the program code block, and corresponding to the determined user terminal identifier The user terminal sends a code exception warning message.
本申请实施例的第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,其特征在于,所述计算机可读指令被至少一个处理器执行时实现如下步骤:A fourth aspect of the embodiments of the present application provides a computer readable storage medium storing computer readable instructions, wherein the computer readable instructions are implemented by at least one processor The following steps:
获取各个用户终端生成的程序代码块,每个程序代码块均对应一个用户终端标识,且相同用户终端发送的不同的程序代码块对应同一个用户终端标识;Obtaining program code blocks generated by each user terminal, each program code block corresponding to one user terminal identifier, and different program code blocks sent by the same user terminal correspond to the same user terminal identifier;
根据历史异常代码数据库,检测各个用户终端发送的程序代码块中是否包含有与所述历史异常代码数据库中的历史异常代码相匹配的异常代码;其中,所述历史异常代码数据库中包括多条历史异常代码;Detecting, according to the historical abnormal code database, whether the program code block sent by each user terminal includes an abnormal code matching the historical abnormal code in the historical abnormal code database; wherein the historical abnormal code database includes multiple pieces of history Exception code
在检测到某个程序代码块中包含有与所述历史异常代码数据库中的历史异常信息相对应的异常代码时,确定该程序代码块对应的用户终端标识,并向所确定的用户终端标识对应的用户终端发送代码异常警示信息。When it is detected that a certain program code block includes an abnormality code corresponding to the historical abnormality information in the historical abnormal code database, determining a user terminal identifier corresponding to the program code block, and corresponding to the determined user terminal identifier The user terminal sends a code exception warning message.
有益效果Beneficial effect
本申请实施例中,首先获取各个用户终端生成的程序代码块,每个用户终端发送的程序代码块均对应一个用户终端标识;然后根据历史异常代码数据库,检测各个用户终端发送的程序代码块中是否包含有与所述历史异常代码数据库中的历史异常代码相匹配的异常代码;在检测到某个程序代码块中包含有与所述历史异常代码数据库中的历史异常信息相对应的异常代码时,确定该程序代码块对应的用户终端标识,并向所确定的用户终端标识对应的用户终端发送代码异常警示信息,因此上述方法能够在应用程序开发过程中获取各个用户终端生成的程序代码块,并对各个程序代码块进行检测,在检测到程序代码块存在异常代码时,发出警示信息给对应的用户终端,以提醒对应的技术开发人员进行修改,从而能够防止在对程序代码块部署上测试环境后可能出现的退回问题,能够节约应用程序开发流程对应的时间。In the embodiment of the present application, a program code block generated by each user terminal is first acquired, and each program terminal code sent by each user terminal corresponds to a user terminal identifier; and then, according to the historical abnormal code database, the program code block sent by each user terminal is detected. Whether or not the exception code matching the historical exception code in the historical exception code database is included; when it is detected that a certain program code block contains an exception code corresponding to the historical exception information in the historical exception code database Determining a user terminal identifier corresponding to the program code block, and sending code abnormality warning information to the determined user terminal corresponding to the user terminal identifier, so the foregoing method can acquire the program code block generated by each user terminal in the application development process. And detecting each program code block, when detecting that there is an abnormal code in the program code block, issuing a warning message to the corresponding user terminal to remind the corresponding technical developer to modify, thereby preventing the test on the program code block deployment. May be out after the environment The return problem, can save application development process corresponding period.
附图说明DRAWINGS
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the embodiments or the prior art description will be briefly described below. Obviously, the drawings in the following description are only the present application. For some embodiments, other drawings may be obtained from those of ordinary skill in the art in light of the inventive workability.
图1是本申请实施例提供的应用程序代码检测方法的流程图;1 is a flowchart of an application code detecting method provided by an embodiment of the present application;
图2是图1中步骤S102的实现流程图;2 is a flowchart of an implementation of step S102 in FIG. 1;
图3是图2中步骤S201的实现流程图;FIG. 3 is a flowchart of an implementation of step S201 in FIG. 2;
图4是本申请实施例提供的应用程序代码检测程序的运行环境示意图;4 is a schematic diagram of an operating environment of an application code detection program according to an embodiment of the present application;
图5是本申请实施例提供的应用程序代码检测程序的程序模块图。FIG. 5 is a program module diagram of an application code detection program according to an embodiment of the present application.
本发明的实施方式Embodiments of the invention
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。In the following description, for purposes of illustration and description However, it will be apparent to those skilled in the art that the present invention may be practiced in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the application.
为了说明本申请所述的技术方案,下面通过具体实施例来进行说明。In order to explain the technical solutions described in the present application, the following description will be made by way of specific embodiments.
实施例一Embodiment 1
图1示出了本申请实施例一提供的应用程序代码检测方法的实现流程,详述如下:FIG. 1 is a flowchart showing an implementation process of an application code detection method according to Embodiment 1 of the present application, which is described in detail as follows:
步骤S101,获取各个用户终端生成的程序代码块。Step S101: Acquire a program code block generated by each user terminal.
其中,每个程序代码块均对应一个用户终端标识,且相同用户终端发送的不同程序代码块对应同一个用户终端标识。Each program code block corresponds to one user terminal identifier, and different program code blocks sent by the same user terminal correspond to the same user terminal identifier.
例如,每个用户终端对应一个应用程序技术开发人员,每个技术开发人员负责应用程序的一部分程序代码的开发,例如每个技术开发人员负责应用程序的一个功能模块的开发,或者多个技术开发人员负责应用程序的一个功能模块的开发,对此不予限定。For example, each user terminal corresponds to an application technology developer, and each technology developer is responsible for the development of a part of the application code of the application, for example, each technical developer is responsible for the development of a functional module of the application, or multiple technical developments. The person responsible for the development of a functional module of the application is not limited.
技术开发人员在对自己负责的应用程序部分进行开发时,开发软件通常会将完成的程序代码进行封块,形成程序代码块。此时,可以主动获取该应用程序块,以对该程序代码块进行检测,是否有异常代码。如何检测程序代码块中是否包含异常代码部分内容在后续步骤中详细阐述,在此不再过多说明。When a technology developer develops an application part that is responsible for it, the development software usually blocks the completed program code to form a program code block. At this point, the application block can be actively acquired to detect the program code block and whether there is an exception code. How to detect whether the program code block contains the exception code part of the content is elaborated in the next step, and will not be explained too much here.
本实施例中,程序代码可以为java代码、js代码、html代码、xml代码或sql脚本代码等,不以此为限。In this embodiment, the program code may be java code, js code, html code, xml code or sql script code, etc., and is not limited thereto.
步骤S102,根据历史异常代码数据库,检测各个用户终端发送的程序代码块中是否包含有与所述历史异常代码数据库中的历史异常代码相匹配的异常代码。Step S102, detecting, according to the historical abnormal code database, whether the program code block sent by each user terminal includes an abnormal code matching the historical abnormal code in the historical abnormal code database.
其中,所述历史异常代码数据库中可以包括多条历史异常代码。历史异常代码可以为在当前时间之前所获取到的异常代码,例如,可以为一个部门内部的各个技术员工在之前开发应用程序时所检测出的异常代码。The historical abnormal code database may include a plurality of historical abnormal codes. The historical exception code can be an exception code obtained before the current time. For example, it can be an exception code detected by each technical employee within a department when the application was previously developed.
另外,异常代码可以是程序代码块中所包含的BUG(漏洞),异常代码的产生可能是由于技术开发人员的经验不够导致的。具体的,技术开发人员在开发应用程序时,由于经验不足可能导致目标文件中存在该技术开发人员不能预见到的异常代码(例如陷井)。In addition, the exception code can be a bug (bug) contained in the program code block. The generation of the exception code may be due to insufficient experience of the technology developer. Specifically, when developing an application, a technical developer may have an abnormal code (such as a trap) in the target file that cannot be foreseen by the technology developer due to lack of experience.
参见图2,一个实施例中,步骤S102可以通过以下过程实现:Referring to FIG. 2, in an embodiment, step S102 can be implemented by the following process:
步骤S201,确定各个用户终端发送的程序代码块对应的检测方式。Step S201, determining a detection manner corresponding to the program code block sent by each user terminal.
本实施例中,检测方式可以包括跳过扫描检测方式、部分扫描检测方式和全部扫描检测方式等。其中,跳过扫描检测方式为可以不对程序代码块进行扫描检测,部分扫描检测方式为可以对程序代码块进行部分扫描检测,全部扫描检测方式为需要对程序代码块进行全部扫描检测。In this embodiment, the detection mode may include a skip scan detection mode, a partial scan detection mode, and all scan detection modes. The skip scan detection mode is that the program code block can not be scanned and detected, and the partial scan detection mode can perform partial scan detection on the program code block, and all scan detection methods require that all scan detection of the program code block be performed.
参见图3,作为一种可实施方式,步骤S201可以通过以下过程实现:Referring to FIG. 3, as an implementable manner, step S201 can be implemented by the following process:
步骤S301,获取各个用户终端的历史代码出错率。Step S301: Acquire a history code error rate of each user terminal.
其中,用户终端的历史代码出错率为通过用户终端生成的程序代码对应的历史代码出错率。例如,通过某个用户终端共生产X个程序代码块,而检测到包含异常代码的程序代码块有Y个,Y小于或等于X,则该用户终端的历史代码出错率为Y/X。The historical code error rate of the user terminal is a historical code error rate corresponding to the program code generated by the user terminal. For example, a total of X program code blocks are produced by a certain user terminal, and when there are Y program code blocks including the abnormal code, and Y is less than or equal to X, the history code error rate of the user terminal is Y/X.
步骤S302,根据所述历史代码出错率和各个程序代码的功能,确定对各个程序代码块的检测方式。Step S302, determining a detection mode for each program code block according to the history code error rate and the function of each program code.
其中,对于某个用户终端,根据该用户终端的历史代码出错率和对应的程序代码的功能,确定对程序代码块的检测方式。Wherein, for a certain user terminal, the detection mode of the program code block is determined according to the history code error rate of the user terminal and the function of the corresponding program code.
例如,对于历史代码出错率可以设置第一阈值。具体的,对于历史代码出错率大于第一阈值的用户终端,该用户终端生成的程序代码块对应的检测方式为全部扫描检测方式;对于历史代码出错率小于第一阈值的用户终端,若程序代码的功能为核心功能,则该用户终端生成的程序代码块对应的检测方式为全部扫描检测方式,若程序代码的功能为非核心功能,则该用户终端生成的程序代码块对应的检测方式为部分扫描检测方式。对于历史代码出错率为零的用户终端,该用户终端生成的程序代码块对应的检测方式为跳过扫描检测方式;For example, a first threshold can be set for the history code error rate. Specifically, for a user terminal whose history code error rate is greater than the first threshold, the detection mode corresponding to the program code block generated by the user terminal is all scan detection modes; and for the user terminal whose history code error rate is less than the first threshold, if the program code is The function of the function is the core function, and the detection mode corresponding to the program code block generated by the user terminal is all scanning detection mode. If the function of the program code is a non-core function, the detection mode corresponding to the program code block generated by the user terminal is part Scan detection method. For a user terminal whose history code has an error rate of zero, the detection mode corresponding to the program code block generated by the user terminal is a skip scan detection mode;
另外,对于各个技术开发人员的历史出错率,可以设置多个阈值和时间间隔,在某个时间段内程序代码块出错率一直低于某个阈值时,则可以更换检测方式。例如,在预设时长内,某个用户终端对应的程序代码块历史出错率一直低于第一阈值时,则可以将全部扫描检测方式更换为部分扫描检测方式;在预设时长内程序代码块历史出错率一直为零时,则可以将部分扫描检测方式更换为忽略扫描检测方式。In addition, for each technology developer's historical error rate, multiple thresholds and time intervals can be set. When the program code block error rate is always below a certain threshold within a certain period of time, the detection mode can be replaced. For example, if the historical error rate of the program code block corresponding to a certain user terminal is always lower than the first threshold within the preset duration, the entire scan detection mode may be replaced with the partial scan detection mode; the program code block within the preset duration When the historical error rate is always zero, the partial scan detection method can be replaced with the ignore scan detection method.
本实施例中,对不同用户终端生成的程序代码块采用相应的检测方式,能够针对性的对程序代码块采用不同的检测方式进行检测,以减少对某些用户终端生成的程序代码块不必要的检测时间,从而减少对整个应用程序代码的检测时间,同时还能够保证对程序代码块的检测准确度,提升对程序代码块的检测效率。In this embodiment, the program code blocks generated by different user terminals are detected by corresponding detection manners, and different detection modes of the program code blocks can be detected in a targeted manner to reduce unnecessary program code blocks generated by some user terminals. The detection time reduces the detection time of the entire application code, and also ensures the detection accuracy of the program code block and improves the detection efficiency of the program code block.
步骤S202,根据历史异常代码数据库,通过各个程序代码块对应的检测方式对于各个程序代码进行检测,判断各个程序代码块中是否包含有与所述历史异常代码数据库中的历史异常代码相匹配的异常代码。Step S202, according to the historical abnormal code database, detecting each program code by a detection mode corresponding to each program code block, and determining whether each program code block includes an abnormality matching the historical abnormal code in the historical abnormal code database. Code.
本实施例中,检测方式可以包括多种,例如跳过扫描检测方式、部分扫描检测方式和全部扫描检测方式等。例如,所述历史异常代码数据库中包括三类历史异常代码,分别为第一类历史异常代码和第二类历史异常代码;根据预设规则将各个用户终端生成的程序代码块分为两类,分别为第一类程序代码块和第二类程序代码块。其中,第一类程序代码块为核心功能对应的程序代码块,与第一类历史异常代码对应;第二类程序代码块为非核心功能对应的程序代码块,与第二类历史异常代码对应。In this embodiment, the detection manner may include multiple types, such as a skip scan detection mode, a partial scan detection mode, and all scan detection modes. For example, the historical abnormal code database includes three types of historical abnormal codes, which are a first type of historical abnormal code and a second type of historical abnormal code; and the program code blocks generated by each user terminal are classified into two types according to a preset rule. They are a first type of program code block and a second type of program code block. Wherein, the first type of program code block is a program code block corresponding to the core function, corresponding to the first type of historical exception code; the second type of program code block is a program code block corresponding to the non-core function, corresponding to the second type of historical abnormal code .
根据上述设置,再结合各个用户终端对应的历史出错率,对属于第一类程序代码块的程序代码块和属于第二类程序代码块的程序代码块按照相应的检测方式进行扫描检测,具体可参照步骤S302中的相关内容,在此不再赘述。According to the above setting, combined with the historical error rate corresponding to each user terminal, the program code block belonging to the first type of program code block and the program code block belonging to the second type of program code block are scanned and detected according to the corresponding detection manner, specifically Refer to the related content in step S302, and details are not described herein again.
作为一种可实施方式,所述判断各个程序代码块中是否包含有与所述历史异常代码数据库中的历史异常代码相匹配的异常代码具体可以为:对各个程序代码块,通过关键字和预设算法进行扫描检测,以检测各个程序代码块中是否包含有与所述历史异常代码相同或相近的异常代码。通过设置关键字和预设算法,能够进一步减少对目标文件的各个类别块的扫描检测时间,提高检测效率。As an implementation manner, the determining, by using each of the program code blocks, an exception code that matches a historical exception code in the historical exception code database may be: for each program code block, by using a keyword and a pre- The algorithm is configured to perform scan detection to detect whether each program code block contains an exception code that is the same as or similar to the historical exception code. By setting keywords and preset algorithms, the scan detection time of each class block of the target file can be further reduced, and the detection efficiency is improved.
例如,在程序代码块中的代码与历史异常代码完全相同,或程序代码块中的代码与历史异常代码的相似度超过相似阈值时,即可判定该程序代码块中包含有与所述历史异常代码相同或相近的异常代码。For example, when the code in the program code block is identical to the historical exception code, or the similarity between the code in the program code block and the historical exception code exceeds a similar threshold, it can be determined that the program code block contains the historical exception. Exception code with the same or similar code.
另外,在步骤S202之后,步骤S102还可以包括:在判断出程序代码块中包含有与所述历史异常代码数据库中的历史异常代码相匹配的异常代码时,确定异常代码在程序代码块中的位置信息。具体的,可以在判定程序代码块中包含有与所述历史异常代码数据库中的历史异常代码相匹配的异常代码的同时,获取异常代码在程序代码块中的位置信息。In addition, after step S202, step S102 may further include: determining that the abnormal code is in the program code block when it is determined that the program code block includes an abnormal code matching the historical abnormal code in the historical abnormal code database. location information. Specifically, the location code information of the exception code in the program code block may be acquired while determining that the program code block includes the exception code matching the historical exception code in the historical exception code database.
步骤S103,在检测到某个程序代码块中包含有与所述历史异常代码数据库中的历史异常信息相对应的异常代码时,确定该程序代码块对应的用户终端标识,并向所确定的用户终端标识对应的用户终端发送代码异常警示信息。Step S103, when detecting that an abnormal code corresponding to the historical abnormality information in the historical abnormal code database is included in a certain program code block, determining a user terminal identifier corresponding to the program code block, and determining the user terminal identifier The user terminal corresponding to the terminal identifier sends a code abnormal warning message.
其中,步骤S103中所述的向所确定的用户终端标识对应的用户终端发送代码异常警示信息,包括:将异常代码在程序代码块中的位置信息和异常代码对应的参考代码生成所述代码异常警示信息,并发送给对应的用户终端。The sending the code abnormality warning information to the user terminal corresponding to the determined user terminal identifier, which is described in step S103, includes: generating the code abnormality by using location information of the abnormal code in the program code block and a reference code corresponding to the abnormal code. The information is alerted and sent to the corresponding user terminal.
本实施例中,参考代码为供技术开发人员参考的程序代码,以便于技术开发人员根据参考代码对异常代码进行修正。参考代码可以通过统计历史程序代码得出。例如,在确定出历史异常代码时,同时将对应的参考代码也与历史异常代码一一对应的存储在历史异常代码数据库中。In this embodiment, the reference code is a program code for technical developers to refer to, so that the technical developer can correct the abnormal code according to the reference code. The reference code can be derived from the statistical history program code. For example, when the historical abnormal code is determined, the corresponding reference code is also stored in the historical abnormal code database in one-to-one correspondence with the historical abnormal code.
可选的,在步骤S103之后,上述应用程序代码检测方法还可以包括:获取在预设时间段内检测出的包含异常代码的程序代码块的个数,并按照包含异常代码的程序代码块的个数,显示包含异常代码的程序代码块的个数与各个用户终端的对应关系。Optionally, after the step S103, the foregoing application code detecting method may further include: acquiring the number of program code blocks including the abnormal code detected within the preset time period, and according to the program code block including the abnormal code. The number displays the correspondence between the number of program code blocks including the exception code and each user terminal.
例如,可以通过积分板显示包含异常代码的程序代码块的个数与各个用户终端的对应关系。具体的,可以将积分板的显示区域划分为多个区域,每个区域对应一个团队,显示该团队的信息包括:程序代码出错数(可以包括月度出错数和年度出错数)、团队人数、历史出错率(可以包括月度历史出错率和年度历史出错率)、完成进度(可以包括月度完成进度和年度完成进度)等信息,并根据程序出错数、历史出错率、完成进度的综合情况对各个团队进行排名,并通过预设特征对各个团队的排名变化进行标示。月度历史出错率为月度出错的程序代码块个数除以月度完成的程序代码块总数。年度历史出错率为年度内出错的程序代码块个数除以年度完成的程序代码块总数。For example, the correspondence between the number of program code blocks including the abnormal code and each user terminal can be displayed through the scoreboard. Specifically, the display area of the scoreboard can be divided into multiple areas, each area corresponding to a team, and the information of the team is displayed: the number of program code errors (which may include monthly error numbers and annual error counts), number of teams, history Error rate (which can include monthly historical error rate and annual historical error rate), completion progress (which can include monthly completion progress and annual completion progress), etc., and each team based on the number of program errors, historical error rate, and completion progress Rankings are performed, and the ranking changes of each team are marked by preset features. The monthly historical error rate is the number of program code blocks for monthly errors divided by the total number of program code blocks completed in a month. The annual history error rate is the number of program code blocks that are erroneous during the year divided by the total number of program code blocks completed in the year.
对于每个技术开发人员可以采用基本相同的方式进行公示,例如显示技术开发人员的:程序代码出错数(可以包括月度出错数和年度出错数)、历史出错率(可以包括月度历史出错率和年度历史出错率)、完成进度(可以包括月度完成进度和年度完成进度)等信息,并根据程序出错数、历史出错率、完成进度的综合情况对各个技术开发人员进行排名,并通过预设特征对各个技术开发人员的排名变化进行标示。For each technology developer, the public information can be displayed in the same way, for example, the display technology developer: the number of program code errors (which can include monthly error counts and annual error counts), historical error rate (can include monthly historical error rate and annual Historical error rate), completion progress (which may include monthly completion progress and annual completion progress), etc., and ranking each technical developer according to the number of program errors, historical error rate, and completion progress, and through preset feature pairs The ranking changes of various technology developers are marked.
上述应用程序代码检测方法,首先获取各个用户终端生成的程序代码块,每个用户终端发送的程序代码块均对应一个用户终端标识;然后根据历史异常代码数据库,检测各个用户终端发送的程序代码块中是否包含有与所述历史异常代码数据库中的历史异常代码相匹配的异常代码;在检测到某个程序代码块中包含有与所述历史异常代码数据库中的历史异常信息相对应的异常代码时,确定该程序代码块对应的用户终端标识,并向所确定的用户终端标识对应的用户终端发送代码异常警示信息,因此上述方法能够在应用程序开发过程中获取各个用户终端生成的程序代码块,并对各个程序代码块进行检测,在检测到程序代码块存在异常代码时,发出警示信息给对应的用户终端,以提醒对应的技术开发人员进行修改,从而能够防止在对程序代码块部署上测试环境后可能出现的退回问题,能够节约应用程序开发流程对应的时间。The above application code detecting method first acquires a program code block generated by each user terminal, and each program terminal block sent by the user terminal corresponds to a user terminal identifier; and then detects a program code block sent by each user terminal according to the historical abnormal code database. Whether the exception code matching the historical exception code in the historical exception code database is included; detecting that a certain program code block contains an exception code corresponding to the historical exception information in the historical exception code database Determining, by the user terminal identifier corresponding to the program code block, and sending the code abnormality warning information to the determined user terminal corresponding to the user terminal identifier, the foregoing method can acquire the program code block generated by each user terminal in the application development process. And detecting each program code block, and when detecting that there is an abnormal code in the program code block, sending a warning message to the corresponding user terminal to remind the corresponding technical developer to modify, thereby preventing the deployment of the program code block. Test ring After returning problems that may arise, it can save application development process corresponding period.
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that the size of the sequence of the steps in the above embodiments does not mean that the order of execution is performed. The order of execution of each process should be determined by its function and internal logic, and should not be construed as limiting the implementation process of the embodiments of the present application.
实施例二Embodiment 2
对应于上文实施例所述的应用程序代码检测方法,图4示出了本申请实施例提供的应用程序代码检测程序的运行环境示意图。为了便于说明,仅示出了与本实施例相关的部分。Corresponding to the application code detection method described in the above embodiment, FIG. 4 is a schematic diagram showing an operating environment of the application code detection program provided by the embodiment of the present application. For the convenience of explanation, only the parts related to the present embodiment are shown.
在本实施例中,所述的应用程序代码检测程序400安装并运行于服务器40中。该服务器40可包括,但不仅限于,存储器401和处理器402。图5仅示出了具有组件401-402的服务器40,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。In the present embodiment, the application code detection program 400 is installed and runs in the server 40. The server 40 can include, but is not limited to, a memory 401 and a processor 402. Figure 5 shows only server 40 with components 401-402, but it should be understood that not all illustrated components may be implemented, and more or fewer components may be implemented instead.
所述存储器401在一些实施例中可以是所述服务器40的内部存储单元,例如该服务器40的硬盘或内存。所述存储器401在另一些实施例中也可以是所述服务器40的外部存储设备,例如所述服务器40上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器401还可以既包括所述终端设备40的内部存储单元也包括外部存储设备。所述存储器401用于存储安装于所述服务器40的应用软件及各类数据,例如所述应用程序代码检测程序400的程序代码等。所述存储器401还可以用于暂时地存储已经输出或者将要输出的数据。The memory 401 may be an internal storage unit of the server 40, such as a hard disk or memory of the server 40, in some embodiments. The memory 401 may also be an external storage device of the server 40 in other embodiments, such as a plug-in hard disk equipped on the server 40, a smart memory card (SMC), and a secure digital number (Secure). Digital, SD) cards, flash cards, etc. Further, the memory 401 may also include both an internal storage unit of the terminal device 40 and an external storage device. The memory 401 is configured to store application software and various types of data installed in the server 40, such as program codes of the application code detection program 400, and the like. The memory 401 can also be used to temporarily store data that has been output or is about to be output.
所述处理器402在一些实施例中可以是一中央处理器(Central Processing Unit,CPU),微处理器或其他数据处理芯片,用于运行所述存储器401中存储的程序代码或处理数据,例如执行所述应用程序代码检测程序400等。The processor 402, in some embodiments, can be a central processor (Central) A processing unit (CPU), a microprocessor or other data processing chip for running program code or processing data stored in the memory 401, such as executing the application code detecting program 400 and the like.
该服务器40还可包括显示器,所述显示器在一些实施例中可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。The server 40 can also include a display, which in some embodiments can be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic) Light-Emitting Diode, organic light-emitting diodes, etc.
请参阅图5,是本申请实施例提供的应用程序代码检测程序400的程序模块图。在本实施例中,所述的应用程序代码检测程序400可以被分割成一个或多个模块,所述一个或者多个模块被存储于所述存储器401中,并由一个或多个处理器(本实施例为所述处理器402)所执行,以完成本申请。例如,在图5中,所述的应用程序代码检测程序400可以被分割成代码接收模块501、检测模块502和警示模块503。本申请所称的模块是指能够完成特定功能的一系列计算机可读指令指令段,比程序更适合于描述所述应用程序代码检测程序400在所述服务器40中的执行过程。以下描述将具体介绍所述模块501-503的功能。Please refer to FIG. 5 , which is a program module diagram of the application code detection program 400 provided by the embodiment of the present application. In this embodiment, the application code detection program 400 may be divided into one or more modules, the one or more modules being stored in the memory 401 and being processed by one or more processors ( This embodiment is executed by the processor 402) to complete the application. For example, in FIG. 5, the application code detection program 400 can be divided into a code receiving module 501, a detecting module 502, and a warning module 503. A module as referred to in this application refers to a series of computer readable instruction instructions that are capable of performing a particular function, and are more suitable than the program to describe the execution of the application code detection program 400 in the server 40. The following description will specifically describe the functions of the modules 501-503.
其中,代码接收模块501,用于获取各个用户终端生成的程序代码块,每个程序代码块均对应一个用户终端标识,且相同用户终端发送的不同程序代码块对应同一个用户终端标识。The code receiving module 501 is configured to obtain a program code block generated by each user terminal, where each program code block corresponds to one user terminal identifier, and different program code blocks sent by the same user terminal correspond to the same user terminal identifier.
检测模块502,用于根据历史异常代码数据库,检测各个用户终端发送的程序代码块中是否包含有与所述历史异常代码数据库中的历史异常代码相匹配的异常代码;其中,所述历史异常代码数据库中包括多条历史异常代码。The detecting module 502 is configured to detect, according to the historical abnormal code database, whether the program code block sent by each user terminal includes an abnormal code that matches a historical abnormal code in the historical abnormal code database; wherein the historical abnormal code The database includes multiple historical exception codes.
警示模块503,用于在检测到某个程序代码块中包含有与所述历史异常代码数据库中的历史异常信息相对应的异常代码时,确定该程序代码块对应的用户终端标识,并向所确定的用户终端标识对应的用户终端发送代码异常警示信息。The warning module 503 is configured to: when detecting that the abnormal code corresponding to the historical abnormality information in the historical abnormal code database is included in a certain program code block, determine the user terminal identifier corresponding to the program code block, and The user terminal corresponding to the determined user terminal identifier sends a code abnormal warning message.
作为一种可实施方式,检测模块502可以用于:As an implementation manner, the detection module 502 can be used to:
确定各个用户终端发送的程序代码块对应的检测方式;Determining a detection manner corresponding to a program code block sent by each user terminal;
根据历史异常代码数据库,通过各个程序代码块对应的检测方式对于各个程序代码进行检测,判断各个程序代码块中是否包含有与所述历史异常代码数据库中的历史异常代码相匹配的异常代码。According to the history abnormal code database, each program code is detected by a detection method corresponding to each program code block, and it is determined whether or not each program code block includes an abnormal code matching the historical abnormal code in the history abnormal code database.
可选的,检测模块502确定各个用户终端发送的程序代码块对应的检测方式的过程可以包括:Optionally, the process of the detecting module 502 determining the detection manner corresponding to the program code block sent by each user terminal may include:
获取各个用户终端的历史代码出错率;用户终端的历史代码出错率为通过用户终端生成的程序代码对应的历史代码出错率;Obtaining a history code error rate of each user terminal; a history code error rate of the user terminal is a history code error rate corresponding to the program code generated by the user terminal;
根据所述历史代码出错率和各个程序代码的功能,确定对各个程序代码块的检测方式。The detection method for each program code block is determined based on the history code error rate and the function of each program code.
可选的,检测模块502还用于在判断出程序代码块中包含有与所述历史异常代码数据库中的历史异常代码相匹配的异常代码时,确定异常代码在程序代码块中的位置信息;Optionally, the detecting module 502 is further configured to determine location information of the exception code in the program code block when determining that the program code block includes an exception code that matches the historical exception code in the historical exception code database;
警示模块503用于将异常代码在程序代码块中的位置信息和异常代码对应的参考代码生成所述代码异常警示信息,并发送给对应的用户终端。The alert module 503 is configured to generate the code abnormality alert information by using the location information of the exception code in the program code block and the reference code corresponding to the exception code, and send the code abnormality alert information to the corresponding user terminal.
进一步的,所述的应用程序代码检测程序400还可以被分割成:Further, the application code detection program 400 can also be divided into:
显示模块,用于获取在预设时间段内检测出的包含异常代码的程序代码块的个数,并按照包含异常代码的程序代码块的个数,显示包含异常代码的程序代码块的个数与各个用户终端的对应关系。a display module, configured to acquire the number of program code blocks including the exception code detected within the preset time period, and display the number of program code blocks including the exception code according to the number of program code blocks including the exception code Correspondence with each user terminal.
在本申请所提供的实施例中,应该理解到,所揭露的装置/终端设备和方法,可以通过其它的方式实现。例如,以上所描述的装置/终端设备实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。In the embodiments provided by the present application, it should be understood that the disclosed device/terminal device and method may be implemented in other manners. For example, the device/terminal device embodiments described above are merely illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units. Or components may be combined or integrated into another system, or some features may be omitted or not performed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in electrical, mechanical or other form.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
所述集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一计算机可读存储介质中,该计算机可读指令在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机可读指令包括计算机可读指令代码,所述计算机可读指令代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机可读指令代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括电载波信号和电信信号。The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, the present application implements all or part of the processes in the foregoing embodiments, and may also be implemented by computer readable instructions, which may be stored in a computer readable storage medium. The computer readable instructions, when executed by a processor, may implement the steps of the various method embodiments described above. Wherein, the computer readable instructions comprise computer readable instruction code, which may be in the form of source code, an object code form, an executable file or some intermediate form or the like. The computer readable medium can include any entity or device capable of carrying the computer readable instruction code, a recording medium, a USB flash drive, a removable hard drive, a magnetic disk, an optical disk, a computer memory, a read only memory (ROM, Read-Only) Memory), random access memory (RAM, Random) Access Memory), electrical carrier signals, telecommunications signals, and software distribution media. It should be noted that the content contained in the computer readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in a jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, computer readable media Does not include electrical carrier signals and telecommunication signals.
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above-mentioned embodiments are only used to explain the technical solutions of the present application, and are not limited thereto; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still implement the foregoing embodiments. The technical solutions described in the examples are modified or equivalently replaced with some of the technical features; and the modifications or substitutions do not deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in Within the scope of protection of this application.

Claims (20)

  1. 一种应用程序代码检测方法,其特征在于,包括:An application code detecting method, comprising:
    获取各个用户终端生成的程序代码块,每个程序代码块均对应一个用户终端标识,且相同用户终端发送的不同的程序代码块对应同一个用户终端标识;Obtaining program code blocks generated by each user terminal, each program code block corresponding to one user terminal identifier, and different program code blocks sent by the same user terminal correspond to the same user terminal identifier;
    根据历史异常代码数据库,检测各个用户终端发送的程序代码块中是否包含有与所述历史异常代码数据库中的历史异常代码相匹配的异常代码;其中,所述历史异常代码数据库中包括多条历史异常代码;Detecting, according to the historical abnormal code database, whether the program code block sent by each user terminal includes an abnormal code matching the historical abnormal code in the historical abnormal code database; wherein the historical abnormal code database includes multiple pieces of history Exception code
    在检测到某个程序代码块中包含有与所述历史异常代码数据库中的历史异常信息相对应的异常代码时,确定该程序代码块对应的用户终端标识,并向所确定的用户终端标识对应的用户终端发送代码异常警示信息。When it is detected that a certain program code block includes an abnormality code corresponding to the historical abnormality information in the historical abnormal code database, determining a user terminal identifier corresponding to the program code block, and corresponding to the determined user terminal identifier The user terminal sends a code exception warning message.
  2. 如权利要求1所述的应用程序代码检测方法,其特征在于,所述根据历史异常代码数据库,检测各个用户终端发送的程序代码块中是否包含有与所述历史异常代码数据库中的历史异常代码相匹配的异常代码,包括:The application code detecting method according to claim 1, wherein said detecting, according to the historical abnormal code database, whether a program code block transmitted by each user terminal includes a history abnormal code in the history abnormal code database Matching exception codes, including:
    确定各个用户终端发送的程序代码块对应的检测方式;Determining a detection manner corresponding to a program code block sent by each user terminal;
    根据历史异常代码数据库,通过各个程序代码块对应的检测方式对于各个程序代码进行检测,判断各个程序代码块中是否包含有与所述历史异常代码数据库中的历史异常代码相匹配的异常代码。According to the history abnormal code database, each program code is detected by a detection method corresponding to each program code block, and it is determined whether or not each program code block includes an abnormal code matching the historical abnormal code in the history abnormal code database.
  3. 如权利要求2所述的应用程序代码检测方法,其特征在于,所述确定各个用户终端发送的程序代码块对应的检测方式,包括:The application code detecting method according to claim 2, wherein the determining the detection manner corresponding to the program code block sent by each user terminal comprises:
    获取各个用户终端的历史代码出错率;用户终端的历史代码出错率为通过用户终端生成的程序代码对应的历史代码出错率;Obtaining a history code error rate of each user terminal; a history code error rate of the user terminal is a history code error rate corresponding to the program code generated by the user terminal;
    根据所述历史代码出错率和各个程序代码的功能,确定对各个程序代码块的检测方式。The detection method for each program code block is determined based on the history code error rate and the function of each program code.
  4. 如权利要求2所述的应用程序代码检测方法,其特征在于,所述根据历史异常代码数据库,检测各个用户终端发送的程序代码块中是否包含有与所述历史异常代码数据库中的历史异常代码相匹配的异常代码,还包括:在判断出程序代码块中包含有与所述历史异常代码数据库中的历史异常代码相匹配的异常代码时,确定异常代码在程序代码块中的位置信息;The application code detecting method according to claim 2, wherein said detecting, according to the historical abnormal code database, whether a program code block transmitted by each user terminal includes a history abnormal code in the history abnormal code database The matching exception code further includes: determining location information of the exception code in the program code block when it is determined that the program code block includes an exception code matching the historical exception code in the historical exception code database;
    所述向所确定的用户终端标识对应的用户终端发送代码异常警示信息,包括:将异常代码在程序代码块中的位置信息和异常代码对应的参考代码生成所述代码异常警示信息,并发送给对应的用户终端。And sending, by the user terminal corresponding to the determined user terminal identifier, the code abnormality warning information, including: generating the code abnormal warning information by using the location information of the abnormal code in the program code block and the reference code corresponding to the abnormal code, and sending the Corresponding user terminal.
  5. 如权利要求1至4中任一项所述的应用程序代码检测方法,其特征在于,所述应用程序代码检测方法还包括:The application code detecting method according to any one of claims 1 to 4, wherein the application code detecting method further comprises:
    获取在预设时间段内检测出的包含异常代码的程序代码块的个数,并按照包含异常代码的程序代码块的个数,显示包含异常代码的程序代码块的个数与各个用户终端的对应关系。Obtaining the number of program code blocks including the abnormal code detected within the preset time period, and displaying the number of program code blocks including the abnormal code and each user terminal according to the number of program code blocks including the abnormal code Correspondence relationship.
  6. 一种应用程序代码检测装置,其特征在于,包括:An application code detecting device, comprising:
    代码接收模块,用于获取各个用户终端生成的程序代码块,每个程序代码块均对应一个用户终端标识,且相同用户终端发送的不同的程序代码块对应同一个用户终端标识;a code receiving module, configured to acquire program code blocks generated by each user terminal, each program code block corresponding to one user terminal identifier, and different program code blocks sent by the same user terminal correspond to the same user terminal identifier;
    检测模块,用于根据历史异常代码数据库,检测各个用户终端发送的程序代码块中是否包含有与所述历史异常代码数据库中的历史异常代码相匹配的异常代码;其中,所述历史异常代码数据库中包括多条历史异常代码;a detecting module, configured to detect, according to the historical abnormal code database, whether the program code block sent by each user terminal includes an abnormal code that matches a historical abnormal code in the historical abnormal code database; wherein the historical abnormal code database Includes multiple historical exception codes;
    警示模块,用于在检测到某个程序代码块中包含有与所述历史异常代码数据库中的历史异常信息相对应的异常代码时,确定该程序代码块对应的用户终端标识,并向所确定的用户终端标识对应的用户终端发送代码异常警示信息。a warning module, configured to: when detecting that an abnormal code corresponding to the historical abnormality information in the historical abnormal code database is included in a certain program code block, determine a user terminal identifier corresponding to the program code block, and determine the The user terminal corresponding to the user terminal identifier sends a code abnormal warning message.
  7. 如权利要求6所述的应用程序代码检测装置,其特征在于,所述检测模块,包括:The application code detecting apparatus according to claim 6, wherein the detecting module comprises:
    检测确定模块,用于确定各个用户终端发送的程序代码块对应的检测方式;a detection determining module, configured to determine a detection manner corresponding to the program code block sent by each user terminal;
    异常判断模块,用于根据历史异常代码数据库,通过各个程序代码块对应的检测方式对于各个程序代码进行检测,判断各个程序代码块中是否包含有与所述历史异常代码数据库中的历史异常代码相匹配的异常代码。The abnormality determining module is configured to detect, according to the historical abnormal code database, each program code by using a detection manner corresponding to each program code block, and determine whether each of the program code blocks includes a historical abnormal code in the historical abnormal code database. The matching exception code.
  8. 如权利要求7所述的应用程序代码检测装置,其特征在于,所述检测模块,还包括:The application code detecting apparatus according to claim 7, wherein the detecting module further comprises:
    获取各个用户终端的历史代码出错率;用户终端的历史代码出错率为通过用户终端生成的程序代码对应的历史代码出错率;Obtaining a history code error rate of each user terminal; a history code error rate of the user terminal is a history code error rate corresponding to the program code generated by the user terminal;
    根据所述历史代码出错率和各个程序代码的功能,确定对各个程序代码块的检测方式。The detection method for each program code block is determined based on the history code error rate and the function of each program code.
  9. 如权利要求7所述的应用程序代码检测装置,其特征在于:The application code detecting apparatus according to claim 7, wherein:
    所述检测模块,还用于在判断出程序代码块中包含有与所述历史异常代码数据库中的历史异常代码相匹配的异常代码时,确定异常代码在程序代码块中的位置信息;The detecting module is further configured to determine location information of the abnormal code in the program code block when it is determined that the program code block includes an abnormal code that matches the historical abnormal code in the historical abnormal code database;
    所述警示模块,还用于将异常代码在程序代码块中的位置信息和异常代码对应的参考代码生成所述代码异常警示信息,并发送给对应的用户终端。The warning module is further configured to generate the code abnormality warning information by using the location information of the abnormal code in the program code block and the reference code corresponding to the abnormal code, and send the code abnormality warning information to the corresponding user terminal.
  10. 如权利要求6至9任意一项所述的应用程序代码检测装置,其特征在于,还包括:The application code detecting apparatus according to any one of claims 6 to 9, further comprising:
    显示模块,用于获取在预设时间段内检测出的包含异常代码的程序代码块的个数,并按照包含异常代码的程序代码块的个数,显示包含异常代码的程序代码块的个数与各个用户终端的对应关系。a display module, configured to acquire the number of program code blocks including the exception code detected within the preset time period, and display the number of program code blocks including the exception code according to the number of program code blocks including the exception code Correspondence with each user terminal.
  11. 一种服务器,其特征在于,所述服务器包括存储器、处理器,所述存储器上存储有可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:A server, comprising: a memory, a processor having stored thereon computer readable instructions executable on the processor, the processor implementing the computer readable instructions The following steps:
    获取各个用户终端生成的程序代码块,每个程序代码块均对应一个用户终端标识,且相同用户终端发送的不同的程序代码块对应同一个用户终端标识;Obtaining program code blocks generated by each user terminal, each program code block corresponding to one user terminal identifier, and different program code blocks sent by the same user terminal correspond to the same user terminal identifier;
    根据历史异常代码数据库,检测各个用户终端发送的程序代码块中是否包含有与所述历史异常代码数据库中的历史异常代码相匹配的异常代码;其中,所述历史异常代码数据库中包括多条历史异常代码;Detecting, according to the historical abnormal code database, whether the program code block sent by each user terminal includes an abnormal code matching the historical abnormal code in the historical abnormal code database; wherein the historical abnormal code database includes multiple pieces of history Exception code
    在检测到某个程序代码块中包含有与所述历史异常代码数据库中的历史异常信息相对应的异常代码时,确定该程序代码块对应的用户终端标识,并向所确定的用户终端标识对应的用户终端发送代码异常警示信息。When it is detected that a certain program code block includes an abnormality code corresponding to the historical abnormality information in the historical abnormal code database, determining a user terminal identifier corresponding to the program code block, and corresponding to the determined user terminal identifier The user terminal sends a code exception warning message.
  12. 如权利要求11所述的服务器,其特征在于,所述根据历史异常代码数据库,检测各个用户终端发送的程序代码块中是否包含有与所述历史异常代码数据库中的历史异常代码相匹配的异常代码,包括:The server according to claim 11, wherein said detecting, based on the history abnormal code database, whether an abnormality in the program code block transmitted by each user terminal includes a history abnormal code in said historical abnormal code database Code, including:
    确定各个用户终端发送的程序代码块对应的检测方式;Determining a detection manner corresponding to a program code block sent by each user terminal;
    根据历史异常代码数据库,通过各个程序代码块对应的检测方式对于各个程序代码进行检测,判断各个程序代码块中是否包含有与所述历史异常代码数据库中的历史异常代码相匹配的异常代码。According to the history abnormal code database, each program code is detected by a detection method corresponding to each program code block, and it is determined whether or not each program code block includes an abnormal code matching the historical abnormal code in the history abnormal code database.
  13. 如权利要求12所述的服务器,其特征在于,所述确定各个用户终端发送的程序代码块对应的检测方式,包括:The server according to claim 12, wherein the determining the detection manner corresponding to the program code block sent by each user terminal comprises:
    获取各个用户终端的历史代码出错率;用户终端的历史代码出错率为通过用户终端生成的程序代码对应的历史代码出错率;Obtaining a history code error rate of each user terminal; a history code error rate of the user terminal is a history code error rate corresponding to the program code generated by the user terminal;
    根据所述历史代码出错率和各个程序代码的功能,确定对各个程序代码块的检测方式。The detection method for each program code block is determined based on the history code error rate and the function of each program code.
  14. 如权利要求12所述的服务器,其特征在于,所述根据历史异常代码数据库,检测各个用户终端发送的程序代码块中是否包含有与所述历史异常代码数据库中的历史异常代码相匹配的异常代码,还包括:在判断出程序代码块中包含有与所述历史异常代码数据库中的历史异常代码相匹配的异常代码时,确定异常代码在程序代码块中的位置信息;The server according to claim 12, wherein said detecting, based on the history abnormal code database, whether an abnormality in the program code block transmitted by each user terminal includes a history abnormal code in said historical abnormal code database The code further includes: determining, when the program code block includes an exception code matching the historical exception code in the historical exception code database, determining location information of the exception code in the program code block;
    所述向所确定的用户终端标识对应的用户终端发送代码异常警示信息,包括:将异常代码在程序代码块中的位置信息和异常代码对应的参考代码生成所述代码异常警示信息,并发送给对应的用户终端。And sending, by the user terminal corresponding to the determined user terminal identifier, the code abnormality warning information, including: generating the code abnormal warning information by using the location information of the abnormal code in the program code block and the reference code corresponding to the abnormal code, and sending the Corresponding user terminal.
  15. 如权利要求11至14任意一项所述的服务器,其特征在于,所述处理器执行所述计算机可读指令时还实现如下步骤:The server according to any one of claims 11 to 14, wherein the processor further implements the following steps when the computer readable instructions are executed:
    获取在预设时间段内检测出的包含异常代码的程序代码块的个数,并按照包含异常代码的程序代码块的个数,显示包含异常代码的程序代码块的个数与各个用户终端的对应关系。Obtaining the number of program code blocks including the abnormal code detected within the preset time period, and displaying the number of program code blocks including the abnormal code and each user terminal according to the number of program code blocks including the abnormal code Correspondence relationship.
  16. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,其特征在于,所述计算机可读指令被至少一个处理器执行时实现如下步骤:A computer readable storage medium storing computer readable instructions, wherein the computer readable instructions, when executed by at least one processor, implement the following steps:
    获取各个用户终端生成的程序代码块,每个程序代码块均对应一个用户终端标识,且相同用户终端发送的不同的程序代码块对应同一个用户终端标识;Obtaining program code blocks generated by each user terminal, each program code block corresponding to one user terminal identifier, and different program code blocks sent by the same user terminal correspond to the same user terminal identifier;
    根据历史异常代码数据库,检测各个用户终端发送的程序代码块中是否包含有与所述历史异常代码数据库中的历史异常代码相匹配的异常代码;其中,所述历史异常代码数据库中包括多条历史异常代码;Detecting, according to the historical abnormal code database, whether the program code block sent by each user terminal includes an abnormal code matching the historical abnormal code in the historical abnormal code database; wherein the historical abnormal code database includes multiple pieces of history Exception code
    在检测到某个程序代码块中包含有与所述历史异常代码数据库中的历史异常信息相对应的异常代码时,确定该程序代码块对应的用户终端标识,并向所确定的用户终端标识对应的用户终端发送代码异常警示信息。When it is detected that a certain program code block includes an abnormality code corresponding to the historical abnormality information in the historical abnormal code database, determining a user terminal identifier corresponding to the program code block, and corresponding to the determined user terminal identifier The user terminal sends a code exception warning message.
  17. 根据权利要求16所述的计算机可读存储介质,其特征在于,所述根据历史异常代码数据库,检测各个用户终端发送的程序代码块中是否包含有与所述历史异常代码数据库中的历史异常代码相匹配的异常代码,包括:The computer readable storage medium according to claim 16, wherein the detecting, according to the historical abnormal code database, whether a program code block sent by each user terminal includes a historical abnormal code in the historical abnormal code database Matching exception codes, including:
    确定各个用户终端发送的程序代码块对应的检测方式;Determining a detection manner corresponding to a program code block sent by each user terminal;
    根据历史异常代码数据库,通过各个程序代码块对应的检测方式对于各个程序代码进行检测,判断各个程序代码块中是否包含有与所述历史异常代码数据库中的历史异常代码相匹配的异常代码。According to the history abnormal code database, each program code is detected by a detection method corresponding to each program code block, and it is determined whether or not each program code block includes an abnormal code matching the historical abnormal code in the history abnormal code database.
  18. 根据权利要求17所述的计算机可读存储介质,其特征在于,所述确定各个用户终端发送的程序代码块对应的检测方式,包括:The computer readable storage medium according to claim 17, wherein the determining the detection manner corresponding to the program code block sent by each user terminal comprises:
    获取各个用户终端的历史代码出错率;用户终端的历史代码出错率为通过用户终端生成的程序代码对应的历史代码出错率;Obtaining a history code error rate of each user terminal; a history code error rate of the user terminal is a history code error rate corresponding to the program code generated by the user terminal;
    根据所述历史代码出错率和各个程序代码的功能,确定对各个程序代码块的检测方式。The detection method for each program code block is determined based on the history code error rate and the function of each program code.
  19. 根据权利要求17所述的计算机可读存储介质,其特征在于,所述根据历史异常代码数据库,检测各个用户终端发送的程序代码块中是否包含有与所述历史异常代码数据库中的历史异常代码相匹配的异常代码,还包括:在判断出程序代码块中包含有与所述历史异常代码数据库中的历史异常代码相匹配的异常代码时,确定异常代码在程序代码块中的位置信息;The computer readable storage medium according to claim 17, wherein the detecting, according to the historical abnormal code database, whether a program code block sent by each user terminal includes a historical abnormal code in the historical abnormal code database The matching exception code further includes: determining location information of the exception code in the program code block when it is determined that the program code block includes an exception code matching the historical exception code in the historical exception code database;
    所述向所确定的用户终端标识对应的用户终端发送代码异常警示信息,包括:将异常代码在程序代码块中的位置信息和异常代码对应的参考代码生成所述代码异常警示信息,并发送给对应的用户终端。And sending, by the user terminal corresponding to the determined user terminal identifier, the code abnormality warning information, including: generating the code abnormal warning information by using the location information of the abnormal code in the program code block and the reference code corresponding to the abnormal code, and sending the Corresponding user terminal.
  20. 根据权利要求16至19任意一项所述的计算机可读存储介质,其特征在于,还包括:The computer readable storage medium according to any one of claims 16 to 19, further comprising:
    获取在预设时间段内检测出的包含异常代码的程序代码块的个数,并按照包含异常代码的程序代码块的个数,显示包含异常代码的程序代码块的个数与各个用户终端的对应关系。Obtaining the number of program code blocks including the abnormal code detected within the preset time period, and displaying the number of program code blocks including the abnormal code and each user terminal according to the number of program code blocks including the abnormal code Correspondence relationship.
PCT/CN2018/097115 2018-03-30 2018-07-25 Application program code detection method, device, server and medium WO2019184159A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810276623.X 2018-03-30
CN201810276623.XA CN108563445B (en) 2018-03-30 2018-03-30 Application program code detection method and server

Publications (1)

Publication Number Publication Date
WO2019184159A1 true WO2019184159A1 (en) 2019-10-03

Family

ID=63533634

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/097115 WO2019184159A1 (en) 2018-03-30 2018-07-25 Application program code detection method, device, server and medium

Country Status (2)

Country Link
CN (1) CN108563445B (en)
WO (1) WO2019184159A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111046371A (en) * 2019-12-10 2020-04-21 上海掌门科技有限公司 Method, electronic device and computer-readable medium for generating device identification
CN112947907A (en) * 2020-03-23 2021-06-11 深圳市明源云科技有限公司 Method for creating code branch
CN113282514A (en) * 2021-06-28 2021-08-20 中国平安人寿保险股份有限公司 Problem data processing method and device, computer equipment and storage medium
CN113742622A (en) * 2021-08-06 2021-12-03 广州坚和网络科技有限公司 Webpage anomaly detection method and device

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109408374A (en) * 2018-09-26 2019-03-01 平安普惠企业管理有限公司 Application exception is remotely located method, system, computer equipment and medium
CN109828783A (en) * 2018-12-15 2019-05-31 中国平安人寿保险股份有限公司 Document automatic creation method, device, electronic equipment and medium based on code
CN111045679B (en) * 2019-01-09 2024-02-23 国家计算机网络与信息安全管理中心 SQL injection detection and defense method, SQL injection detection and defense device and storage medium
CN110109798A (en) * 2019-03-19 2019-08-09 中国平安人寿保险股份有限公司 Application exception processing method, device, computer equipment and storage medium
CN112948415A (en) * 2019-12-20 2021-06-11 深圳市明源云链互联网科技有限公司 SQL statement detection method and device, terminal equipment and storage medium
CN113672507A (en) * 2021-08-16 2021-11-19 深圳供电局有限公司 Software source code detection method and device, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102054100A (en) * 2010-12-17 2011-05-11 中国科学院计算技术研究所 Static analysis-based method and system for detecting RTL (Resistor Transistor Logic) design errors
CN103645985A (en) * 2013-11-28 2014-03-19 广州视源电子科技股份有限公司 Source code macro-pairing detection method
CN106354636A (en) * 2016-08-25 2017-01-25 上海卓易科技股份有限公司 Method and device for code testing
CN106446691A (en) * 2016-11-24 2017-02-22 工业和信息化部电信研究院 Method and device for detecting integrated or customized open source project bugs in software
CN106681783A (en) * 2016-12-13 2017-05-17 深圳市恒扬数据股份有限公司 Detection method and system for SVN code

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9396094B2 (en) * 2011-07-21 2016-07-19 International Business Machines Corporation Software test automation systems and methods
CN105320591B (en) * 2014-07-25 2019-08-27 腾讯科技(深圳)有限公司 Code detection method and device
CN106201861A (en) * 2015-05-07 2016-12-07 阿里巴巴集团控股有限公司 The detection method of a kind of code quality and device
CN107291614B (en) * 2017-05-04 2020-10-30 平安科技(深圳)有限公司 File abnormity detection method and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102054100A (en) * 2010-12-17 2011-05-11 中国科学院计算技术研究所 Static analysis-based method and system for detecting RTL (Resistor Transistor Logic) design errors
CN103645985A (en) * 2013-11-28 2014-03-19 广州视源电子科技股份有限公司 Source code macro-pairing detection method
CN106354636A (en) * 2016-08-25 2017-01-25 上海卓易科技股份有限公司 Method and device for code testing
CN106446691A (en) * 2016-11-24 2017-02-22 工业和信息化部电信研究院 Method and device for detecting integrated or customized open source project bugs in software
CN106681783A (en) * 2016-12-13 2017-05-17 深圳市恒扬数据股份有限公司 Detection method and system for SVN code

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111046371A (en) * 2019-12-10 2020-04-21 上海掌门科技有限公司 Method, electronic device and computer-readable medium for generating device identification
CN112947907A (en) * 2020-03-23 2021-06-11 深圳市明源云科技有限公司 Method for creating code branch
CN112947907B (en) * 2020-03-23 2024-03-12 深圳市明源云科技有限公司 Method for creating code branches
CN113282514A (en) * 2021-06-28 2021-08-20 中国平安人寿保险股份有限公司 Problem data processing method and device, computer equipment and storage medium
CN113282514B (en) * 2021-06-28 2023-08-15 中国平安人寿保险股份有限公司 Method, device, computer equipment and storage medium for processing problem data
CN113742622A (en) * 2021-08-06 2021-12-03 广州坚和网络科技有限公司 Webpage anomaly detection method and device

Also Published As

Publication number Publication date
CN108563445B (en) 2021-09-10
CN108563445A (en) 2018-09-21

Similar Documents

Publication Publication Date Title
WO2019184159A1 (en) Application program code detection method, device, server and medium
WO2021189899A1 (en) Link state tracking method and apparatus, and electronic device and computer storage medium
CN110852374B (en) Data detection method, device, electronic equipment and storage medium
WO2021189855A1 (en) Image recognition method and apparatus based on ct sequence, and electronic device and medium
WO2018120891A1 (en) Software development progress early warning method, device, server, and storage medium
CN111950621A (en) Target data detection method, device, equipment and medium based on artificial intelligence
CN109918385A (en) Tripartite's account checking method, electronic device and readable storage medium storing program for executing
WO2019062066A1 (en) On-line task execution method for terminal device, server, and readable storage medium
CN113190427B (en) Method and device for monitoring blocking, electronic equipment and storage medium
CN114640707A (en) Message asynchronous processing method and device, electronic equipment and storage medium
CN114116400A (en) Application exception handling method, device, equipment and medium based on log printing
CN116756710B (en) Open source treatment method and system based on feature tag tracking technology and electronic equipment
US8074121B2 (en) Automated information technology error and service request correlation
CN113360321A (en) Micro-service retry calling method and device, electronic equipment and storage medium
CN107291614B (en) File abnormity detection method and electronic equipment
CN112540839B (en) Information changing method, device, electronic equipment and storage medium
CN114911479A (en) Interface generation method, device, equipment and storage medium based on configuration
CN112667244A (en) Data verification method and device, electronic equipment and computer readable storage medium
CN113515265A (en) Site configuration method, device, equipment and computer readable storage medium
CN112527443A (en) Prompt box display method and device, electronic equipment and computer readable storage medium
CN112685259A (en) Data acquisition method and device based on buried points, electronic equipment and storage medium
US20190303858A1 (en) Content based message routing for supply chain information sharing
CN114723400B (en) Service authorization management method, device, equipment and storage medium
CN113626533B (en) Ultraviolet power detection method and device and electronic equipment
CN113419916B (en) Wind control inspection program uninterrupted operation method, device, equipment and storage medium

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: 18911546

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 18911546

Country of ref document: EP

Kind code of ref document: A1