Log information acquisition method and device, electronic equipment and storage medium
By obtaining the initial anchor point on the management node and obtaining the associated logs in the business node, the problems of low efficiency and poor security in the prior art log data integration are solved, and efficient and secure log data acquisition is achieved.
Patent Information
- Application Number
- CN202411802035.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-03-07
AI Technical Summary
In the prior art, log data integration efficiency is low and security is poor, especially in the communication and negotiation methods between business nodes, which leads to inefficient repeated communication and data aggregation. The method of reporting management nodes leads to a large amount of data transmission, and the log data of target tasks cannot be accurately obtained, and the security is poor.
The initial anchor point is obtained based on the task parameters of the target task on the management node and sent it to the initial business node to obtain the initial association log matching the target task; then obtain the call anchor point based on the initial anchor point, and obtain the call association log matching the target task in the at least one calling business node based on the call anchor point and the initial association log; finally obtain the log information of the target task based on the initial association log and the call association log.
It improves the efficiency and security of log data acquisition, saves data transmission resources, avoids filtering of log information, and ensures the security of data transmission.
Smart Images

Figure CN119576728A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of financial technology, and in particular to a method, device, electronic device and storage medium for obtaining log information. Background Art
[0002] As the business types of financial institutions continue to increase, the business processing flow of the business system often spans multiple loosely coupled business nodes, which requires integrating the logs of the target tasks in each business node to achieve comprehensive management of business tasks.
[0003] In the prior art, log data integration of target tasks is usually completed in the following two ways: one is data interaction between various business nodes, which aggregates log data through communication and negotiation between various business nodes; the other is that each business node reports all log data to the management node, which screens and aggregates them.
[0004] However, the communication and negotiation method between business nodes requires repeated communication due to the existence of calls and jumps, and the data aggregation efficiency is poor; and the aggregation method of reporting to the management node causes the management node to obtain a large amount of transmission data, and it is impossible to accurately obtain the log data of the target task, which not only wastes a lot of transmission resources, but also has low efficiency in screening log information. At the same time, the security of this data transmission method is poor. Summary of the invention
[0005] The present invention provides a log information acquisition method, device, electronic device and storage medium to solve the problems of low log data integration efficiency and poor security.
[0006] According to one aspect of the present invention, a method for obtaining log information is provided, which is applied to a management node and includes:
[0007] Acquire an initial anchor point according to the task parameters of the target task, and send the initial anchor point to the initial service node to acquire an initial associated log matching the target task;
[0008] Acquire a call anchor point according to the initial anchor point, and acquire a call association log matching the target task in at least one call service node according to the call anchor point and the call information in the initial association log;
[0009] The log information of the target task is obtained according to the initial association log and the call association log.
[0010] The obtaining of a call association log matching the target task in at least one calling service node according to the call anchor point and the call information in the initial association log includes: obtaining a call anchor point of a downstream calling service node according to the call anchor point of an upstream calling service node; obtaining a call association log matching the target task in the downstream calling service node according to the call anchor point of the downstream calling service node and the call information in the call association log matching the target task in the upstream calling service node.
[0011] According to one aspect of the present invention, a method for obtaining log information is provided, which is applied to a service node and includes:
[0012] In response to obtaining the initial anchor point sent by the management node, obtaining an initial associated log matching the target task according to the initial anchor point;
[0013] Sending the initial association log to the management node; wherein the initial anchor point is generated based on the task parameters of the target task;
[0014] or in response to obtaining the call anchor point sent by the management node, obtaining the call association log matching the target task according to the call anchor point;
[0015] The call association log is sent to the management node; wherein the call anchor point is generated based on the initial anchor point.
[0016] Before obtaining the initial anchor point sent by the management node, it also includes: in response to obtaining the initiation request of the target task, configuring the initial anchor point according to the task parameters of the target task, and adding the initial anchor point to the business log; generating a call anchor point according to the initial anchor point, and sending the call anchor point to the calling business node, so that the calling business node adds the call anchor point to the business log; deleting the call anchor point.
[0017] Before obtaining the call anchor point sent by the management node, it also includes: in response to obtaining the call anchor point sent by the initial business node, or the call anchor point sent by the upstream calling business node, adding the call anchor point sent by the initial business node or the upstream calling business node to the business log.
[0018] Before obtaining the call anchor point sent by the management node, it also includes: in response to obtaining the initial anchor point sent by the initial business node, or the first call anchor point sent by the upstream calling business node, generating a second call anchor point according to the initial anchor point or the first call anchor point, and adding the second call anchor point to the business log; deleting the initial anchor point or the first call anchor point.
[0019] According to another aspect of the present invention, a log information acquisition device is provided, which is applied to a management node, comprising:
[0020] An initial anchor point acquisition module, used to acquire an initial anchor point according to the task parameters of the target task, and send the initial anchor point to the initial service node to acquire an initial associated log matching the target task;
[0021] A call anchor point acquisition module, configured to acquire a call anchor point according to the initial anchor point, and acquire a call association log matching the target task in at least one call service node according to the call anchor point and the call information in the initial association log;
[0022] The log information acquisition module is used to acquire the log information of the target task according to the initial associated log and the call associated log.
[0023] According to another aspect of the present invention, a log information acquisition device is provided, which is applied to a service node and includes:
[0024] An associated log acquisition module, configured to, in response to obtaining an initial anchor point sent by the management node, obtain an initial associated log matching the target task according to the initial anchor point, or, in response to obtaining a call anchor point sent by the management node, obtain a call associated log matching the target task according to the call anchor point;
[0025] The associated log sending module is used to send the initial associated log to the management node, or send the call associated log to the management node; wherein the initial anchor point is generated based on the task parameters of the target task; and the call anchor point is generated based on the initial anchor point.
[0026] According to another aspect of the present invention, there is provided an electronic device, the electronic device comprising:
[0027] at least one processor; and
[0028] a memory communicatively connected to the at least one processor; wherein,
[0029] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the log information acquisition method described in Embodiment 1 of the present invention, or the log information acquisition method described in Embodiment 2 of the present invention.
[0030] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the log information acquisition method described in Embodiment 1 of the present invention, or the log information acquisition method described in Embodiment 2 of the present invention when executed.
[0031] According to another aspect of the present invention, a computer program product is provided, including a computer program, which, when executed by a processor, implements the log information acquisition method described in Embodiment 1 of the present invention or the log information acquisition method described in Embodiment 2 of the present invention.
[0032] According to the technical solution of the embodiment of the present invention, the management node obtains the initial anchor point according to the task parameters of the target task, and sends the initial anchor point to the initial business node to obtain the initial associated log matching the target task; obtains the call anchor point according to the initial anchor point, and obtains the call associated log matching the target task in at least one calling business node according to the call anchor point and the call information in the initial associated log; obtains the log information of the target task according to the initial associated log and the call associated log. Thus, the management node directionally obtains the log information of the target task from each business node based on the calculated anchor point, which not only improves the security of data transmission, but also saves data transmission resources, avoids the screening of log information, and improves the efficiency of log data acquisition.
[0033] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0035] Figure 1 is a flow chart of a method for obtaining log information provided according to Embodiment 1 of the present invention;
[0036] Figure 2 is a flowchart of another method for obtaining log information provided according to Embodiment 2 of the present invention;
[0037] Figure 3 is a schematic diagram of a target task processing flow provided according to Embodiment 3 of the present invention;
[0038] Figure 4is a flowchart of another method for obtaining log information provided according to Embodiment 4 of the present invention;
[0039] Figure 5 is a structural schematic diagram of a log information acquisition device provided according to Embodiment 5 of the present invention;
[0040] Figure 6 is a structural schematic diagram of another log information acquisition device provided according to Embodiment 6 of the present invention;
[0041] Figure 7 It is a structural schematic diagram of an electronic device that implements the log information acquisition method of an embodiment of the present invention. DETAILED DESCRIPTION
[0042] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0043] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0044] Embodiment 1
[0045] Figure 1 A flowchart of a log information acquisition method provided in Embodiment 1 of the present invention. This embodiment can be applied to a management node to acquire log information of a target task from each business node based on an anchor point generated by calculation. This method can be executed by a log information acquisition device in any Embodiment 5 of the present invention. The log information acquisition device can be implemented in the form of hardware and / or software. The log information acquisition device can be configured in an electronic device. The electronic device can be used as a management node in a business system. The management node is connected to each business node in communication. Figure 1 As shown, the method includes:
[0046] S101. Acquire an initial anchor point according to task parameters of a target task, and send the initial anchor point to an initial service node to acquire an initial associated log matching the target task.
[0047] For a task that needs to be processed (i.e., the target task), it is often necessary for different business nodes in the business chain to perform different steps of business processing respectively, until each business node completes the relevant calculations and returns to the initial node to display the business processing results to the user through the initial node; the business chain can be represented in the form of a business system, and each business node can be represented in the form of a business subsystem; the initial business node is the first node in the business chain and is also the recipient of the task; taking a transaction task as an example, when a user initiates a task processing request through an ATM, the above-mentioned ATM is the initial business node, that is, the initiating node of the user's transaction task.
[0048] An anchor point is identification information generated by the current business node or upstream business node, which is used as identification information of a task in the business log. A task has only one anchor point in a business node, and the business node records each log information of the task through the anchor point. For example, the anchor point can be inserted into a specified position of the log information (for example, the beginning, the end, or the middle, etc.), so as to associate each log information related to the task in the business log through the anchor point; in addition, a task has different anchor points in different business nodes, and different tasks in a business node have different anchor points.
[0049] When the target task reaches the initial service node, the initial service node calculates and obtains the anchor point (i.e., the initial anchor point) according to the task parameters of the target task; wherein the task parameters may include the task name, the name of the initiator and the receiving time, and one or more of the parameters such as the certificate information, address information, and contact information of the initiator; optionally, in the embodiment of the present invention, the parameter items and the number of parameters included in the task parameters are not specifically limited. The calculation rules of the anchor point of each service node can be pre-planned, for example, it can be calculated and obtained by a one-way hash algorithm; different service nodes can be configured with different calculation rules.
[0050] For example, the anchor point calculation rule of business node A is to first add the task parameters and then use the one-way hash algorithm to calculate the anchor point; the anchor point calculation rule of business node B is to first subtract the task parameters and then use the one-way hash algorithm to calculate the anchor point. In addition, a business node can also be configured with different calculation rules for different types of tasks. For example, for A1 type tasks, business node A can first add 1 to the task parameters and then use the one-way hash algorithm to calculate the anchor point; for A2 type tasks, business node A can first add 2 to the task parameters and then use the one-way hash algorithm to calculate the anchor point.
[0051] The initial business node configures the calculated initial anchor point to its own business log, so that when the business log records the log information of the target task, the initial anchor point is marked in each log information related to the target task; among which, the log information related to the target task in the business log of the initial business node includes four types, namely, start information, call information, intermediate information and end information.
[0052] The start information is the first log information related to the target task after the target task enters the business node, which indicates that the current business node starts to execute the target task; the end information is the last log information related to the target task, which indicates that business node A has ended the execution of the target task; the intermediate information is the log information of each intermediate processing process related to the target task in the current business node; the call information is the log information of the current business node calling other business nodes to continue processing the target task, which indicates that the processing of the target task in the current business node is temporarily ended, and it needs to be continued by other nodes, and after the processing of other nodes is completed, it will continue to return to the current business node.
[0053] When the management node counts the log information of the target task, it generates an initial anchor point based on the task parameters of the target task through the anchor point calculation rules pre-agreed with the initial business node, or the anchor point calculation rules for the current task type pre-agreed with the initial business node, and sends the initial anchor point to the initial business node. After obtaining the initial anchor point sent by the management node, the initial business node obtains the log information related to the target task in the business log according to the initial anchor point, that is, the initial association log, and then sends the initial association log to the management node; obviously, the initial association log includes the above-mentioned start information, call information, intermediate information and end information.
[0054] S102: Acquire a call anchor point according to the initial anchor point, and acquire a call association log matching the target task in at least one call service node according to the call anchor point and the call information in the initial association log.
[0055] As described in the above technical solution, the initial business node involves calling other business nodes during the processing process to continue processing the target task through other business nodes; calling the business node indicates that the current business node is not the initial business node, but a business node called by the initial business node or other calling business nodes; in the business log, the above calling process is reflected in the calling information, that is, the calling information reflects the identity information of other business nodes called by the current business node; the calling anchor point refers to the anchor point in the called business node, that is, the anchor point in other business nodes except the initial business node in the business link of the target task.
[0056] When the initial business node calls other business nodes, it obtains the call anchor point based on the initial anchor point calculation and sends the call anchor point to the called business node (that is, the calling business node). The calling business node uses the obtained call anchor point as the identification information of the target task in its own business log, that is, when its own business log records the log information of the target task, it marks the call anchor point in each log information related to the target task.
[0057] In particular, the initial business node may use the same calculation method or different calculation methods when calculating the initial anchor point and the calling anchor point; in addition, the log information related to the target task in the business log of the calling business node includes start information, intermediate information and end information; if the calling business node continues to call other business nodes when processing the target task, the log information will also include call information, and the call information also indicates the identity information of the business node it calls; if the calling business node does not call other business nodes when processing the target task, the log information will not include call information.
[0058] After obtaining the initial association log matching the target task, the management node determines the identity information of the calling business node based on the call information therein, and then obtains the calling anchor point based on the initial anchor point calculation; wherein, if the initial business node adopts different calculation methods to calculate the initial anchor point and the calling anchor point respectively, then the management node also generates the calling anchor point based on the initial anchor point calculation according to the calculation order of each anchor point calculation rule pre-agreed with the initial business node, or the calculation order of each anchor point calculation method for the current task type pre-agreed with the initial business node.
[0059] In particular, the initial business node may call different business nodes at different times. When calling each business node, the call anchor point can be calculated based on different anchor point calculation rules. Then for the management node, each call anchor point is calculated in turn through multiple anchor point calculation methods pre-agreed with the initial business node. That is, the management node calculates and obtains the initial anchor point according to the first anchor point calculation rule of the initial business node; calculates and obtains the first call anchor point according to the second anchor point calculation rule, until the N-1th call anchor point is calculated and obtained according to the Nth anchor point calculation rule.
[0060] The management node sends the calculated call anchor point to the calling business node. After obtaining the call anchor point sent by the management node, the calling business node obtains the log information related to the target task in the business log according to the call anchor point, that is, the call association log; and then sends the call association log to the management node; the management node obtains the call association log of the target task in the calling business node based on this.
[0061] S103: Obtain log information of the target task according to the initial association log and the call association log.
[0062] After obtaining the initial associated log in the initial business node and the call associated log in each calling business node, the log information sequence of the target task can be obtained by sorting each log information according to the system timestamp; therefore, when the management node obtains the log information of the target task in each business node, it needs to provide the corresponding anchor point (initial anchor point or call anchor point) to obtain the matching log information; at the same time, except that the initial anchor point is obtained based on the task parameter calculation of the target task, each call anchor point is based on the previous anchor point and is generated by different calculation rules.
[0063] Therefore, the log information of the target task can only be obtained when the previous anchor point (or task parameters) is obtained and the anchor point calculation rules are known. Even if a business node is abnormally invaded, if the anchor point cannot be provided and the matching anchor point calculation rules cannot be known, log information cannot be retrieved from other business nodes, which greatly improves the data security of the distributed business system.
[0064] Optionally, in an embodiment of the present invention, obtaining a call association log in at least one calling business node that matches the target task based on the call anchor point and the call information in the initial association log includes: obtaining a call anchor point of a downstream calling business node based on the call anchor point of the upstream calling business node; obtaining a call association log in the downstream calling business node that matches the target task based on the call anchor point of the downstream calling business node and the call information in the call association log in the upstream calling business node that matches the target task.
[0065] Specifically, as described in the above technical solution, the calling business node may also continue to call other business nodes. For example, the initial business node calls business node A, and business node A calls business node B again. Then, after the management node determines the identity information of the business node B it calls based on the call information in the call association log of business node A (i.e., the upstream calling business node), it calculates and obtains the call anchor point B1 (i.e., the downstream call anchor point) based on the call anchor point A1 in business node A (i.e., the upstream call anchor point) and the anchor point calculation rule A2 pre-booked with business node A, and sends the call anchor point B1 to business node B. Business node B can obtain the matching call association log in the business log based on the call anchor point B1; accordingly, the management node ensures the independent calculation of the call anchor point in each calling business node on the premise of separately obtaining the call association log in the business chain of multi-level calls, and ensures the data security in each calling business node.
[0066] According to the technical solution of the embodiment of the present invention, the management node obtains the initial anchor point according to the task parameters of the target task, and sends the initial anchor point to the initial business node to obtain the initial associated log matching the target task; obtains the call anchor point according to the initial anchor point, and obtains the call associated log matching the target task in at least one calling business node according to the call anchor point and the call information in the initial associated log; obtains the log information of the target task according to the initial associated log and the call associated log. Thus, the management node directionally obtains the log information of the target task from each business node based on the calculated anchor point, which not only improves the security of data transmission, but also saves data transmission resources, avoids the screening of log information, and improves the efficiency of log data acquisition.
[0067] Embodiment 2
[0068] Figure 2A flow chart of a log information acquisition method provided in the second embodiment of the present invention. This embodiment can be applied to a business node to acquire matching log information based on an acquired initial anchor point or a call anchor point. The method can be executed by the log information acquisition device in the sixth embodiment of the present invention. The log information acquisition device can be implemented in the form of hardware and / or software. The log information acquisition device can be configured in an electronic device, and the electronic device can be used as a business node in a business system, such as Figure 2 As shown, the method includes:
[0069] S201: In response to obtaining an initial anchor point sent by a management node, obtaining an initial associated log matching a target task according to the initial anchor point.
[0070] S202: Send the initial association log to the management node; wherein the initial anchor point is generated based on the task parameters of the target task.
[0071] S203: In response to obtaining the call anchor point sent by the management node, obtain a call association log matching the target task according to the call anchor point.
[0072] S204: Send the call association log to the management node; wherein the call anchor point is generated based on the initial anchor point.
[0073] The current business node may exist as the initial business node of the target task, or as the calling business node of the target task; when it serves as the initial business node, it completes the query, acquisition and issuance of the initial associated log based on the initial anchor point sent by the management node; when it serves as the calling business node, it completes the query, acquisition and issuance of the call associated log based on the initial call point sent by the management node; therefore, when the management node obtains the log information in the business node, it uses the anchor point obtained by its calculation as the basis for acquisition, and each anchor point is calculated and obtained based on the previous anchor point or task parameters, thereby not only ensuring the security of the access request in the business node, but also reducing the data transmission volume, saving data transmission resources, and improving the efficiency of log information transmission.
[0074] In particular, a business node may appear in different business links at the same time. For different types of tasks, it may carry different node types. That is, for some tasks, it exists as the initial business node, and for other tasks, it exists as the calling business node. Therefore, the business node needs to determine the node type it carries based on the task type issued by the management node, and then calculate and obtain the corresponding anchor point.
[0075] Optionally, in an embodiment of the present invention, before obtaining the initial anchor point sent by the management node, it also includes: in response to obtaining the initiation request of the target task, configuring the initial anchor point according to the task parameters of the target task, and adding the initial anchor point to the business log; generating a call anchor point according to the initial anchor point, and sending the call anchor point to the calling business node, so that the calling business node adds the call anchor point to the business log; deleting the call anchor point.
[0076] Specifically, as described in the above technical solution, if the current business node exists as the initial business node of the target task, then after the initial business node obtains the initiation request of the target task and calculates the initial anchor point, if it determines that other business nodes need to be called, a call anchor point is generated according to the initial anchor point, and after sending the call anchor point to the calling business node, the call anchor point is deleted locally, so that when an intrusion occurs in the current business node, the intruder cannot find the anchor point information of the downstream calling node, and thus cannot obtain the log information of the downstream calling node, thereby ensuring the data security of other business nodes in the business system.
[0077] Optionally, in an embodiment of the present invention, before obtaining the call anchor point sent by the management node, it also includes: in response to obtaining the call anchor point sent by the initial business node, or the call anchor point sent by the upstream calling business node, adding the call anchor point sent by the initial business node or the upstream calling business node to the business log.
[0078] Specifically, as described in the above technical solution, if the current business node exists as the calling business node of the target task, then the calling business node needs to obtain the calling anchor point issued by its upstream business node (initial business node or calling business node), and use this identifier to represent the log information of the target task in the local business log, thereby establishing an association between the local log information and the upstream business node, which facilitates the management node to obtain log information in each business node in turn based on the business link.
[0079] Optionally, in an embodiment of the present invention, before obtaining the call anchor point sent by the management node, it also includes: in response to obtaining the initial anchor point sent by the initial business node, or the first call anchor point sent by the upstream calling business node, generating a second call anchor point according to the initial anchor point or the first call anchor point, and adding the second call anchor point to the business log; deleting the initial anchor point or the first call anchor point.
[0080] Specifically, the upstream business node can also send its own anchor point to the downstream business node; where, if the upstream business node is the initial business node, the anchor point it sends is the initial anchor point, and if the upstream business node is the calling business node, the anchor point it sends is the calling anchor point (that is, the first calling anchor point); the downstream business node calculates and obtains the calling anchor point (that is, the second calling anchor point) based on the anchor point sent by the upstream business node, and adds the second calling anchor point to the business log. At the same time, after calculating and obtaining the second calling anchor point, the received initial anchor point or the first calling anchor point is deleted. Similarly, when an intrusion occurs in the current business node, the intruder cannot find the anchor point information of the adjacent calling node, and thus cannot obtain the log information of the upstream calling node and the downstream calling node, thereby ensuring the data security of other business nodes in the business system.
[0081] According to the technical solution of the embodiment of the present invention, the business node obtains the associated log matching the target task according to the initial anchor point or the call anchor point sent by the management node, and then sends the call associated log to the management node; thereby, not only the security of the access request in the business node is ensured, but also the data transmission amount is reduced, the data transmission resources are saved, and the log data transmission efficiency is improved.
[0082] Embodiment 3
[0083] Figure 3 A schematic diagram of a target task processing flow provided in Embodiment 3 of the present invention, Figure 3 In the example, a business system consisting of three business nodes is used to illustrate the generation process of the initial anchor point and the call anchor point. Figure 3 As shown, the method includes:
[0084] After the target task is initiated, it first enters the business node A (i.e., the initial business node) of the business system, that is, business node A obtains the initiation request of the target task; business node A generates anchor point A1 (initial anchor point) according to the task parameters of the target task, and adds anchor point A1 to the business log; the business log records the starting information of the target task according to anchor point A1; business node A needs to call business node B, and the business log of business node A records the calling information of the target task according to anchor point A1; at the same time, business node A generates anchor point B1 (calling anchor point) according to anchor point A1, and sends anchor point B1 to business node A; then business node A deletes anchor point B1.
[0085] After receiving anchor point B1, business node B adds anchor point B1 to the business log. The business log records the starting information of the target task based on anchor point B1. Then business node B needs to call business node C. The business log of business node B records the calling information of the target task based on anchor point B1. At the same time, business node B generates anchor point C1 (calling anchor point) based on anchor point B1 and sends anchor point C1 to business node C. After that, business node B deletes anchor point C1.
[0086] After receiving anchor point C1, business node C adds anchor point C1 to the business log, and the business log records the start information, intermediate information and end information of the target task according to anchor point C1; after processing, business node C returns the processing result to business node B; business node B continues to perform business processing according to the processing result in business node C, and the business log records the intermediate information and end information of the target task according to anchor point B1; after processing, business node B returns the processing result to business node A; business node A continues to perform business processing according to the processing result in business node C, and the business log records the intermediate information and end information of the target task according to anchor point A1.
[0087] According to the technical solution of the embodiment of the present invention, each business node in the business system obtains an anchor point generated based on an upstream anchor point or task parameters, marks the log data of the target task according to the anchor point, and uses the anchor point as the basis for obtaining the log information, thereby ensuring the security of access requests in the business nodes.
[0088] Embodiment 4
[0089] Figure 4 A flowchart of a method for obtaining log information provided by Embodiment 4 of the present invention is provided. Figure 4 The management node obtains the complete log information of the target task through business node A, business node B and business node C respectively, such as Figure 4 As shown, the method includes:
[0090] The management node calculates the initial anchor point (i.e., anchor point A1) according to the task parameters of the target task, and sends anchor point A1 to business node A; business node A obtains the initial association log according to anchor point A1; business node A sends the initial association log to the management node; the management node determines that the calling object is business node B according to the calling information in the initial association log; the management node calculates anchor point B1 (i.e., the first calling anchor point) according to anchor point A1; the management node sends anchor point B1 to business node B.
[0091] Business node B obtains the call association log (i.e., the first call association log) according to anchor point B1; business node B sends the first call association log to the management node; the management node determines that the call object is business node C according to the call information in the call association log; the management node calculates and obtains anchor point C1 (the second call anchor point) according to anchor point B1; the management node sends anchor point C1 to business node C. Business node C obtains the call association log (i.e., the second call association log) according to the second call anchor point; business node C sends the second call association log to the management node; the management node sorts the log information in chronological order according to the obtained initial association log, the first call association log, and the second call association log to obtain the complete log information of the target task.
[0092] According to the technical solution of the embodiment of the present invention, the management node directionally obtains the log data of the target task from each business node based on the anchor point obtained by calculation, which not only improves the security of data transmission, but also saves data transmission resources, avoids the screening of log information, and improves the efficiency of log data acquisition.
[0093] Embodiment 5
[0094] Figure 5 : is a structural block diagram of a log information acquisition device provided by Embodiment 5 of the present invention, the device is applied to a management node, and specifically includes:
[0095] An initial anchor point acquisition module 501 is used to acquire an initial anchor point according to the task parameters of the target task, and send the initial anchor point to an initial service node to acquire an initial associated log matching the target task;
[0096] A call anchor point acquisition module 502, configured to acquire a call anchor point according to the initial anchor point, and acquire a call association log matching the target task in at least one call service node according to the call anchor point and the call information in the initial association log;
[0097] The log information acquisition module 503 is used to acquire the log information of the target task according to the initial associated log and the call associated log.
[0098] According to the technical solution of the embodiment of the present invention, the management node obtains the initial anchor point according to the task parameters of the target task, and sends the initial anchor point to the initial business node to obtain the initial associated log matching the target task; obtains the call anchor point according to the initial anchor point, and obtains the call associated log matching the target task in at least one calling business node according to the call anchor point and the call information in the initial associated log; obtains the log information of the target task according to the initial associated log and the call associated log. Thus, the management node directionally obtains the log information of the target task from each business node based on the calculated anchor point, which not only improves the security of data transmission, but also saves data transmission resources, avoids the screening of log information, and improves the efficiency of log data acquisition.
[0099] Optionally, a call anchor point acquisition module 502 is specifically used to obtain a call anchor point of a downstream call business node based on a call anchor point of an upstream call business node; and to obtain a call association log in the downstream call business node that matches the target task based on the call anchor point of the downstream call business node and the call information in the call association log in the upstream call business node that matches the target task.
[0100] The above device can execute the log information acquisition method provided in the first embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method. For technical details not described in detail in this embodiment, please refer to the log information acquisition method provided in the first embodiment of the present invention.
[0101] Embodiment 6
[0102] Figure 6 : is a structural block diagram of a log information acquisition device provided by Embodiment 6 of the present invention, the device is applied to a service node, and specifically includes:
[0103] The associated log acquisition module 601 is used for, in response to obtaining an initial anchor point sent by the management node, obtaining an initial associated log matching the target task according to the initial anchor point, or in response to obtaining a call anchor point sent by the management node, obtaining a call associated log matching the target task according to the call anchor point;
[0104] The associated log sending module 602 is used to send the initial associated log to the management node, or send the call associated log to the management node; wherein the initial anchor point is generated based on the task parameters of the target task; and the call anchor point is generated based on the initial anchor point.
[0105] According to the technical solution of the embodiment of the present invention, the business node obtains the associated log matching the target task according to the initial anchor point or the call anchor point sent by the management node, and then sends the call associated log to the management node; thereby, not only the security of the access request in the business node is ensured, but also the data transmission amount is reduced, the data transmission resources are saved, and the log data transmission efficiency is improved.
[0106] Optionally, the log information acquisition device is also used to respond to the initiation request of the target task, configure the initial anchor point according to the task parameters of the target task, and add the initial anchor point to the business log; generate a call anchor point according to the initial anchor point, and send the call anchor point to the calling business node so that the calling business node adds the call anchor point to the business log; and delete the call anchor point.
[0107] Optionally, the log information acquisition device is also used to add the call anchor point sent by the initial business node or the upstream calling business node to the business log in response to obtaining the call anchor point sent by the initial business node or the upstream calling business node.
[0108] Optionally, the log information acquisition device is also used to generate a second call anchor point in response to acquiring an initial anchor point sent by an initial business node, or a first call anchor point sent by an upstream calling business node, based on the initial anchor point or the first call anchor point, and add the second call anchor point to the business log; and delete the initial anchor point or the first call anchor point.
[0109] The above device can execute the log information acquisition method provided in the second embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method. For technical details not described in detail in this embodiment, please refer to the log information acquisition method provided in the second embodiment of the present invention.
[0110] Embodiment 7
[0111] Figure 7 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, electronic devices, blade electronic devices, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0112] like Figure 7 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0113] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0114] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 11 executes the various methods and processes described above, such as a log information acquisition method.
[0115] In some embodiments, the log information acquisition method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit. In some embodiments, part or all of the computer program may be loaded and / or installed on a heterogeneous hardware accelerator via a ROM and / or a communication unit. When the computer program is loaded into RAM and executed by a processor, one or more steps of the log information acquisition method described above may be performed. Alternatively, in other embodiments, the processor may be configured to execute the log information acquisition method by any other appropriate means (e.g., by means of firmware).
[0116] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0117] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or electronic device.
[0118] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0119] To provide interaction with a user, the systems and techniques described herein may be implemented on a heterogeneous hardware accelerator having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) through which a user can provide input to the heterogeneous hardware accelerator. Other types of devices may also be used to provide interaction with a user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0120] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data electronic device), or a computing system that includes middleware components (e.g., an application electronic device), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0121] The computing system may include a client and an electronic device. The client and the electronic device are generally remote from each other and usually interact through a communication network. The relationship between the client and the electronic device is generated by computer programs running on corresponding computers and having a client-electronic device relationship with each other. The electronic device may be a cloud electronic device, also known as a cloud computing electronic device or a cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0122] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0123] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for obtaining log information, characterized in that: Applicable to management nodes, including: Acquire an initial anchor point according to the task parameters of the target task, and send the initial anchor point to the initial service node to acquire an initial associated log matching the target task; Acquire a call anchor point according to the initial anchor point, and acquire a call association log matching the target task in at least one call service node according to the call anchor point and the call information in the initial association log; The log information of the target task is obtained according to the initial association log and the call association log.
2. The method according to claim 1, characterized in that: The acquiring, according to the call anchor point and the call information in the initial association log, a call association log matching the target task in at least one call service node comprises: According to the call anchor point of the upstream calling business node, obtain the call anchor point of the downstream calling business node; According to the call anchor point of the downstream calling service node and the call information in the call association log matching the target task in the upstream calling service node, the call association log in the downstream calling service node matching the target task is acquired.
3. A method for obtaining log information, characterized in that: Applied to business nodes, including: In response to obtaining the initial anchor point sent by the management node, obtaining an initial associated log matching the target task according to the initial anchor point; Sending the initial association log to the management node; wherein the initial anchor point is generated based on the task parameters of the target task; or in response to obtaining the call anchor point sent by the management node, obtaining the call association log matching the target task according to the call anchor point; The call association log is sent to the management node; wherein the call anchor point is generated based on the initial anchor point.
4. The method according to claim 3, characterized in that: Before obtaining the initial anchor point sent by the management node, it also includes: In response to obtaining the initiation request of the target task, configuring the initial anchor point according to the task parameters of the target task, and adding the initial anchor point to the business log; Generate a call anchor point according to the initial anchor point, and send the call anchor point to a calling service node, so that the calling service node adds the call anchor point to a service log; Delete the call anchor.
5. The method according to claim 3, characterized in that: Before obtaining the call anchor point sent by the management node, it also includes: In response to acquiring the call anchor point sent by the initial service node or the call anchor point sent by the upstream calling service node, the call anchor point sent by the initial service node or the upstream calling service node is added to the service log.
6. The method according to claim 3, characterized in that Before obtaining the call anchor point sent by the management node, it also includes: In response to acquiring an initial anchor point sent by an initial service node, or a first call anchor point sent by an upstream calling service node, generating a second call anchor point according to the initial anchor point or the first call anchor point, and adding the second call anchor point to a service log; The initial anchor point or the first calling anchor point is deleted.
7. A log information acquisition device, characterized in that: Applicable to management nodes, including: An initial anchor point acquisition module, used to acquire an initial anchor point according to the task parameters of the target task, and send the initial anchor point to the initial service node to acquire an initial associated log matching the target task; A call anchor point acquisition module, configured to acquire a call anchor point according to the initial anchor point, and acquire a call association log matching the target task in at least one call service node according to the call anchor point and the call information in the initial association log; The log information acquisition module is used to acquire the log information of the target task according to the initial associated log and the call associated log.
8. A log information acquisition device, characterized in that: Applied to business nodes, including: An associated log acquisition module, configured to, in response to obtaining an initial anchor point sent by the management node, obtain an initial associated log matching the target task according to the initial anchor point, or, in response to obtaining a call anchor point sent by the management node, obtain a call associated log matching the target task according to the call anchor point; The associated log sending module is used to send the initial associated log to the management node, or send the call associated log to the management node; wherein the initial anchor point is generated based on the task parameters of the target task; and the call anchor point is generated based on the initial anchor point.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the log information acquisition method described in any one of claims 1-2, or the log information acquisition method described in any one of claims 3-6.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the log information acquisition method according to any one of claims 1 to 2, or the log information acquisition method according to any one of claims 3 to 6 when executed.