CN108132850A - Code location method, apparatus and electronic equipment - Google Patents

Code location method, apparatus and electronic equipment Download PDF

Info

Publication number
CN108132850A
CN108132850A CN201711402595.3A CN201711402595A CN108132850A CN 108132850 A CN108132850 A CN 108132850A CN 201711402595 A CN201711402595 A CN 201711402595A CN 108132850 A CN108132850 A CN 108132850A
Authority
CN
China
Prior art keywords
code
abnormal
abnormality
line number
abnormality code
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201711402595.3A
Other languages
Chinese (zh)
Other versions
CN108132850B (en
Inventor
洪森
徐凌超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ant Mining Technology Co ltd
Original Assignee
Beijing Bitmain Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Bitmain Technology Co Ltd filed Critical Beijing Bitmain Technology Co Ltd
Priority to CN201711402595.3A priority Critical patent/CN108132850B/en
Publication of CN108132850A publication Critical patent/CN108132850A/en
Application granted granted Critical
Publication of CN108132850B publication Critical patent/CN108132850B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/079Root cause analysis, i.e. error or fault diagnosis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0766Error or fault reporting or storing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0766Error or fault reporting or storing
    • G06F11/0775Content or structure details of the error report, e.g. specific table structure, specific error fields
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/805Real-time
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/865Monitoring of software

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Debugging And Monitoring (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The present invention relates to a kind of Code location method, apparatus and electronic equipments, belong to Internet technical field.The method includes:When the system of detecting is abnormal, acquisition abnormity information and abnormal data;Based on abnormality code line number, abnormality code is positioned in source code;Abnormality code is obtained, generates and shows abnormal notice.The present invention is when the system of detecting is abnormal, acquisition abnormity information and abnormal data, and the abnormality code line number carried based on exception information, abnormality code is positioned in source code, obtain abnormality code, it generates and shows carrying abnormality code, the abnormal notice of exception information and abnormal data, due to when the system of detecting is abnormal, it can acquisition abnormity information and abnormal data, and then exception information and abnormal data are analyzed, therefore, without the running log in subsequent extracted system, it is analyzed without to a large amount of running log, the code being abnormal can be positioned in real time, it is intelligent more excellent.

Description

Code location method, apparatus and electronic equipment
Technical field
The present invention relates to Internet technical field, more particularly to a kind of Code location method, apparatus and electronic equipment.
Background technology
With the rapid development of Internet technology, the terminals such as mobile phone, tablet computer, PC become increasingly popular, respectively Kind is also come into being dependent on the system of terminal operating, and people not only rely increasingly upon each germline in work and life System, and increasingly higher demands are proposed to the function that system can provide.Along with the raising and reinforcement of the function of system, it is The complexity of the code of system is consequently increased, and thus leads to the stability and reliability decrease of system so that system is being run It is likely to occur various abnormalities in the process.For the accurate location tracked and the system of searching is abnormal, it usually needs be Exception information is obtained in system, positions the code being abnormal in systems according to exception information, is realized to be based on code to different Normal reparation.
In the relevant technologies, in the code being abnormal according to exception information positioning, acquisition system is needed in operation Running log, and running log is analyzed using log analysis tool, the code being abnormal is positioned in running log.
In the implementation of the present invention, inventor has found that the relevant technologies have at least the following problems:
In the running log of the system of acquisition, need to obtain the whole operation days generated in the period that may be abnormal Will since the data volume of running log that system generates in the process of running is very big, causes when analyzing running log A large amount of workload is produced, and the code being abnormal cannot be positioned in real time, it is intelligent relatively low.
Invention content
Cause to produce a large amount of workload when analyzing running log present in the relevant technologies to overcome, and Cannot position the code being abnormal in real time, it is intelligent relatively low the problem of, the present invention provide a kind of Code location method, apparatus and Electronic equipment.
It is according to embodiments of the present invention in a first aspect, provide a kind of Code location method, the method includes:
When the system of detecting is abnormal, acquisition abnormity information and abnormal data, it is different that the exception information carries generation Abnormality code line number of the normal code in the source code of the system, the abnormal data include at least input parameter, output Parameter and operation variable;
Based on the abnormality code line number, abnormality code is positioned in the source code, the abnormality code is described different Code in the code line of normal code line number instruction;
The abnormality code is obtained, generate and shows abnormal notice, the abnormal notice carries the abnormality code, described Exception information and the abnormal data.
In another embodiment, it is described when the system of detecting is abnormal, acquisition abnormity information and abnormal data it Before, the method further includes:
When the access request for receiving the system, based on collecting device, the data established between the system connect It connects;
Based on collecting device, receive the source code of the system transmission, by the system banner of the system with it is described Source code corresponds to storage.
In another embodiment, it is described based on the abnormality code line number, position abnormality code in the source code Including:
Determine the code line number of at least line code in the source code;
It is positioned in the code line number of at least line code, by code line number and the abnormality code line number one Code in the code line of cause is as the abnormality code.
In another embodiment, it is described to be based on the code line number, after positioning abnormality code in the source code, The method further includes:
Based on default notation methods, the exception information and the abnormal data are labeled in the specified of the abnormality code Position.
In another embodiment, it is described to obtain the abnormality code, it generates and shows that abnormal notice includes:
The abnormality code is obtained, determines preset format, the preset format is used to indicate the form notified extremely;
According to the preset format, the abnormality code, the exception information and the abnormal data are combined, it is raw Into the abnormal notice;
Show the abnormal notice.
Second aspect according to embodiments of the present invention, provides a kind of Code location device, and described device includes:
Acquisition module, for when the system of detecting is abnormal, acquisition abnormity information and abnormal data, the exception to be believed Breath carries abnormality code line number of the code being abnormal in the source code of the system, and the abnormal data includes at least defeated Enter parameter, output parameter and operation variable;
Locating module for being based on the abnormality code line number, positions abnormality code, the exception in the source code Code is the code in the code line of abnormality code line number instruction;
Generation module for obtaining the abnormality code, generates and shows abnormal notice, described in the abnormal notice carrying Abnormality code, the exception information and the abnormal data.
In another embodiment, described device further includes:
Module is established, for when the access request for receiving the system, based on collecting device, establishing and the system Between data connection;
Receiving module for being based on collecting device, receives the source code of the system transmission, and what it is by the system is The storage corresponding with the source code of system mark.
In another embodiment, the locating module includes:
Determination sub-module, for determining the code line number of at least line code in the source code;
Submodule is positioned, for being positioned in the code line number of at least line code, by code line number and institute The code in the consistent code line of abnormality code line number is stated as the abnormality code.
In another embodiment, described device further includes:
Labeling module for being based on default notation methods, the exception information and the abnormal data is labeled in described The designated position of abnormality code.
In another embodiment, the generation module includes:
Determination sub-module for obtaining the abnormality code, determines preset format, and the preset format is used to indicate described Extremely the form notified;
Submodule is combined, for according to the preset format, by the abnormality code, the exception information and the exception Data are combined, and generate the abnormal notice;
Submodule is shown, for showing the abnormal notice.
The technical solution that the embodiment of the present invention provides can include the following benefits:
When the system of detecting is abnormal, acquisition abnormity information and abnormal data, and based on the different of exception information carrying Normal code line number, positions abnormality code in source code, obtains abnormality code, generates and shows carrying abnormality code, abnormal letter The abnormal notice of breath and abnormal data, due to when the system of detecting is abnormal, you can acquisition abnormity information and abnormal data, And then exception information and abnormal data are analyzed, it is therefore not necessary in the running log of subsequent extracted system, without to big The running log of amount is analyzed, and can position the code being abnormal in real time, intelligent more excellent.
It should be understood that above general description and following detailed description are only exemplary and explanatory, not It can the limitation present invention.
Description of the drawings
Attached drawing herein is incorporated into specification and forms the part of this specification, shows the implementation for meeting the present invention Example, and be used to explain the principle of the present invention together with specification.
Fig. 1 is the flow chart according to a kind of Code location method shown in an exemplary embodiment;
Fig. 2 is the implementation Organization Chart according to a kind of Code location method shown in an exemplary embodiment;
Fig. 3 is the flow chart according to a kind of Code location method shown in an exemplary embodiment;
Fig. 4 A are the block diagrams according to a kind of Code location device shown in an exemplary embodiment;
Fig. 4 B are the block diagrams according to a kind of Code location device shown in an exemplary embodiment;
Fig. 4 C are the block diagrams according to a kind of Code location device shown in an exemplary embodiment;
Fig. 4 D are the block diagrams according to a kind of Code location device shown in an exemplary embodiment;
Fig. 4 E are the block diagrams according to a kind of Code location device shown in an exemplary embodiment;
Fig. 5 is the block diagram according to a kind of Code location device 500 shown in an exemplary embodiment.
Specific embodiment
Here exemplary embodiment will be illustrated in detail, example is illustrated in the accompanying drawings.Following description is related to During attached drawing, unless otherwise indicated, the same numbers in different attached drawings represent the same or similar element.Following exemplary embodiment Described in embodiment do not represent and the consistent all embodiments of the present invention.On the contrary, they be only with it is such as appended The example of the consistent device and method of some aspects being described in detail in claims, of the invention.
Fig. 1 is according to a kind of flow chart of Code location method shown in an exemplary embodiment, as shown in Figure 1, the party Method includes the following steps.
In a step 101, when the system of detecting is abnormal, acquisition abnormity information and abnormal data, exception information are taken Abnormality code line number of the code that band is abnormal in the source code of system, abnormal data include at least input parameter, output Parameter and operation variable.
In a step 102, based on abnormality code line number, abnormality code is positioned in source code, abnormality code is abnormal generation Code in the code line of code line number instruction.
In step 103, abnormality code is obtained, generates and shows abnormal notice, abnormal notice carries abnormality code, exception Information and abnormal data.
Method provided in an embodiment of the present invention, when the system of detecting is abnormal, acquisition abnormity information and abnormal data, And the abnormality code line number carried based on exception information, abnormality code is positioned in source code, abnormality code is obtained, generates and open up Show the abnormal notice for carrying abnormality code, exception information and abnormal data, due to when the system of detecting is abnormal, you can adopt Collect exception information and abnormal data, and then exception information and abnormal data are analyzed, it is therefore not necessary in subsequent extracted system Running log, analyzed without to a large amount of running log, can position the code being abnormal in real time, it is intelligent compared with It is excellent.
In another embodiment, when the system of detecting is abnormal, before acquisition abnormity information and abnormal data, side Method further includes:
When the access request for the system that receives, based on collecting device, the data connection between system is established;
Based on collecting device, the source code of system transmission is received, by the storage corresponding with source code of the system banner of system.
In another embodiment, based on abnormality code line number, positioning abnormality code includes in source code:
Determine the code line number of at least line code in source code;
It is positioned in the code line number of at least line code, by the code line number code consistent with abnormality code line number Code in row is as abnormality code.
In another embodiment, based on code line number, after positioning abnormality code in source code, method further includes:
Based on default notation methods, exception information and abnormal data are labeled in the designated position of abnormality code.
In another embodiment, abnormality code is obtained, generate and shows that abnormal notice includes:
Abnormality code is obtained, determines preset format, preset format is used to indicate the form notified extremely;
According to preset format, abnormality code, exception information and abnormal data are combined, generate abnormal notice;
The abnormal notice of displaying.
The alternative embodiment that any combination forms the present invention may be used, herein no longer in above-mentioned all optional technical solutions It repeats one by one.
Before detailed explanation is carried out to the embodiment of the present invention, first to the present embodiments relate to Code location Implementation framework simply introduced.
Referring to Fig. 2, the implementation framework of Code location of the present invention includes terminal and alignment system.Terminal can lead to It crosses wireless or cable network to connect with alignment system, terminal can be to be able to access that and set to the electronics of Oriented Systems Transport data Standby, which can be computer, smart mobile phone, tablet computer or other electronic equipments, equipped with system in terminal, be based on System provides various services to the user.
The system that alignment system is used for real-time monitoring terminal, when the system for detecting terminal is abnormal, alignment system Exception information and abnormal data in the system of acquisition terminal, and then based on exception information and abnormal data in the system of terminal The code being abnormal is positioned.During practical application, referring to Fig. 2, collecting device can be included in alignment system And analytical equipment, wherein, collecting device is used to establish data connection with terminal, the source code that terminal uploads is received, by source code Analytical equipment is transmitted to, and when collecting exception information and abnormal data, exception information and abnormal data are transmitted to analysis Equipment.Analytical equipment receives and stores the source code of the system of collecting device upload, and receives collecting device and detecting terminal System in the exception information that uploads when being abnormal and abnormal data, exception information and abnormal data are analyzed, and then The code being abnormal is positioned in the source code of system.
Fig. 3 is according to a kind of flow chart of Code location method shown in an exemplary embodiment, as shown in figure 3, the party Method includes the following steps.
In step 301, when the access request for the system that receives, based on collecting device, the number between system is established According to the source code that connection, the system of reception are transmitted based on collecting device, by the storage corresponding with source code of the system banner of system.
In embodiments of the present invention, the operation of system is substantially the process of multiple programs operation in system, is wrapped in system At least one program is included, when system needs to provide service to the user, at least one of system program just brings into operation.Its In, each program at least one program corresponds to different source codes, and program is by being compiled source code realization Operation.In order to when subsequent detection is abnormal to system, position the code being abnormal, alignment system needs are detecting end During the access at end, the source code in the system that terminal is carried is obtained.
When the system request for receiving terminal accesses, alignment system can establish the data between the system of terminal Connection, and the source code of system transmission is received, by the storage corresponding with source code of the system banner of system.In the process of practical application In, since alignment system can include collecting device and analytical equipment, alignment system can be based on collecting device and receive eventually The access request that the system at end is sent, and the data connection between system is established based on collecting device, it is received by collecting device The source code received is transmitted to analytical equipment and stored by the source code of system transmission, subsequent collecting device.It is of the invention real Example is applied to establish the mode of data connection between alignment system and system and receive the mode of source code without specifically limiting.It examines The system access alignment system that multiple terminals are had in the same time is considered, in order to avoid the system of multiple terminals that will be received Source code obscure, need by system banner it is corresponding with source code storage.Wherein, for the ease of by system banner and source code pair It should be stored, alignment system can be numbered source code when receiving source code, generate the source generation being currently received The corresponding Code Number of code, by Code Number storage corresponding with system banner.Wherein, analytical equipment is in storage source code and system During correspondence between mark, source code listing as shown in Table 1 can be generated.The embodiment of the present invention identifies storage system The mode of correspondence is without specifically limiting between source code.
Table 1
System banner Code Number
System A Source code 1
System B Source code 2
In step 302, when the system of detecting is abnormal, acquisition abnormity information and abnormal data, exception information are taken Abnormality code line number of the code that band is abnormal in the source code of system, abnormal data include at least input parameter, output Parameter and operation variable.
In embodiments of the present invention, when the system of detecting is abnormal, in order to subsequently position the code being abnormal, It needs after detecting and being abnormal, the exception information in system and abnormal data is acquired at once.Due to system operation The operation of substantially program, and multiple functions can be included in the code of program, and program is at runtime, multiple functions in program It can generate in operation including input parameter, output parameter and the data for running variable, these abnormal datas explicitly record The operational process of system Program, therefore, when the system of detecting is abnormal, alignment system can acquire in systems including Input parameter, output parameter and the abnormal data for running variable.
During practical application, if alignment system includes collecting device and analytical equipment, alignment system can To be monitored in real time to the system of the terminal of access based on collecting device, and when the system for monitoring terminal is abnormal, Exception information and abnormal data in the system of collecting device acquisition terminal, and subsequently by collecting device by collected exception Information and abnormal data are transmitted to the analytical equipment in alignment system.
In step 303, the code line number of at least line code in source code is determined, in the code line of at least line code It is positioned in number, the code in the code line that code line number is consistent with abnormality code line number is as abnormality code.
In embodiments of the present invention, abnormality code is in the code line of abnormality code line number instruction carried in exception information Code.After the exception information for the system that collects, abnormality code line number can be extracted in exception information, so as in system The code indicated by abnormality code line number is determined in source code, the code that abnormality code line number is indicated in source code is as different Normal code.Wherein, due to the code in source code be by rows, can first determine at least a line in source code The code line number of code, subsequently, based at least line code of the abnormality code line number carried in exception information in source code Code line number in determine abnormality code.For example, the abnormality code line number carried in exception information is set as 116 rows, then by source generation Whole codes in the 116th row in code at least in line code are as abnormality code.
In step 304, based on default notation methods, exception information and abnormal data are labeled in the specified of abnormality code Position.
In embodiments of the present invention, after abnormality code is determined, since the code that the same time is abnormal may be more It is a, for the ease of developer when checking abnormality code, the related data of abnormality code more can be explicitly obtained, and then The problem of based on abnormality code, exception information and abnormal data to being currently abnormal, is sorted out, and therefore, is determining abnormal generation After code, default notation methods can be based on, exception information and abnormal data are labeled in the designated position of abnormality code.Wherein, Default notation methods can be label mark, label character and lines mark etc., and designated position can be code line where abnormality code The upper left corner, the upper right corner and the lower left corner etc., the embodiment of the present invention is to default notation methods and designated position without specifically limiting.
During practical application, alignment system can be with providing mark setting in its terminal there are data connection Entrance, when detecting that user triggers the mark inlet porting, display notation methods choice box, labeling position choice box and confirmation Button, and when detecting that user triggers the confirming button, obtain user and make in the notation methods that notation methods choice box selects To preset notation methods, labeling position that user is selected in labeling position choice box is obtained as designated position, so as to follow-up When the system of detecting is abnormal, collected exception information when being abnormal is shown based on default notation methods and designated position And abnormal data.
In step 305, abnormality code is obtained, determines preset format, according to preset format, by abnormality code, abnormal letter Breath and abnormal data are combined, and generate abnormal notice, and show abnormal notice, preset format is used to indicate the lattice notified extremely Formula.
In embodiments of the present invention, after abnormality code is determined, abnormality code, exception information and abnormal data can be based on The abnormal notice of generation notifies developer to be based on abnormal notice.Wherein, in the abnormal notice of generation, Ke Yigen Abnormality code, exception information and abnormal data are combined according to the set form in alignment system, generate abnormal notice;Also may be used To set preset format by developer, and according to default radical, abnormality code, exception information and abnormal data are subjected to group It closes, generates abnormal notice.Wherein, preset format can be embedded form, annotation formatting, long form etc., if preset format is Exception information and abnormal data then in the abnormal notice of generation, can be embedded in abnormality code, and then generate by embedded form Abnormal notice;If preset format is annotation formatting, in the abnormal notice of generation, can generate including exception information and exception The callout box of data, and callout box is directed toward the designated position in abnormality code;If preset format is long form, in life During into abnormal notifying, abnormality code, exception information and abnormal data can be arranged display in order.The embodiment of the present invention is to generation Extremely the mode notified is without specifically limiting.
Method provided in an embodiment of the present invention, when the system of detecting is abnormal, acquisition abnormity information and abnormal data, And the abnormality code line number carried based on exception information, abnormality code is positioned in source code, abnormality code is obtained, generates and open up Show the abnormal notice for carrying abnormality code, exception information and abnormal data, due to when the system of detecting is abnormal, you can adopt Collect exception information and abnormal data, and then exception information and abnormal data are analyzed, it is therefore not necessary in subsequent extracted system Running log, analyzed without to a large amount of running log, can position the code being abnormal in real time, it is intelligent compared with It is excellent.
Fig. 4 A are the block diagrams according to a kind of Code location device shown in an exemplary embodiment.With reference to Fig. 4 A, the device Including acquisition module 401, locating module 402 and generation module 403.
The acquisition module 401, for when the system of detecting is abnormal, acquisition abnormity information and abnormal data to be abnormal Abnormality code line number of the code that information carrying is abnormal in the source code of system, abnormal data, which includes at least input, joins Number, output parameter and operation variable;
The locating module 402 for being based on abnormality code line number, positions abnormality code in source code, and abnormality code is Code in the code line of abnormality code line number instruction;
The generation module 403 for obtaining abnormality code, generates and shows abnormal notice, and abnormal notice carries abnormal generation Code, exception information and abnormal data.
Device provided in an embodiment of the present invention, when the system of detecting is abnormal, acquisition abnormity information and abnormal data, And the abnormality code line number carried based on exception information, abnormality code is positioned in source code, abnormality code is obtained, generates and open up Show the abnormal notice for carrying abnormality code, exception information and abnormal data, due to when the system of detecting is abnormal, you can adopt Collect exception information and abnormal data, and then exception information and abnormal data are analyzed, it is therefore not necessary in subsequent extracted system Running log, analyzed without to a large amount of running log, can position the code being abnormal in real time, it is intelligent compared with It is excellent.
In another embodiment, referring to Fig. 4 B, which, which further includes, establishes module 404 and receiving module 405.
This establishes module 404, for when the access request for the system that receives, based on collecting device, establish with system it Between data connection;
The receiving module 405 for being based on collecting device, receives the source code of system transmission, by the system banner of system Storage corresponding with source code.
In another embodiment, referring to Fig. 4 C, the locating module 402, including determination sub-module 4021 and positioning submodule Block 4022.
The determination sub-module 4021, for determining the code line number of at least line code in source code;
The positioning submodule 4022, for being positioned in the code line number of at least line code, by code line number with Code in the consistent code line of abnormality code line number is as abnormality code.
In another embodiment, referring to Fig. 4 D, which further includes labeling module 406.
Exception information and abnormal data for being based on default notation methods, are labeled in abnormality code by the labeling module 406 Designated position.
In another embodiment, referring to Fig. 4 E, which, including determination sub-module 4031, combines submodule 4032 and displaying submodule 4033.
The determination sub-module 4031 for obtaining abnormality code, determines preset format, and preset format is used to indicate abnormal logical The form known;
The combination submodule 4032, for according to preset format, abnormality code, exception information and abnormal data to be carried out group It closes, generates abnormal notice;
The displaying submodule 4033, for showing abnormal notice.
About the device in above-described embodiment, wherein modules perform the concrete mode of operation in related this method Embodiment in be described in detail, explanation will be not set forth in detail herein.
Fig. 5 is the structure diagram of a kind of electronic equipment 500 provided in an embodiment of the present invention.Referring to Fig. 5, the electronic equipment 500 include communication bus, processor, memory and communication interface, can also include, input/output interface and display equipment, In, mutual communication can be completed between each functional unit by bus.The memory is stored with computer program, processing Device for performing the program stored on memory, performs the video data handling procedure in above-described embodiment.
Bus is to connect the circuit of described element and realize between these elements to transmit.For example, processor leads to It crosses bus and receives order from other elements, decrypt the order received, calculating or data processing are performed according to the order of decryption. Memory can include program module, such as kernel (kernel), middleware (middleware), application programming interface (Application Programming Interface, API) and application.The program module can have software, firmware or hard Part or at least two composition therein.Input/output interface forward user by input-output equipment (such as inductor, keyboard, Touch screen) input order or data.Display equipment shows various information to user.Communication interface by the electronic equipment 500 with Other network equipments, user equipment, network are attached.For example, communication interface can be by being wired or wirelessly connected to network To be connected to external other network equipments or user equipment.Wireless communication can include following at least one:Wireless Fidelity (Wireless Fidelity, WiFi), bluetooth (Bluetooth, BT), the short distance wireless communication technology (Near Field Communication, NFC), GPS (Global Positioning System, GPS) and cellular communication (cellular communication) is (for example, Long Term Evolution (Long Term Evolution, LTE), long term evolution The follow-up evolution (Long Term Evolution-Advanced, LTE-A) of technology, CDMA (Code Division Multiple Access, CDMA), wideband code division multiple access (Wideband CDMA, WCDMA), Universal Mobile Communication System (Universal Mobile Telecommunication System, UMTS), wireless broadband Internet access (Wireless Broadband, WiBro) and global system for mobile communications (Global System for Mobile communication, GSM).Wire communication can include following at least one:Universal serial bus (Universal Serial Bus, USB), high definition Clear degree multimedia interface (High Definition Multimedia Interface, HDMI), asynchronous transmission standard interface (Recommended Standard 232, RS-232) and Plain Old Telephone Service (Plain Old Telephone Service, POTS).Network can be telecommunication network and communication network.Communication network can be computer network, internet, object Networking, telephone network.Electronic equipment 500 can connect network by communication interface, and electronic equipment 500 and other network equipments lead to Letter agreement used can be applied, application programming interface (Application Programming Interface, API), middleware, kernel and at least one support of communication interface.
A1, a kind of Code location method, which is characterized in that the method includes:
When the system of detecting is abnormal, acquisition abnormity information and abnormal data, it is different that the exception information carries generation Abnormality code line number of the normal code in the source code of the system, the abnormal data include at least input parameter, output Parameter and operation variable;
Based on the abnormality code line number, abnormality code is positioned in the source code, the abnormality code is described different Code in the code line of normal code line number instruction;
The abnormality code is obtained, generate and shows abnormal notice, the abnormal notice carries the abnormality code, described Exception information and the abnormal data.
A2, according to the method described in claim 1, it is characterized in that, described when the system of detecting is abnormal, acquisition Before exception information and abnormal data, the method further includes:
When the access request for receiving the system, based on collecting device, the data established between the system connect It connects;
Based on collecting device, receive the source code of the system transmission, by the system banner of the system with it is described Source code corresponds to storage.
A3, according to the method described in claim 1, it is characterized in that, described based on the abnormality code line number, described Abnormality code is positioned in source code to include:
Determine the code line number of at least line code in the source code;
It is positioned in the code line number of at least line code, by code line number and the abnormality code line number one Code in the code line of cause is as the abnormality code.
A4, according to the method described in claim 1, it is characterized in that, described based on the code line number, in the source generation In code after positioning abnormality code, the method further includes:
Based on default notation methods, the exception information and the abnormal data are labeled in the specified of the abnormality code Position.
A5, according to the method described in claim 1, it is characterized in that, described obtain the abnormality code, generate and show Abnormal notice includes:
The abnormality code is obtained, determines preset format, the preset format is used to indicate the form notified extremely;
According to the preset format, the abnormality code, the exception information and the abnormal data are combined, it is raw Into the abnormal notice;
Show the abnormal notice.
A6, a kind of Code location device, which is characterized in that described device includes:
Acquisition module, for when the system of detecting is abnormal, acquisition abnormity information and abnormal data, the exception to be believed Breath carries abnormality code line number of the code being abnormal in the source code of the system, and the abnormal data includes at least defeated Enter parameter, output parameter and operation variable;
Locating module for being based on the abnormality code line number, positions abnormality code, the exception in the source code Code is the code in the code line of abnormality code line number instruction;
Generation module for obtaining the abnormality code, generates and shows abnormal notice, described in the abnormal notice carrying Abnormality code, the exception information and the abnormal data.
A7, device according to claim 6, which is characterized in that described device further includes:
Module is established, for when the access request for receiving the system, based on collecting device, establishing and the system Between data connection;
Receiving module for being based on collecting device, receives the source code of the system transmission, and what it is by the system is The storage corresponding with the source code of system mark.
A8, device according to claim 6, which is characterized in that the locating module includes:
Determination sub-module, for determining the code line number of at least line code in the source code;
Submodule is positioned, for being positioned in the code line number of at least line code, by code line number and institute The code in the consistent code line of abnormality code line number is stated as the abnormality code.
A9, device according to claim 6, which is characterized in that described device further includes:
Labeling module for being based on default notation methods, the exception information and the abnormal data is labeled in described The designated position of abnormality code.
A10, device according to claim 6, which is characterized in that the generation module includes:
Determination sub-module for obtaining the abnormality code, determines preset format, and the preset format is used to indicate described Extremely the form notified;
Submodule is combined, for according to the preset format, by the abnormality code, the exception information and the exception Data are combined, and generate the abnormal notice;
Submodule is shown, for showing the abnormal notice.
A11, a kind of electronic equipment, which is characterized in that including the Code location dress described in claim 6 to 10 any one It puts.
A12, a kind of electronic equipment, which is characterized in that including:Memory, for storing executable instruction;
And processor, for communicating to perform the executable instruction so as to complete claim 1 with the memory To the operation of the Code location method described in 5 any one.
Those skilled in the art will readily occur to the present invention its after considering specification and putting into practice invention disclosed herein Its embodiment.This application is intended to cover the present invention any variations, uses, or adaptations, these modifications, purposes or Person's adaptive change follows the general principle of the present invention and including the undocumented common knowledge in the art of the disclosure Or conventional techniques.Description and embodiments are considered only as illustratively, and true scope and spirit of the invention are by following Claim is pointed out.
It should be understood that the invention is not limited in the precision architecture for being described above and being shown in the drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present invention is only limited by appended claim.

Claims (10)

  1. A kind of 1. Code location method, which is characterized in that the method includes:
    When the system of detecting is abnormal, acquisition abnormity information and abnormal data, what the exception information carrying was abnormal Abnormality code line number of the code in the source code of the system, the abnormal data include at least input parameter, output parameter And operation variable;
    Based on the abnormality code line number, abnormality code is positioned in the source code, the abnormality code is the abnormal generation Code in the code line of code line number instruction;
    The abnormality code is obtained, generate and shows abnormal notice, the abnormal notice carries the abnormality code, the exception Information and the abnormal data.
  2. 2. according to the method described in claim 1, it is characterized in that, described when the system of detecting is abnormal, acquisition abnormity Before information and abnormal data, the method further includes:
    When the access request for receiving the system, based on collecting device, the data connection between the system is established;
    Based on collecting device, the source code of the system transmission is received, by the system banner of the system and the source generation The corresponding storage of code.
  3. 3. according to the method described in claim 1, it is characterized in that, described be based on the abnormality code line number, in the source generation Positioning abnormality code includes in code:
    Determine the code line number of at least line code in the source code;
    It is positioned in the code line number of at least line code, code line number is consistent with the abnormality code line number Code in code line is as the abnormality code.
  4. 4. according to the method described in claim 1, it is characterized in that, described be based on the code line number, in the source code After positioning abnormality code, the method further includes:
    Based on default notation methods, the exception information and the abnormal data are labeled in the specific bit of the abnormality code It puts.
  5. 5. according to the method described in claim 1, it is characterized in that, the acquisition abnormality code, generates and shows exception Notice includes:
    The abnormality code is obtained, determines preset format, the preset format is used to indicate the form notified extremely;
    According to the preset format, the abnormality code, the exception information and the abnormal data are combined, generate institute State abnormal notice;
    Show the abnormal notice.
  6. 6. a kind of Code location device, which is characterized in that described device includes:
    Acquisition module, for when the system of detecting is abnormal, acquisition abnormity information and abnormal data, the exception information to be taken Abnormality code line number of the code that band is abnormal in the source code of the system, the abnormal data, which includes at least input, joins Number, output parameter and operation variable;
    Locating module for being based on the abnormality code line number, positions abnormality code, the abnormality code in the source code For the code in the code line of abnormality code line number instruction;
    Generation module for obtaining the abnormality code, generates and shows abnormal notice, and the abnormal notice carries the exception Code, the exception information and the abnormal data.
  7. 7. device according to claim 6, which is characterized in that described device further includes:
    Module is established, for when the access request for receiving the system, based on collecting device, establishing between the system Data connection;
    Receiving module for being based on collecting device, receives the source code of the system transmission, by the system mark of the system Know storage corresponding with the source code.
  8. 8. device according to claim 6, which is characterized in that described device further includes:
    The exception information and the abnormal data for being based on default notation methods, are labeled in the exception by labeling module The designated position of code.
  9. 9. a kind of electronic equipment, which is characterized in that including the Code location device described in claim 6 to 8 any one.
  10. 10. a kind of electronic equipment, which is characterized in that including:Memory, for storing executable instruction;
    And processor, for communicating to perform the executable instruction so as to complete claim 1 to 5 times with the memory The operation of Code location method described in meaning one.
CN201711402595.3A 2017-12-22 2017-12-22 Code positioning method and device and electronic equipment Active CN108132850B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711402595.3A CN108132850B (en) 2017-12-22 2017-12-22 Code positioning method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711402595.3A CN108132850B (en) 2017-12-22 2017-12-22 Code positioning method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN108132850A true CN108132850A (en) 2018-06-08
CN108132850B CN108132850B (en) 2021-06-01

Family

ID=62391435

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711402595.3A Active CN108132850B (en) 2017-12-22 2017-12-22 Code positioning method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN108132850B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111597093A (en) * 2019-02-20 2020-08-28 阿里巴巴集团控股有限公司 Exception handling method, device and equipment
CN112445706A (en) * 2020-11-27 2021-03-05 深圳前海微众银行股份有限公司 Program abnormal code acquisition method and device, electronic equipment and storage medium
CN112527546A (en) * 2020-12-14 2021-03-19 携程旅游网络技术(上海)有限公司 Application exception rapid positioning method, system, equipment and storage medium
CN113535579A (en) * 2021-07-28 2021-10-22 展讯半导体(成都)有限公司 Abnormity positioning method and related device
CN113672429A (en) * 2021-10-25 2021-11-19 深圳市工易付电子科技有限公司 Code exception pushing method, device, equipment and storage medium
CN114217782A (en) * 2022-02-22 2022-03-22 深圳市明源云科技有限公司 Method, device, equipment and medium for automatically generating interactive page
CN116662096A (en) * 2022-12-12 2023-08-29 荣耀终端有限公司 Fault debugging method and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104239219A (en) * 2014-10-21 2014-12-24 中国科学院软件研究所 Software defect positioning technology on-line evaluating and experimenting platform and method based on coverage
CN104731696A (en) * 2013-12-19 2015-06-24 腾讯科技(深圳)有限公司 Method of locating bug in procedure code and relevant device
CN106294134A (en) * 2016-07-29 2017-01-04 腾讯科技(深圳)有限公司 The collapse localization method of code and device
US20170228293A1 (en) * 2016-02-04 2017-08-10 International Business Machines Corporation Providing integrity for data sets backed-up from client systems to objects in a network storage
US20170353195A1 (en) * 2016-06-02 2017-12-07 Texas Instruments Incorporated Methods and apparatus to determine and apply polarity-based error correction code

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104731696A (en) * 2013-12-19 2015-06-24 腾讯科技(深圳)有限公司 Method of locating bug in procedure code and relevant device
CN104239219A (en) * 2014-10-21 2014-12-24 中国科学院软件研究所 Software defect positioning technology on-line evaluating and experimenting platform and method based on coverage
US20170228293A1 (en) * 2016-02-04 2017-08-10 International Business Machines Corporation Providing integrity for data sets backed-up from client systems to objects in a network storage
US20170353195A1 (en) * 2016-06-02 2017-12-07 Texas Instruments Incorporated Methods and apparatus to determine and apply polarity-based error correction code
CN106294134A (en) * 2016-07-29 2017-01-04 腾讯科技(深圳)有限公司 The collapse localization method of code and device

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111597093A (en) * 2019-02-20 2020-08-28 阿里巴巴集团控股有限公司 Exception handling method, device and equipment
CN111597093B (en) * 2019-02-20 2024-04-16 阿里巴巴集团控股有限公司 Exception handling method, device and equipment thereof
CN112445706A (en) * 2020-11-27 2021-03-05 深圳前海微众银行股份有限公司 Program abnormal code acquisition method and device, electronic equipment and storage medium
CN112527546A (en) * 2020-12-14 2021-03-19 携程旅游网络技术(上海)有限公司 Application exception rapid positioning method, system, equipment and storage medium
CN113535579A (en) * 2021-07-28 2021-10-22 展讯半导体(成都)有限公司 Abnormity positioning method and related device
CN113672429A (en) * 2021-10-25 2021-11-19 深圳市工易付电子科技有限公司 Code exception pushing method, device, equipment and storage medium
CN114217782A (en) * 2022-02-22 2022-03-22 深圳市明源云科技有限公司 Method, device, equipment and medium for automatically generating interactive page
CN116662096A (en) * 2022-12-12 2023-08-29 荣耀终端有限公司 Fault debugging method and electronic equipment
CN116662096B (en) * 2022-12-12 2024-04-23 荣耀终端有限公司 Fault debugging method and electronic equipment

Also Published As

Publication number Publication date
CN108132850B (en) 2021-06-01

Similar Documents

Publication Publication Date Title
CN108132850A (en) Code location method, apparatus and electronic equipment
CN105577293B (en) A kind of test method of bluetooth equipment, apparatus and system
US8655336B1 (en) Remote issue logging and reporting of mobile station issues and diagnostic information to manufacturer
CN104811894B (en) Statistical method and device for people flow distribution and server
CN105392178B (en) A kind of method and apparatus for being used to obtain the access information of WAP
CN106535234A (en) Method and device for associating measurement report with user, and method and device for locating Internet surfing problem of user
US11740997B2 (en) Method and apparatus for debugging a device
CN110031746A (en) Chip testing long-distance monitoring method, device, computer equipment and storage medium
CN111274131A (en) Interface testing method and device, electronic equipment and storage medium
CN105491576A (en) Method and device for acquiring network test data
CN112148579A (en) User interface testing method and device
CN105392142A (en) Wireless fidelity Wi-Fi access point information storage method and device
CN112566078A (en) Device connection method and apparatus, storage medium, and electronic apparatus
CN106982463B (en) Positioning method, positioning device, positioning terminal and server based on multiple information
CN106503023A (en) The method and device of prompting nearby friends
CN110928797B (en) Code coupling detection method and device, terminal equipment and storage medium
US20220382821A1 (en) Method for recommending social user, electronic device and non-transitory computer-readable storage medium
CN104156684A (en) Data display method and device thereof
CN103168481B (en) The operational administrative of call center
CN107370863B (en) Connection information updating method and device based on Bluetooth connection
CN112911629A (en) Network testing method and device and computer readable storage medium
CN105989159A (en) Information pushing method, device and system
CN113965476B (en) Inspection method, device and equipment based on application
CN112398909B (en) Data exchange method, device, equipment and computer readable storage medium
CN115102638B (en) Information acquisition method, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20180920

Address after: 26 Ying Yun street, Singapore

Applicant after: Bit continent Technology Co., Ltd.

Address before: 100029 Beijing Haidian District Austria north industrial base project 6 Building 2 level.

Applicant before: BEIJING BITMAIN TECHNOLOGY CO., LTD.

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210115

Address after: Room A1, 11 / F, punctuality building, 245-251 Hennessy Road, Hong Kong, China

Applicant after: BITMAIN TECHNOLOGY Co.,Ltd.

Address before: 26 Ying Yun street, Singapore

Applicant before: BITMAIN TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210511

Address after: 2701, 27th floor, Central Plaza, 18 Harbour Road, Wanchai, Hong Kong, China

Applicant after: Ant Mining Technology Co.,Ltd.

Address before: Room A1, 11 / F, punctuality building, 245-251 Hennessy Road, Hong Kong, China

Applicant before: BITMAIN TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant