CN110113189B - Method and device for positioning error node of release system - Google Patents
Method and device for positioning error node of release system Download PDFInfo
- Publication number
- CN110113189B CN110113189B CN201910335304.6A CN201910335304A CN110113189B CN 110113189 B CN110113189 B CN 110113189B CN 201910335304 A CN201910335304 A CN 201910335304A CN 110113189 B CN110113189 B CN 110113189B
- Authority
- CN
- China
- Prior art keywords
- release
- project
- node
- publishing
- error
- 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.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
- H04L41/0677—Localisation of faults
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer And Data Communications (AREA)
- Debugging And Monitoring (AREA)
Abstract
本发明实施例公开一种发布系统出错节点的定位方法及装置,其中方法包括如下步骤:根据待发布系统的相关数据生成与之对应的唯一发布id;在调取待发布系统指示的第一发布工程时,输出发布开始信息;当第一发布工程被调用结束时,判断是否存在针对调用结束生成的发布结束信息,根据发布开始信息和发布结束信息的生成情况,定位待发布系统在发布过程中出现的发布错误的节点。采用本发明,在进行发布前生成本次发布的唯一id,之后发布系统调用每个子模块或者关联系统,在调用前和返回结果之前将进行两次数据上报,根据数据上报的情况对错误节点进行定位,可以无需遍历系统发布时的所有查询日志,即可快速定位错误节点。
The embodiment of the present invention discloses a method and device for locating an error node in a publishing system, wherein the method includes the following steps: generating a unique publishing id corresponding to the relevant data of the system to be published; During the project, output the release start information; when the first release project is called and ended, determine whether there is release end information generated for the end of the call, and locate the system to be released in the release process according to the generation of the release start information and release end information. The node on which the publishing error occurred. By adopting the present invention, the unique id of this release is generated before the release, and then the release system calls each sub-module or associated system, and the data is reported twice before the call and before the result is returned, and the error node is processed according to the data report. Locate, you can quickly locate the faulty node without traversing all the query logs when the system is released.
Description
技术领域technical field
本发明涉及互联网技术领域,尤其涉及一种发布系统出错节点的定位方法及装置。The invention relates to the field of Internet technologies, and in particular, to a method and device for locating an error node in a publishing system.
背景技术Background technique
发布系统是公司用来将开发人员编写的代码、资源推送到现网服务器提供服务的系统。由于发布系统涉及多个系统对接,多个子模块处理,涉及到跨域跨机房网络传输,当发布系统出现发布出错问题时,需要层层查询日志文档,一步一步定位问题,极其耗时耗力,从而影响了系统发布的时效性。The publishing system is a system used by the company to push the code and resources written by the developers to the live network server to provide services. Since the publishing system involves multiple system docking, multiple sub-module processing, and cross-domain and cross-machine room network transmission, when publishing errors occur in the publishing system, it is necessary to query the log files layer by layer and locate the problem step by step, which is extremely time-consuming and labor-intensive. This affects the timeliness of system release.
发明内容SUMMARY OF THE INVENTION
本发明实施例提供一种发布系统出错节点的定位方法及装置,在进行发布前生成本次发布的唯一id,之后发布系统调用每个子模块或者关联系统,在调用前和返回结果之前将进行两次数据上报,根据数据上报的情况对错误节点进行定位,可以无需遍历系统发布时的所有查询日志,即可快速定位错误节点。Embodiments of the present invention provide a method and device for locating an error node in a publishing system. Before publishing, a unique id for the current publishing is generated. After that, the publishing system calls each sub-module or associated system. Two steps are performed before calling and before returning the result. Secondary data reporting, the faulty node is located according to the data reporting situation, and the faulty node can be quickly located without traversing all the query logs when the system is released.
本发明实施例第一方面提供了一种发布系统出错节点的定位方法,可包括:A first aspect of the embodiments of the present invention provides a method for locating an error node in a publishing system, which may include:
根据待发布系统的相关数据生成与之对应的唯一发布id;Generate a unique release id corresponding to the relevant data of the system to be released;
在调取待发布系统指示的第一发布工程时,输出发布开始信息,发布开始信息包括唯一发布id与第一发布工程的工程id以及初始调用状态信息;When retrieving the first release project indicated by the system to be released, the release start information is output, and the release start information includes the unique release id, the project id of the first release project, and the initial invocation state information;
当第一发布工程被调用结束时,判断是否存在针对调用结束生成的发布结束信息,发布结束信息包括唯一发布id与工程id以及调用第一发布工程的调用结果;When the first release project is called and ended, it is judged whether there is release end information generated for the end of the call, and the release end information includes the unique release id and the project id and the calling result of calling the first release project;
根据发布开始信息和发布结束信息的生成情况,定位待发布系统在发布过程中出现的发布错误的节点。According to the generation of the release start information and the release end information, locate the node where the release error occurred in the release process of the system to be released.
进一步的,上述方法还包括:Further, the above method also includes:
当检测到针对待发布系统的发布操作时,获取待发布系统的相关数据,相关数据至少包括发布系统中发布工程的工程id、发布者id以及发布版本号。When a release operation for the system to be released is detected, relevant data of the system to be released is obtained, and the relevant data at least includes the project id of the released project in the release system, the id of the publisher, and the release version number.
进一步的,上述根据发布开始信息和发布结束信息的生成情况,定位待发布系统在发布过程中出现的发布错误的节点,包括:Further, according to the generation of the release start information and the release end information, locate the node of the release error that occurs in the release process of the system to be released, including:
当第一发布工程被调用结束后,未检测到针对调用结束生成的发布结束信息,确定发布错误的节点位于第一发布工程的调用中;When the first release project is called and finished, the release end information generated for the end of the call is not detected, and it is determined that the node that publishes the error is located in the call of the first release project;
当检测到发布结束信息,但未检测到针对第二发布工程的发布开始信息时,确定发布错误的节点位于第二发布工程的调用中。When the release end information is detected, but the release start information for the second release project is not detected, it is determined that the node that releases the error is located in the invocation of the second release project.
进一步的,上述方法还包括:Further, the above method also includes:
根据待发布系统和第二发布工程的系统日志,确定网络出现问题的目标节点,目标节点为待发布系统所在的节点端和/或第二发布工程所在的节点端。According to the system log of the system to be released and the second release project, determine the target node where the network problem occurs, and the target node is the node end where the system to be released and/or the node end where the second release project is located.
进一步的,上述方法还包括:Further, the above method also includes:
当确定待发布系统在调用发布工程的过程中出现错误节点时,根据工程id查找对应的唯一发布id;When it is determined that the system to be released has an error node in the process of calling the release project, search for the corresponding unique release id according to the project id;
根据唯一发布id确认发布出错的链路,溯源发布错误的节点。According to the unique publishing id, confirm the link that publishes the error, and trace the node that publishes the error.
进一步的,上述第一发布工程和第二发布工程均包括发布系统的关联系统和/或发布系统内部的发布模块。Further, the above-mentioned first release project and second release project both include an associated system of the release system and/or a release module inside the release system.
本发明实施例第二方面提供了一种发布系统出错节点的定位装置,可包括:A second aspect of the embodiments of the present invention provides a device for locating an error node in a publishing system, which may include:
唯一id生成单元,用于根据待发布系统的相关数据生成与之对应的唯一发布id;The unique id generation unit is used to generate a unique release id corresponding to the relevant data of the system to be released;
开始信息上报单元,用于在调取待发布系统指示的第一发布工程时,输出发布开始信息,发布开始信息包括唯一发布id与第一发布工程的工程id以及初始调用状态信息;The start information reporting unit is used to output the release start information when retrieving the first release project indicated by the system to be released, and the release start information includes the unique release id, the project id of the first release project and the initial invocation state information;
结束信息上报单元,用于当第一发布工程被调用结束时,判断是否存在针对调用结束生成的发布结束信息,发布结束信息包括唯一发布id与工程id以及调用第一发布工程的调用结果;The end information reporting unit is used to judge whether there is release end information generated for the end of the call when the first release project is called and ended, and the release end information includes the unique release id and the project id and the calling result of calling the first release project;
错误节点定位单元,用于根据发布开始信息和发布结束信息的生成情况,定位待发布系统在发布过程中出现的发布错误的节点。The error node locating unit is used for locating the node of the publishing error that occurs in the publishing process of the system to be published according to the generation of the publishing start information and the publishing end information.
进一步的,上述装置还包括:Further, the above-mentioned device also includes:
相关数据获取单元,用于当检测到针对待发布系统的发布操作时,获取待发布系统的相关数据,相关数据至少包括发布系统中发布工程的工程id、发布者id以及发布版本号。The relevant data acquisition unit is used to acquire relevant data of the system to be released when a release operation for the system to be released is detected, and the relevant data at least includes the project id, publisher id and release version number of the released project in the release system.
进一步的,上述错误节点定位单元包括:Further, the above-mentioned error node location unit includes:
第一节点定位子单元,用于当第一发布工程被调用结束后,未检测到针对调用结束生成的发布结束信息,确定发布错误的节点位于第一发布工程的调用中;The first node locating subunit is used for, after the first publishing project is called and finished, the publishing end information generated for the end of the calling is not detected, and it is determined that the node with the publishing error is located in the calling of the first publishing project;
第二节点定位子单元,用于当检测到发布结束信息,但未检测到针对第二发布工程的发布开始信息时,确定发布错误的节点位于第二发布工程的调用中。The second node locating subunit is configured to determine that the node that publishes the error is located in the calling of the second publishing project when the publishing end information is detected but the publishing start information for the second publishing project is not detected.
进一步的,上述第二节点定位子单元,具体用于根据待发布系统和第二发布工程的系统日志,确定网络出现问题的目标节点,目标节点为待发布系统所在的节点端和/或第二发布工程所在的节点端。Further, the above-mentioned second node locating subunit is specifically used to determine the target node with a problem in the network according to the system log of the system to be released and the second release project, and the target node is the node where the system to be released is located and/or the second node. Publish the node where the project is located.
进一步的,上述装置还包括:Further, the above-mentioned device also includes:
id查找单元,用于当确定待发布系统在调用发布工程的过程中出现错误节点时,根据工程id查找对应的唯一发布id;The id search unit is used to find the corresponding unique release id according to the project id when it is determined that the system to be released has an error node in the process of calling the release project;
节点溯源单元,用于根据唯一发布id确认发布出错的链路,溯源发布错误的节点。The node source tracing unit is used to confirm the link that publishes the error according to the unique publishing id, and trace the node that publishes the error.
进一步的,上述第一发布工程和第二发布工程均包括发布系统的关联系统和/或发布系统内部的发布模块。Further, the above-mentioned first release project and second release project both include an associated system of the release system and/or a release module inside the release system.
在本发明实施例中,在进行系统发布前生成本次发布的唯一id,之后发布系统调用每个子模块或者关联系统,在调用前和返回结果之前将进行两次数据上报,根据数据上报的情况对错误节点进行定位,当出现错误节点时,无需遍历系统发布时的所有查询日志,达到了快速定位错误节点的目的,提高了系统发布的时效性。In the embodiment of the present invention, the unique id of this release is generated before the system release, and then the release system calls each sub-module or associated system, and the data is reported twice before the call and before the result is returned. According to the situation of the data report The faulty node is located. When the faulty node occurs, there is no need to traverse all the query logs when the system is released, which achieves the purpose of quickly locating the faulty node and improves the timeliness of the system's release.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍。In order to illustrate the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings that are required in the description of the embodiments or the prior art.
图1是本发明实施例提供的一种发布系统出错节点的定位方法的流程示意图;1 is a schematic flowchart of a method for locating an error node in a publishing system according to an embodiment of the present invention;
图2是本发明实施例提供的一种系统发布的流程示意图;2 is a schematic flowchart of a system release provided by an embodiment of the present invention;
图3是本发明实施例提供的一种发布系统出错节点的定位装置的结构示意图;3 is a schematic structural diagram of a device for locating an error node in a publishing system according to an embodiment of the present invention;
图4是本发明实施例提供的错误节点定位单元的结构示意图。FIG. 4 is a schematic structural diagram of an error node location unit provided by an embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
本发明实施例提供的发布系统出错节点的定位方法可以应用于快速定位系统发布时出现发布错误的节点的应用场景。The method for locating an error node in a publishing system provided by the embodiment of the present invention can be applied to an application scenario of quickly locating a node with a publishing error during system publishing.
需要说明的是,本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例。It should be noted that the terms "first", "second", etc. in the description and claims of the present application and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific sequence or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances for the embodiments of the application described herein.
下面将结合附图1,对本发明实施例提供的发布系统出错节点的定位方法进行详细介绍。A method for locating an error node in a publishing system provided by an embodiment of the present invention will be described in detail below with reference to FIG. 1 .
请参见图1,为本发明实施例提供了一种发布系统出错节点的定位方法的流程示意图。如图1所示,本发明实施例的所述方法可以包括以下步骤S101-步骤S104。Please refer to FIG. 1 , which is a schematic flowchart of a method for locating an error node in a publishing system according to an embodiment of the present invention. As shown in FIG. 1 , the method in this embodiment of the present invention may include the following steps S101 to S104.
S101,根据待发布系统的相关数据生成与之对应的唯一发布id。S101 , according to the relevant data of the system to be released, a unique release id corresponding to the system is generated.
可以理解的是,当一个待发布系统的发布审批通过后,用户可以点击该系统对应工程的发布按钮开始系统发布,当上述装置检测到针对待发布系统的发布操作时,可以获取待发布系统的相关数据,该数据至少可以包括待发布系统中发布工程的工程id、发布者id以及发布版本号,上述发布工程可以为待发布系统内部的发布模块或者是待发布系统的关联系统。It can be understood that after the release approval of a system to be released is approved, the user can click the release button of the corresponding project of the system to start the system release, and when the above device detects the release operation for the system to be released, it can obtain the system to be released. Relevant data, the data may at least include the project id, publisher id and release version number of the project to be released in the system to be released, and the above-mentioned project to be released may be a release module within the system to be released or an associated system of the system to be released.
进一步的,上述装置可以生成与上述相关数据相对应的唯一发布id,此id可以与本次的发布进行绑定,以便后续通过该id进行节点溯源。Further, the above-mentioned device can generate a unique release id corresponding to the above-mentioned relevant data, and this id can be bound with the current release, so that the node can be traced through the id later.
S102,在调取待发布系统指示的第一发布工程时,输出发布开始信息。S102, when retrieving the first release project indicated by the system to be released, output release start information.
具体的,在调取待发布系统指示的第一发布工程时,上述装置可以生成并输出开始发布信息,该信息可以包括上述唯一发布id、第一发布工程的工程id以及第一发布工程的初始调用状态信息。Specifically, when retrieving the first release project indicated by the system to be released, the above-mentioned device may generate and output start release information, and the information may include the above-mentioned unique release id, the project id of the first release project, and the initial release of the first release project. Call status information.
S103,当第一发布工程被调用结束时,判断是否存在针对调用结束生成的发布结束信息。S103 , when the first release project is called to end, determine whether there is release end information generated for the end of the call.
具体的,当第一发布工程被调用结束时,上述装置可以生成发布结束信息,若系统调用中出现错误,则发布结束信息会生成失败,因此,上述装置可以在第一发布工程调用结束时,检测是否生成了上述发布结束信息,以便后续根据该信息定位系统发布中出现的错误节点。Specifically, when the first release project is called and finished, the above-mentioned apparatus may generate release end information. If an error occurs in the system call, the release end information will fail to be generated. Therefore, the above-mentioned apparatus may, when the first release project is called, It is detected whether the above-mentioned release end information is generated, so as to locate the error node occurring in the system release according to the information subsequently.
S104,根据发布开始信息和发布结束信息的生成情况,定位待发布系统在发布过程中出现的发布错误的节点。S104, according to the generation of the release start information and the release end information, locate the node where the release error occurs in the release process of the system to be released.
具体的,上述装置可以根据发布开始信息和发布结束信息的生成情况,定位待发布系统在发布过程中出现的发布错误的节点,例如,当第一发布工程被调用结束后,未检测到上述发布结束信息,则可以确定发布错误的节点位于第一发布工程的调用中;当检测到发布结束信息,但未检测到针对第二发布工程的发布开始信息时,可以确定发布错误的节点位于第二发布工程的调用中。可以理解的是,上述第二发布工程可以是在第一发布工程发布成功后,顺序调用的发布工程。Specifically, the above-mentioned device can locate the node where the publishing error occurs in the publishing process of the system to be published according to the generation of the publishing start information and the publishing end information. For example, when the first publishing project is called and finished, the above publishing is not detected. end information, it can be determined that the node that publishes the error is located in the call of the first publishing project; when the publishing end information is detected, but the publishing start information for the second publishing project is not detected, it can be determined that the node that publishes the error is located in the second publishing project. In the call to publish the project. It can be understood that the above-mentioned second release project may be a release project that is sequentially invoked after the first release project is successfully released.
需要说明的是,上述装置在确定发布错误的节点位于第二发布工程的调用中之后,可以根据待发布系统和第二发布工程的系统日志,确定网络出现问题的目标节点,该目标节点可以是待发布系统所在的节点端或者第二发布工程所在的节点端,或者两节点端均是目标节点。It should be noted that, after the above-mentioned device determines that the node that publishes the error is located in the call of the second publishing project, it can determine the target node with a problem in the network according to the system log of the system to be published and the second publishing project, and the target node can be The node end where the system to be published is located or the node end where the second publishing project is located, or both node ends are target nodes.
可以理解的是,上述第一发布工程和第二发布工程均可以包括发布系统的关联系统和/或发布系统内部的发布模块。例如,在某次发布中,在关联系统A中,只上报了一次开始调用本系统的数据,没有第二次上报系统处理结果的数据,则可以确认本次出错在关联系统A的调用中。如果在关联系统A处理完成后,两次分别上报了关联系统A的初始以及结束数据,并未流转到下一步的关联系统B中,则可以确认发布系统与关联系统B之间的网络已断开,然后根据发布系统与关联系统B的日志即可定位是由发布系统(本地)或者关联系统B(对端)网络出现了问题。对于发布系统内部各个子模块出现的问题,与关联系统排查类似,如果同一发布模块在当次发布中只存在一次数据上报,则是调用该发布模块出错;如果同一发布模块在当次发布中有两次数据上报,而下一发布模块未进行上报,则需要排查两个发布模块间调用的逻辑,可能存在调用返回出错的问题或者程序异常的问题,此时只需要查询发布系统日志内的错误信息即可定位问题。It can be understood that, both the above-mentioned first release project and the second release project may include an associated system of the release system and/or a release module inside the release system. For example, in a certain release, in the associated system A, only the data that starts to call the system is reported once, and there is no data to report the processing result of the system for the second time, then it can be confirmed that the error occurred in the invocation of the associated system A. If the initial and end data of the associated system A are reported twice after the associated system A is processed, but are not transferred to the associated system B in the next step, it can be confirmed that the network between the publishing system and the associated system B has been disconnected. Then, according to the logs of the publishing system and the associated system B, it can be determined that there is a problem with the publishing system (local) or the associated system B (peer) network. For the problems that occur in each sub-module within the publishing system, it is similar to the related system troubleshooting. If the same publishing module has only one data report in the current publishing, there is an error in calling the publishing module; if the same publishing module has data in the current publishing If the data is reported twice, but the next publishing module does not report, it is necessary to check the logic of the call between the two publishing modules. There may be an error in the call returning or the program is abnormal. In this case, only the errors in the publishing system log need to be queried. information to locate the problem.
可以理解的是,当确定待发布系统在调用发布工程的过程中出现错误节点时,上述装置可以根据上述工程id查找对应的唯一发布id,再根据唯一发布id确认发布出错的链路,溯源发布错误的目标节点。It can be understood that, when it is determined that the system to be released has an error node in the process of invoking the release project, the above-mentioned device can search for the corresponding unique release id according to the above project id, and then confirm the link with the release error according to the unique release id, and trace the release to the source. Bad target node.
在本发明实施例中,在进行系统发布前生成本次发布的唯一id,之后发布系统调用每个子模块或者关联系统,在调用前和返回结果之前将进行两次数据上报,根据数据上报的情况对错误节点进行定位,当出现错误节点时,无需遍历系统发布时的所有查询日志,达到了快速定位错误节点的目的,提高了系统发布的时效性。In the embodiment of the present invention, the unique id of this release is generated before the system release, and then the release system calls each sub-module or associated system, and the data is reported twice before the call and before the result is returned. According to the situation of the data report The faulty node is located. When the faulty node occurs, there is no need to traverse all the query logs when the system is released, which achieves the purpose of quickly locating the faulty node and improves the timeliness of the system's release.
在本发明实施例的一种具体实现方式中,系统的发布流程可以如图2所示,主要包括:S201,发布系统准备流程;S202,发布系统对接代码推送;S203,生成唯一发布id,存储每个关联系统或内部模块的两次调用结果。In a specific implementation manner of the embodiment of the present invention, the publishing process of the system may be as shown in FIG. 2, which mainly includes: S201, the publishing system preparation process; S202, the publishing system docking code push; S203, generating a unique publishing id, storing The result of two calls for each associated system or internal module.
S201,发布系统准备流程,可以包括三个模块:连接代码服务器获取新增代码。修改代码打包。写入发布服务器ip和对应路径。可以理解的是,上述代码服务器可以是外部系统的服务器,上述新增代码可以是需要发布的新增代码。S201, the release system preparation process may include three modules: connecting to a code server to obtain newly added codes. Modify code packaging. Write the publisher ip and corresponding path. It can be understood that the above-mentioned code server may be a server of an external system, and the above-mentioned newly added code may be newly added code that needs to be released.
S202,发布系统对接代码推送,可以包括四个模块:根据ip连接对应服务器,通过代码推送系统上传代码到指定的ip设备。执行前置脚本,暂停已有服务。发布更新代码。执行后置脚本,重启发布。可以理解的是,上述对应服务器即指定的ip设备在接收到发布的系统数据时,需要暂停已有的其他服务,来接收上述系统数据,接收成功后,可以重启设备,在该设备端进行系统发布。S202, the release system docking code push may include four modules: connect to the corresponding server according to the ip, and upload the code to the specified ip device through the code push system. Execute the pre-script to suspend existing services. Post updated code. Execute the post script and restart the publish. It can be understood that when the above-mentioned corresponding server, that is, the designated ip device, needs to suspend other existing services to receive the above-mentioned system data when it receives the released system data, after successful reception, the device can be restarted and the system can be executed on the device side. release.
S203,生成唯一发布id,存储每个关联系统或内部模块的两次调用结果。可以理解的是,生成唯一发布id是在审批通过后,系统发布准备流程之前执行的,而存储每个关联系统或内部模块的两次调用结果在每次系统发布准备流程,和每次发布系统对接代码推送的过程中均需要执行。S203, a unique release id is generated, and the result of two calls of each associated system or internal module is stored. It is understandable that the generation of the unique release id is performed after the approval and before the system release preparation process, and the two invocation results of each associated system or internal module are stored in each system release preparation process, and each release system. It needs to be executed during the process of docking code push.
需要说明的是,存储每个关联系统或内部模块的两次调用结果,目的是为了根据调用结果在系统发布错误时定位错误节点。具体的,错误节点的定位方法可以参见上述方法实施例中的具体描述,此处不再赘述。It should be noted that the purpose of storing two invocation results of each associated system or internal module is to locate the faulty node when the system issues an error according to the invocation results. Specifically, for the method for locating the faulty node, reference may be made to the specific descriptions in the foregoing method embodiments, and details are not described herein again.
需要说明的是,在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行,并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。It should be noted that the steps shown in the flowcharts of the accompanying drawings may be executed in a computer system, such as a set of computer-executable instructions, and, although a logical sequence is shown in the flowcharts, in some cases, Steps shown or described may be performed in an order different from that herein.
下面将结合附图3和附图4,对本发明实施例提供的发布系统出错节点的定位装置进行详细介绍。需要说明的是,附图3和附图4所示发布系统出错节点的定位装置,用于执行本发明图1和图2所示实施例的方法,为了便于说明,仅示出了与本发明实施例相关的部分,具体技术细节未揭示的,请参照本发明图1和图2所示的实施例。The following will describe in detail the device for locating an error node in a publishing system provided by an embodiment of the present invention with reference to FIG. 3 and FIG. 4 . It should be noted that the device for locating an error node in the publishing system shown in FIG. 3 and FIG. 4 is used to execute the method of the embodiment shown in FIG. 1 and FIG. 2 of the present invention. For the part related to the embodiment, the specific technical details are not disclosed, please refer to the embodiment shown in FIG. 1 and FIG. 2 of the present invention.
请参见图3,为本发明实施例提供了一种发布系统出错节点的定位装置的结构示意图。如图3所示,本发明实施例的出错节点的定位装置10可以包括:唯一id生成单元101、开始信息上报单元102、结束信息上报单元103、错误节点定位单元104、相关数据获取单元105、id查找单元106和节点溯源单元107。其中,错误节点定位单元104如图4所示,包括第一节点定位子单元1041以及第二节点定位子单元1042。Please refer to FIG. 3 , which is a schematic structural diagram of an apparatus for locating an error node in a publishing system according to an embodiment of the present invention. As shown in FIG. 3 , the device 10 for locating an error node according to the embodiment of the present invention may include: a unique
唯一id生成单元101,用于根据待发布系统的相关数据生成与之对应的唯一发布id。The unique
可以理解的是,当一个待发布系统的发布审批通过后,用户可以点击该系统对应工程的发布按钮开始系统发布,当相关数据获取单元105检测到针对待发布系统的发布操作时,可以获取待发布系统的相关数据,该数据至少可以包括待发布系统中发布工程的工程id、发布者id以及发布版本号,上述发布工程可以为待发布系统内部的发布模块或者是待发布系统的关联系统。It can be understood that, after the release approval of a system to be released is approved, the user can click the release button of the corresponding project of the system to start the system release. Relevant data of the publishing system, the data may at least include the project id, publisher id, and publishing version number of the publishing project in the system to be published. The publishing project may be a publishing module within the system to be published or an associated system of the system to be published.
进一步的,唯一id生成单元101可以生成与上述相关数据相对应的唯一发布id,此id可以与本次的发布进行绑定,以便后续通过该id进行节点溯源。Further, the unique
开始信息上报单元102,用于在调取待发布系统指示的第一发布工程时,输出发布开始信息。The start information reporting unit 102 is configured to output the release start information when retrieving the first release project indicated by the system to be released.
具体实现中,在调取待发布系统指示的第一发布工程时,开始信息上报单元102可以生成并输出开始发布信息,该信息可以包括上述唯一发布id、第一发布工程的工程id以及第一发布工程的初始调用状态信息。In a specific implementation, when retrieving the first release project indicated by the system to be released, the start information reporting unit 102 may generate and output start release information, and the information may include the above-mentioned unique release id, the project id of the first release project, and the first release project. Publish the initial invocation status information of the project.
结束信息上报单元103,用于当第一发布工程被调用结束时,判断是否存在针对调用结束生成的发布结束信息。The end
具体实现中,当第一发布工程被调用结束时,结束信息上报单元103可以生成发布结束信息,若系统调用中出现错误,则发布结束信息会生成失败,因此,结束信息上报单元103可以在第一发布工程调用结束时,检测是否生成了上述发布结束信息,以便后续根据该信息定位系统发布中出现的错误节点。In a specific implementation, when the first release project is called and ended, the end
错误节点定位单元104,用于根据发布开始信息和发布结束信息的生成情况,定位待发布系统在发布过程中出现的发布错误的节点。The error
具体实现中,错误节点定位单元104可以根据发布开始信息和发布结束信息的生成情况,定位待发布系统在发布过程中出现的发布错误的节点,例如,当第一发布工程被调用结束后,未检测到上述发布结束信息,则第一节点定位子单元1041可以确定发布错误的节点位于第一发布工程的调用中;当检测到发布结束信息,但未检测到针对第二发布工程的发布开始信息时,第二节点定位子单元1042可以确定发布错误的节点位于第二发布工程的调用中。可以理解的是,上述第二发布工程可以是在第一发布工程发布成功后,顺序调用的发布工程。In a specific implementation, the error
需要说明的是,上述装置在确定发布错误的节点位于第二发布工程的调用中之后,第二节点定位子单元1042可以根据待发布系统和第二发布工程的系统日志,确定网络出现问题的目标节点,该目标节点可以是待发布系统所在的节点端或者第二发布工程所在的节点端,或者两节点端均是目标节点。It should be noted that, after the above device determines that the node that publishes the error is located in the call of the second publishing project, the second node positioning sub-unit 1042 can determine the target of the network problem according to the system log of the system to be published and the second publishing project. node, the target node may be the node end where the system to be published is located or the node end where the second publishing project is located, or both node ends are target nodes.
可以理解的是,上述第一发布工程和第二发布工程均可以包括发布系统的关联系统和/或发布系统内部的发布模块。例如,在某次发布中,在关联系统A中,只上报了一次开始调用本系统的数据,没有第二次上报系统处理结果的数据,则可以确认本次出错在关联系统A的调用中。如果在关联系统A处理完成后,两次分别上报了关联系统A的初始以及结束数据,并未流转到下一步的关联系统B中,则可以确认发布系统与关联系统B之间的网络已断开,然后根据发布系统与关联系统B的日志即可定位是由发布系统(本地)或者关联系统B(对端)网络出现了问题。对于发布系统内部各个子模块出现的问题,与关联系统排查类似,如果同一发布模块在当次发布中只存在一次数据上报,则是调用该发布模块出错;如果同一发布模块在当次发布中有两次数据上报,而下一发布模块未进行上报,则需要排查两个发布模块间调用的逻辑,可能存在调用返回出错的问题或者程序异常的问题,此时只需要查询发布系统日志内的错误信息即可定位问题。It can be understood that, both the above-mentioned first release project and the second release project may include an associated system of the release system and/or a release module inside the release system. For example, in a certain release, in the associated system A, only the data that starts to call the system is reported once, and there is no data to report the processing result of the system for the second time, then it can be confirmed that the error occurred in the invocation of the associated system A. If the initial and end data of the associated system A are reported twice after the associated system A is processed, but are not transferred to the associated system B in the next step, it can be confirmed that the network between the publishing system and the associated system B has been disconnected. Then, according to the logs of the publishing system and the associated system B, it can be determined that there is a problem with the publishing system (local) or the associated system B (peer) network. For the problems that occur in each sub-module within the publishing system, it is similar to the related system troubleshooting. If the same publishing module has only one data report in the current publishing, there is an error in calling the publishing module; if the same publishing module has data in the current publishing If the data is reported twice, but the next publishing module does not report, it is necessary to check the logic of the call between the two publishing modules. There may be an error in the call returning or the program is abnormal. In this case, only the errors in the publishing system log need to be queried. information to locate the problem.
可以理解的是,当确定待发布系统在调用发布工程的过程中出现错误节点时,id查找单元106可以根据上述工程id查找对应的唯一发布id,节点溯源单元107再根据唯一发布id确认发布出错的链路,溯源发布错误的目标节点。It can be understood that when it is determined that the system to be released has an error node in the process of calling the release project, the
在本发明实施例中,在进行系统发布前生成本次发布的唯一id,之后发布系统调用每个子模块或者关联系统,在调用前和返回结果之前将进行两次数据上报,根据数据上报的情况对错误节点进行定位,当出现错误节点时,无需遍历系统发布时的所有查询日志,达到了快速定位错误节点的目的,提高了系统发布的时效性。In the embodiment of the present invention, the unique id of this release is generated before the system release, and then the release system calls each sub-module or associated system, and the data is reported twice before the call and before the result is returned. According to the situation of the data report The faulty node is located. When the faulty node occurs, there is no need to traverse all the query logs when the system is released, which achieves the purpose of quickly locating the faulty node and improves the timeliness of the system's release.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random AccessMemory,RAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and the program is During execution, it may include the processes of the embodiments of the above-mentioned methods. The storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM) or the like.
以上所揭露的仅为本发明较佳实施例而已,当然不能以此来限定本发明之权利范围,因此依本发明权利要求所作的等同变化,仍属本发明所涵盖的范围。The above disclosures are only preferred embodiments of the present invention, and of course, the scope of the rights of the present invention cannot be limited by this. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.
Claims (2)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910335304.6A CN110113189B (en) | 2019-04-24 | 2019-04-24 | Method and device for positioning error node of release system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910335304.6A CN110113189B (en) | 2019-04-24 | 2019-04-24 | Method and device for positioning error node of release system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110113189A CN110113189A (en) | 2019-08-09 |
CN110113189B true CN110113189B (en) | 2022-05-06 |
Family
ID=67486508
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910335304.6A Active CN110113189B (en) | 2019-04-24 | 2019-04-24 | Method and device for positioning error node of release system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110113189B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104346265A (en) * | 2013-07-29 | 2015-02-11 | 比亚迪股份有限公司 | Terminal equipment and acquisition method and device for log information thereof |
CN105868940A (en) * | 2016-06-01 | 2016-08-17 | 黄绍华 | Grid fault information issuing and processing system |
CN106254199A (en) * | 2016-09-19 | 2016-12-21 | 重庆世纪之光科技实业有限公司 | Unidirectional ring network fault point positioning method, concentrator, terminal unit and system |
CN108156046A (en) * | 2016-12-06 | 2018-06-12 | 中国移动通信有限公司研究院 | Distributed route detecting method and device |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5217647B2 (en) * | 2008-06-04 | 2013-06-19 | 富士通株式会社 | Information processing apparatus and information processing method |
-
2019
- 2019-04-24 CN CN201910335304.6A patent/CN110113189B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104346265A (en) * | 2013-07-29 | 2015-02-11 | 比亚迪股份有限公司 | Terminal equipment and acquisition method and device for log information thereof |
CN105868940A (en) * | 2016-06-01 | 2016-08-17 | 黄绍华 | Grid fault information issuing and processing system |
CN106254199A (en) * | 2016-09-19 | 2016-12-21 | 重庆世纪之光科技实业有限公司 | Unidirectional ring network fault point positioning method, concentrator, terminal unit and system |
CN108156046A (en) * | 2016-12-06 | 2018-06-12 | 中国移动通信有限公司研究院 | Distributed route detecting method and device |
Also Published As
Publication number | Publication date |
---|---|
CN110113189A (en) | 2019-08-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104360920B (en) | A kind of automatic interface testing method and device | |
CN111124755B (en) | Fault recovery method and device for cluster nodes, electronic equipment and storage medium | |
CN111857978A (en) | Distributed transaction processing method, apparatus, computer equipment and storage medium | |
US9483384B2 (en) | Generation of software test code | |
CN111581077B (en) | Smart contract testing method and device | |
US20200042310A1 (en) | Automated software package deployment | |
CN114064475B (en) | Cloud native application testing method, device, equipment and storage medium | |
CN111459835A (en) | Service debugging method and device, electronic equipment and computer readable storage medium | |
CN108664385A (en) | A kind of test method and device of application programming interface | |
CN113986669A (en) | Call chain tracking and business analysis method based on AOP annotation | |
CN115391228A (en) | Accurate testing methods, devices, equipment and media | |
CN113379501A (en) | Message pushing method and device, electronic equipment and storage medium | |
CN111124429B (en) | Continuous delivery method and device | |
CN111506339A (en) | Method and device for processing change information of Software Development Kit (SDK) | |
CN111597020B (en) | Application programming interface API debugging method and debugging terminal | |
CN110113189B (en) | Method and device for positioning error node of release system | |
CN113836017A (en) | Remote debugging method, system, computing device and storage medium | |
CN118694756A (en) | Adaptive downloading method, device, electronic device and computer readable medium | |
CN115827500B (en) | A debugging method, device, equipment and storage medium for cloud-native applications | |
CN114237956B (en) | Message middleware fault location method, device, equipment and medium | |
CN111857797A (en) | An image construction method, system and related device | |
CN115203050A (en) | Method and device for determining dependency relationship of services | |
US20200167264A1 (en) | Multi-level debugger | |
CN115344317A (en) | Multi-version compatible request processing method, device, device and readable storage medium | |
CN117118986B (en) | Block chain-based fault tolerance verification method, device, equipment and 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address | ||
CP03 | Change of name, title or address |
Address after: 200125, Room 325, 3rd Floor, Unit 2, No. 231, Shibocun Road, China (Shanghai) Pilot Free Trade Zone, Pudong New Area, Shanghai Patentee after: Wheel interconnection technology (Shanghai) Co.,Ltd. Address before: 200125 Room 501, 5 / F, building 3, 3601 Dongfang Road, Pudong New Area, Shanghai Patentee before: SHANGHAI YIDIAN SPACE NETWORK Co.,Ltd. |
|
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20250506 Address after: Room 802b, building 2, 2570 Hechuan Road, Minhang District, Shanghai 201103 Patentee after: SHANGHAI CHELUN INTERNET SERVICES Co.,Ltd. Country or region after: China Address before: 200125, Room 325, 3rd Floor, Unit 2, No. 231, Shibocun Road, China (Shanghai) Pilot Free Trade Zone, Pudong New Area, Shanghai Patentee before: Wheel interconnection technology (Shanghai) Co.,Ltd. Country or region before: China |