A method, apparatus, vehicle, and electronic device for cleaning call chain data.
By using call chain tracing for data collection, storage, transfer, and link splicing, combined with anomaly detection, the problem of limited data upload in vehicle-side SOA call chains was solved, thereby improving system performance.
Patent Information
- Application Number
- CN202211622167.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-16
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2042-12-16
AI Technical Summary
The vehicle-side SOA call chain data upload is restricted, and the upper limit of mobile data volume is low, which leads to reduced system performance and high system resource consumption for data transmission.
Data is collected by calling chain tracing, stored in the cache, transferred in response to the trigger information of the background detection thread, and chain splicing and anomaly detection are performed to obtain the target chain data and send it to the terminal.
It significantly reduces the amount of data that needs to be transmitted, lowers the system resource consumption of data process communication, and improves system performance.
Smart Images

Figure CN115827617B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to a method, apparatus, vehicle, electronic device, and computer-readable storage medium for cleaning call chain data. Background Technology
[0002] Among related technologies, SOA (Service-Oriented Architecture) has been widely used in the Internet field and is now being comprehensively applied in the automotive field. SOA call chains also coexist with SOA services, but SOA call chains still have many limitations in in-vehicle applications. One of these limitations is the relatively low upper limit of mobile data volume on the vehicle side, making it impossible to upload all the data from the SOA call chain. This results in data upload defects, and the data transmission consumes significant system resources, easily leading to a decrease in system performance.
[0003] Therefore, there is an urgent need for a method to clean call chain data on the vehicle side, thereby reducing the amount of data to be transmitted, reducing resource consumption during communication, and improving system performance. Summary of the Invention
[0004] To overcome the problems existing in related technologies, this disclosure provides a method, apparatus, electronic device, vehicle, and computer-readable storage medium for cleaning call chain data.
[0005] According to a first aspect of the present disclosure, a method for cleaning call chain data is provided, comprising: collecting data through call chain link tracing and storing the collected call chain element data in a cache; transferring the call chain element data in the cache in response to a triggering message from a background detection thread; and concatenating the transferred call chain element data to obtain concatenated call chain link data, comprising: obtaining the link ID of the call chain element data, searching all the call chain element data according to the link ID, and taking the call chain element data obtained within the search time limit as element data of the same link; obtaining the call hierarchy and order of the element data of the same link, concatenating the element data of the same link according to the call hierarchy and order to obtain concatenated call chain link data; detecting the concatenated call chain link data to determine whether the call chain link data is complete, and when the call chain link data is incomplete, taking the call chain link data as target link data and sending it to a target terminal, and when the call chain link data is complete, performing anomaly detection on the call chain link data, obtaining the target link data, and sending it to the target terminal.
[0006] In some embodiments, the step of collecting data through call chain tracing and storing the collected call chain element data in a cache includes: obtaining configuration parameters, setting a preset deviation, the size of the cache, the batch data length, and the batch time interval according to the configuration parameters; identifying the call chain call hierarchy and order in the process running through call chain tracing, obtaining the call chain element data, and storing the call chain element data in the cache.
[0007] In some embodiments, transferring the call chain element data in the cache in response to the trigger information of the background detection thread includes: detecting the data length of all received call chain element data in response to the data length trigger information of the background detection thread; transferring all the call chain element data in the cache when the data length is equal to the batch processing data length; or, detecting the time interval of receiving all call chain element data in response to the periodic trigger information of the background detection thread; transferring all the call chain element data in the cache when the time interval is equal to the batch processing time interval.
[0008] In some embodiments, the step of performing anomaly detection on the call chain link data, obtaining target link data, and sending it to the target terminal includes: obtaining the overall runtime of the call chain link data and the element runtime of a single method in the call chain link; selecting multiple benchmark call chain link data, and calculating the benchmark overall runtime and benchmark element runtime of the call chain link data based on the overall runtime and element runtime of the single method in the multiple benchmark call chain link data; calculating a first deviation based on the overall runtime and the benchmark overall runtime; calculating a second deviation based on the element runtime and the benchmark element runtime; obtaining a preset deviation, and determining that the call chain link data is abnormal when the first deviation and / or the second deviation is greater than the preset deviation.
[0009] In some embodiments, the step of performing anomaly detection on the call chain link data, obtaining target link data, and sending it to the target terminal includes: when there is an anomaly in the call chain link data, obtaining the corresponding target link data and sending it to the target terminal; when there is no anomaly in the call chain link data, performing sampling detection or latency detection on the call chain link data, obtaining target link data, and sending it to the target terminal.
[0010] In some embodiments, when there are no anomalies in the call chain link data, sampling and detecting the call chain link data to obtain target link data and sending it to the target terminal includes: when there are no anomalies in the call chain link data, obtaining all link data of the call chain link data; determining the call chain identity of the link data with the call chain link in the graph based on the SOA service and execution order of the link data; when there is no call chain identity in the link data, adding the call chain link corresponding to the link data to the graph and counting and timing it; when there is call chain identity in the link data, detecting whether the count of the call chain link corresponding to the link data reaches the sampling ratio or whether the timing reaches the sampling time interval; when the count and timing of the call chain link do not meet the requirements, updating the corresponding link data, count, and timing; when the count or timing of the call chain link meets the requirements, sending the corresponding call chain link data as target link data to the target terminal, and deleting the call chain link corresponding to the target link data from the graph.
[0011] According to a second aspect of the present disclosure, a chain data cleaning apparatus is provided for implementing the call chain data cleaning method described above, comprising: a data collection module for collecting data through call chain link tracing and storing the collected call chain element data in a cache; a data transfer module for transferring the call chain element data in the cache in response to a triggering information from a background detection thread; and a link splicing module for splicing the transferred call chain element data to obtain spliced call chain link data, comprising: a link ID acquisition module for acquiring the link ID of the call chain element data; and an element information search module for searching all the call chain element data according to the link ID and selecting the element information from the search results. The call chain element data acquired within the time limit is used as element data of the same link; the link data acquisition module is used to acquire the call hierarchy and order of the element data of the same link, and to perform link splicing on the element data of the same link according to the call hierarchy and order to obtain spliced call chain link data; the integrity detection module is used to detect the spliced call chain link data to determine whether the call chain link data is complete; the target link data sending module is used to send the call chain link data as target link data to the target terminal when the call chain link data is incomplete; the target link data acquisition module is used to perform anomaly detection on the call chain link data when the call chain link data is complete, acquire the target link data, and send it to the target terminal.
[0012] According to a third aspect of the present disclosure, a vehicle is provided that stores a set of instructions, which are executed by the vehicle to implement the method for cleaning call chain data provided in the first aspect of the present disclosure.
[0013] According to a fourth aspect of the present disclosure, an electronic device is provided, comprising: a processor; a memory for storing executable instructions of the processor; the processor being configured to read the executable instructions from the memory and execute the instructions to implement the call chain data cleaning method provided in the first aspect of the present disclosure.
[0014] According to a fifth aspect of the present disclosure, a computer-readable storage medium is provided that stores computer program instructions thereon, which, when executed by a processor, implement the steps of the call chain data cleaning method provided in the first aspect of the present disclosure.
[0015] The technical solutions provided by the embodiments of this disclosure can include the following beneficial effects: data is collected by calling chain tracing, and the collected calling chain element data is stored in a cache. In response to the triggering information of the background detection thread, the calling chain element data in the cache is transferred, and the transferred calling chain element data is chain-concatenated to obtain the concatenated calling chain link data. Anomaly detection is performed on the calling chain link data to obtain the target link data and send it to the target terminal. This realizes batch processing and cleaning of calling chain data, greatly reducing the amount of data that needs to be transmitted, thereby reducing the system resources occupied by data process communication and improving system performance.
[0016] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0017] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0018] Figure 1 This is a flowchart illustrating a method for cleaning call chain data according to an exemplary embodiment.
[0019] Figure 2 A flowchart illustrating a method for collecting call chain element data, as shown in an exemplary embodiment.
[0020] Figure 3 This is a flowchart illustrating a method for transferring data between call chain elements, as shown in an exemplary embodiment.
[0021] Figure 4 This is a flowchart illustrating a method for transferring data between call chain elements, as shown in an exemplary embodiment.
[0022] Figure 5 This is a flowchart illustrating a method for splicing data links of call chain elements, as shown in an exemplary embodiment.
[0023] Figure 6 A flowchart illustrating a method for detecting the integrity of call chain data, as shown in an exemplary embodiment.
[0024] Figure 7 This is a flowchart illustrating a call chain link data anomaly detection method as an exemplary embodiment.
[0025] Figure 8 This is a flowchart illustrating a call chain link data anomaly detection method as an exemplary embodiment.
[0026] Figure 9 A flowchart illustrating a target link data acquisition method as an exemplary embodiment.
[0027] Figure 10 This is a block diagram illustrating a call chain data cleaning apparatus according to an exemplary embodiment.
[0028] Figure 11 This is a block diagram illustrating a vehicle according to an exemplary embodiment.
[0029] Figure 12 This is a block diagram illustrating an electronic device according to an exemplary embodiment. Detailed Implementation
[0030] The exemplary embodiments will now be described in detail with reference to the accompanying drawings.
[0031] It should be noted that the relevant embodiments and accompanying drawings are only for describing and illustrating exemplary embodiments provided by this disclosure, and not all embodiments of this disclosure, nor should this disclosure be understood to be limited to the relevant exemplary embodiments.
[0032] It should be noted that the terms "first," "second," etc., used in this disclosure are only used to distinguish different steps, devices, or modules. These terms do not represent any specific technical meaning, nor do they indicate any order or interdependence between them.
[0033] It should be noted that the terms “a,” “a plurality of,” and “at least one” used in this disclosure are illustrative rather than restrictive. Unless otherwise expressly indicated in the context, they should be understood as “one or more.”
[0034] It should be noted that the term "and / or" used in this disclosure is used to describe the relationship between related objects, and generally indicates that there are at least three relationships. For example, A and / or B can at least indicate: the existence of A alone, the existence of both A and B, and the existence of B alone.
[0035] It should be noted that the various steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Unless otherwise specified, the scope of this disclosure is not limited by the order in which the steps are described in the relevant embodiments.
[0036] It should be noted that all actions involving the acquisition of signals, information, or data in this disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the location is situated, and with authorization from the owner of the relevant device.
[0037] Exemplary methods
[0038] Figure 1 This is a flowchart illustrating a method for cleaning call chain data according to an exemplary embodiment, such as... Figure 1 As shown, the method for cleaning chain data is used in vehicle-side internet and includes the following steps.
[0039] In step S110, data is collected by calling chain tracing, and the collected calling chain element data is stored in the cache.
[0040] In some embodiments, element data is collected in the user process by calling chain tracing, and the collected call chain element data is stored in a cache. The cache facilitates batch processing of individual call chain element data.
[0041] In step S120, in response to the triggering information from the background detection thread, the call chain element data in the cache is transferred.
[0042] In some embodiments, a background detection thread detects the amount of call chain element data or the caching time in the cache. When the cache reaches a certain amount or a certain time, the corresponding information is triggered. In response to the trigger information of the background detection thread, the call chain element data in the cache is transferred through the local area network channel to achieve batch processing of the call chain element data, thereby significantly reducing inter-process communication and reducing system resource consumption. In addition, the use of local area network communication method facilitates deployment and avoids direct data upload to the cloud, reducing data traffic consumption.
[0043] In step S130, the transferred call chain element data is spliced together to obtain spliced call chain link data.
[0044] In some embodiments, since the transferred call chain element data consists of multiple single call chain element data, it is necessary to determine the call chain link to which the call chain element data belongs, and to splice the call chain element data according to the call chain link to obtain the spliced call chain link data.
[0045] In step S140, anomaly detection is performed on the call chain link data, the target link data is obtained, and sent to the target terminal.
[0046] In some embodiments, anomaly detection is performed on the spliced call chain link data to determine whether the link splicing is correct or whether the spliced call chain link data is complete. The target link data obtained by the anomaly detection is extracted and sent to the target terminal. This can preserve the target link data as much as possible while significantly reducing the amount of data that needs to be sent, making it easier to deploy on vehicles.
[0047] In the above embodiment, data is collected through call chain tracing, and the collected call chain element data is stored in a cache. In response to the trigger information of the background detection thread, the call chain element data in the cache is transferred, and the transferred call chain element data is spliced to obtain spliced call chain link data. Anomaly detection is performed on the call chain link data to obtain target link data, which is then sent to the target terminal. This achieves batch processing and cleaning of call chain data, significantly reducing the amount of data that needs to be transmitted, thereby reducing the system resources occupied by data process communication and improving system performance.
[0048] Figure 2 This is a flowchart illustrating a method for collecting call chain element data, as shown in an exemplary embodiment. Figure 2 As shown, the method for collecting call chain element data is used in step S110 and includes the following steps:
[0049] Step S210: Obtain configuration parameters and set the preset deviation, buffer size, batch data length, and batch time interval according to the configuration parameters.
[0050] Specifically, before collecting call chain element data, it is necessary to obtain relevant parameters of the cache based on the configuration parameters, and set the cache size, batch data length, and batch processing time interval according to the configuration parameters. The cache is used to store historical call chain element data when the process generates it, and the amount of data stored is determined by the batch data length or batch processing time interval. The cache size is the cache capacity, i.e., the maximum capacity that can be used to store data. In addition, a preset deviation needs to be set according to the configuration parameters. The preset deviation is used to determine whether there are any anomalies in the call chain data.
[0051] Step S220: By tracing the call chain, identify the call chain call hierarchy and order in the running process, obtain the call chain element data, and store the call chain element data in the cache.
[0052] Specifically, during data collection, the call chain hierarchy and order of the call chain running in the process are identified by call chain tracing, and the corresponding call chain element data is called according to the identification. Based on the trigger information of the background detection thread, the call chain element data is stored in the cache.
[0053] In this embodiment, by obtaining configuration parameters, the buffer size, batch data length, and batch processing time interval are set. The call chain tracing identifies the call chain call hierarchy and order in the process execution, thereby extracting the corresponding call chain element data based on the identifier and storing the call chain element data in the buffer. This enables batch processing of the call chain element data, reduces the number of inter-process communication, thereby reducing system resource consumption and improving system performance.
[0054] Figure 3 This is a flowchart illustrating a method for transferring data between call chain elements, as shown in an exemplary embodiment. Figure 3 As shown, the method for transferring data of call chain elements is used in step S120, and includes the following steps:
[0055] Step S310: In response to the data length trigger information of the background detection thread, detect the data length of all received call chain element data.
[0056] Specifically, after caching a certain number of call chain element data in the cache, in response to the data length trigger information of the background detection thread, the data length of the currently received call chain element data in the cache is detected to determine whether its data length meets the trigger condition.
[0057] Step S320: When the data length is equal to the batch data length, transfer all call chain element data in the cache.
[0058] Specifically, when it is detected that the data length of the call chain element data in the cache is equal to the pre-set batch data length, the information is triggered to transfer all the call chain element data in the cache for subsequent data processing.
[0059] In this embodiment, in response to the data length trigger information of the background detection thread, the data length of all received call chain element data is detected. When the data length is equal to the preset batch processing data length, all currently cached call chain element data in the cache area are transferred, thereby realizing batch processing of call chain element data and reducing the frequency of inter-process communication.
[0060] Figure 4 This is a flowchart illustrating a method for transferring data between call chain elements, as shown in an exemplary embodiment. Figure 4 As shown, the method for transferring data of call chain elements is used in step S120, and includes the following steps:
[0061] Step S410: In response to the periodic triggering information of the background detection thread, detect the time interval at which all call chain element data is received.
[0062] Specifically, in addition to responding to the data length trigger information of the background detection thread, it can also respond to the periodic trigger information of the background detection thread to detect the time interval of receiving all call chain element data, that is, the time interval from the start receiving time to the current time, thereby limiting the amount of data received in the buffer so as to batch process the data within the time interval.
[0063] Step S420: When the time interval is equal to the batch processing time interval, transfer all call chain element data in the cache.
[0064] Specifically, when the background detection thread detects that the time interval is equal to the batch processing time interval, it transfers all the call chain elements currently cached in the cache area. This facilitates subsequent batch processing of the transferred data and reduces the frequency of data communication, thereby reducing the frequency of inter-process data communication.
[0065] In this embodiment, in response to the periodic triggering information of the background detection thread, the time interval between the receipt of all call chain element data in the cache is detected. When the time interval is equal to the batch processing time interval, all call chain element information currently cached in the cache is transferred to facilitate subsequent batch processing of data. At the same time, the frequency of inter-process data communication is reduced, thereby alleviating the system resource consumption situation.
[0066] Figure 5 This is a flowchart illustrating a method for splicing data links of call chain elements, as shown in an exemplary embodiment. Figure 5 As shown, the method for splicing data links of call chain elements is used in step S130, and includes the following steps:
[0067] Step S510: Obtain the link ID of the call chain element data, search for it in all call chain element data according to the link ID, and take the call chain element data obtained within the search time limit as the element data of the same link.
[0068] Specifically, after receiving the transferred call chain element data via the vehicle's local area network, the link ID of the corresponding call chain element data is obtained. The link ID is a unique identifier for the call chain element data. In a single call request, a globally unique link ID is generated at the beginning of the network to identify this call request. This link ID remains unchanged throughout the call process and can be continuously passed along with each layer of the call. Finally, the link IDs are used to connect the entire path of this user request in the system, thereby generating the call chain.
[0069] Therefore, after obtaining the link ID, searching by link ID can retrieve call chain element data within the same link. When the call chain element data for a link ID reaches the search time limit and stops updating, the call chain search ends, and all retrieved call chain element data is considered as element data for the same link. The search time limit can be set, for example, to 30 seconds. After 30 seconds, the search stops, and the call chain element data obtained within those 30 seconds is retrieved as element data for the same link.
[0070] Step S520: Obtain the calling hierarchy and order of element data in the same link; according to the calling hierarchy and order, perform link splicing on the element data in the same link to obtain the spliced calling chain link data.
[0071] Specifically, since the element data within the same link has a corresponding call hierarchy and order, after determining the element data within the same link, the element data is concatenated according to the corresponding call hierarchy and order to obtain the concatenated call chain link data. This ensures the integrity of the call chain data as much as possible, facilitating the subsequent extraction of the target link data and avoiding data loss. The concatenation logic is determined by the call chain logic, and any call chain logic and corresponding concatenation logic can be used; this embodiment does not impose any restrictions on this.
[0072] In this embodiment, the link ID of the call chain element data is obtained, and a search is performed in all call chain element data based on the link ID. The call chain element data obtained within the search time limit is taken as the element data of the same link. The call hierarchy and order of the element data of the same link are obtained, and the element data of the same link are spliced together to obtain the spliced call chain link data. This ensures the integrity of the data, facilitates the subsequent extraction of target link data, and avoids data loss.
[0073] Figure 6 This is a flowchart illustrating a method for detecting the integrity of call chain data, as shown in an exemplary embodiment. Figure 6 As shown, the method for detecting the integrity of call chain data is used before step S140 and includes the following steps:
[0074] Step S610: Check whether the call chain data is complete.
[0075] Specifically, after the call chain is assembled, the integrity of the assembled call chain data needs to be checked to determine whether the assembled call chain data is complete.
[0076] In step S620, when the calling link data is incomplete, the calling link data is used as the target link data and sent to the target terminal.
[0077] Specifically, when incomplete call chain data is detected, it indicates that the call chain data is abnormal, such as missing or omitted data that cannot match the actual call situation. In this case, the call chain data is used as the target chain data and sent to the target terminal to clean the call chain data and filter out abnormal data.
[0078] Step S630: When the call chain link data is complete, perform anomaly detection on the call chain link data.
[0079] Specifically, when the call chain data is detected to be complete, it means that the spliced call chain data matches the actual call situation. Then, anomaly detection is performed on the call chain data to determine the running status of the call chain data.
[0080] In this embodiment, the spliced call chain data is inspected to determine whether the call chain data is complete. If the call chain data is incomplete, the call chain data is used as the target chain data and sent to the target terminal. If the call chain data is complete, anomaly detection is performed on the call chain data. While retaining abnormal data as much as possible, the amount of data that needs to be sent is reduced, thereby reducing the occupation of system resources.
[0081] Figure 7 This is a flowchart illustrating a method for detecting anomalies in call chain data, as shown in an exemplary embodiment. Figure 7 As shown, the method for detecting anomalies in call chain data is used in step S140, and includes the following steps:
[0082] Step S710: Obtain the overall runtime of the call chain data and the runtime of individual methods within the call chain.
[0083] Specifically, since the concatenated call chain data contains multiple methods, each with a different runtime, when performing call chain data anomaly detection, it is necessary to obtain the overall runtime of the call chain data and the element runtime of a single method to determine whether the runtime of the entire call chain and the runtime of a single method are normal.
[0084] Step S720: Select multiple benchmark call chain link data, and calculate the overall benchmark runtime and benchmark element runtime of the call chain link data based on the overall runtime and element runtime of the multiple benchmark call chain link data.
[0085] Specifically, multiple call chain data are selected from the database as benchmark call chain data. Based on the overall runtime of the multiple benchmark call chain data and the element runtime of a single method, the benchmark overall runtime and benchmark element runtime are calculated. For example, the average of the overall runtime of the multiple benchmark call chain data and the average of the element runtime of a single method are calculated as the benchmark overall runtime and benchmark element runtime, which are used to determine whether the runtime of the call chain data is normal.
[0086] Step S730: Calculate the first deviation based on the overall running time and the benchmark overall running time.
[0087] Specifically, the first deviation is calculated based on the overall running time of the call chain data and the baseline overall running time.
[0088] Step S740: Calculate the second deviation based on the element's running time and the reference element's running time.
[0089] Specifically, the second deviation is calculated based on the running time of the elements in the calling chain data and the running time of the baseline element.
[0090] Step S750: Obtain a preset deviation. When the first deviation and / or the second deviation are greater than the preset deviation, it is determined that there is an anomaly in the call chain link data.
[0091] Specifically, a preset deviation is set according to the actual situation. For example, the preset deviation can be set to 30% in the configuration parameters. The relationship between the first deviation and / or the second deviation and the preset deviation is compared. Both the first deviation and the second deviation can be used individually to assess whether the call chain data is abnormal by comparing them with the preset deviation. Of course, comparing both with the preset deviation simultaneously can also be used to assess whether the call chain data is abnormal. When the first deviation and / or the second deviation is greater than 30%, the corresponding call chain is considered to be abnormal. Conversely, when both the first deviation and the second deviation are less than or equal to 30%, the corresponding call chain data is considered to be normal.
[0092] In this embodiment, the overall runtime of the call chain data and the element runtime of a single method in the call chain are obtained. Multiple benchmark call chain data are selected. Based on the overall runtime of the multiple call chain data and the element runtime of a single method, the benchmark overall runtime and benchmark element runtime of the call chain data are calculated. Based on the overall runtime and the benchmark overall runtime, a first deviation is calculated. Based on the element runtime and the benchmark element runtime, a second deviation is calculated. A preset deviation is obtained. When the first deviation and / or the second deviation are greater than the preset deviation, it is determined that there is an anomaly in the call chain, thereby realizing the anomaly detection of the call chain data and obtaining the corresponding abnormal data based on the detection results, thereby realizing the cleaning of the call chain data.
[0093] Figure 8 This is a flowchart illustrating a method for detecting anomalies in call chain data, as shown in an exemplary embodiment. Figure 8 As shown, the method for detecting anomalies in call chain data is used in step S140, and includes the following steps:
[0094] Step S810: When there is an anomaly in the called link data, obtain the corresponding target link data and send it to the target terminal.
[0095] Specifically, based on the anomaly detection results, when there is an anomaly in the call chain link data, the corresponding call chain link data is used as the target link data and sent to the target terminal. This ensures that the abnormal data is preserved and uploaded as much as possible, thus facilitating the processing of the abnormal data.
[0096] Step S820: If there are no abnormalities in the called link data, perform sampling detection or latency detection on the called link data to obtain the target link data and send it to the target terminal.
[0097] Specifically, based on the anomaly detection results, when there are no anomalies in the call chain link data, sampling detection or latency detection is performed on the call chain link data, and a portion of the data in the call chain link data is extracted as target link data and sent to the target terminal, thereby achieving data cleaning, facilitating data communication and reducing resource consumption.
[0098] In this embodiment, after anomaly detection, if there is an anomaly in the call chain link data, the corresponding target link data is obtained and sent to the target terminal. If there is no anomaly in the call chain link data, sampling detection or latency detection is performed on the call chain link data to obtain the target link data and send it to the target terminal. This can both retain abnormal data and significantly reduce the amount of data, avoiding excessive system resource consumption caused by inter-process communication, which is beneficial to improving system performance.
[0099] Figure 9 This is a flowchart illustrating a target link data acquisition method as an exemplary embodiment. Figure 9 As shown, the method for acquiring target link data is used in step S820, and includes the following steps:
[0100] Step S910: If there is no abnormality in the called chain link data, obtain all the link data of the called chain link data.
[0101] Specifically, after detecting the call chain link data through anomaly detection, if there are no anomalies in the call chain link data, all link data of the call chain link data are obtained.
[0102] Step S920: Based on the SOA service and execution order of the link data, determine the identity of the call chain between the link data and the call chain link in the graph.
[0103] Specifically, based on the SOA (Service-Oriented Architecture) service and execution order of the link data, the call chain identity between the link data and the call chain links in the graph is determined. That is, it is determined whether there is a call chain link corresponding to the current link data in the existing graph. If there is, it is determined that the link data has call chain identity; otherwise, the link data does not have identity.
[0104] Step S930: When there is no call chain identity in the link data, add the call chain corresponding to the link data to the graph and count and time it.
[0105] Specifically, when there is no call chain identity in the link data, the call chain corresponding to the link data is added to the graph and counted and timed. The initial count of the call chain is set to 1, and the initial time is set to the current time.
[0106] Step S940: When there is call chain identity in the link data, check whether the count of the call chain corresponding to the link data reaches the sampling ratio or whether the timing reaches the sampling time interval.
[0107] Specifically, when there is call chain identity in the call chain data, the timing and count of the call chain corresponding to the link data are detected to determine whether the count reaches the sampling ratio, or whether the timing of the current time and the initial time reaches the sampling time interval.
[0108] Step S950: When the count and timing of the called link do not meet the requirements, update the corresponding link data, count and timing.
[0109] Specifically, if the count of the calling chain link does not reach the sampling ratio and the timing does not reach the sampling time interval, it is determined that the count and timing of the corresponding calling chain link do not meet the requirements. Then, the link data of the corresponding calling chain link is updated, that is, the current link data is added to the sampling data, and the timing and count of the calling chain link are updated accordingly.
[0110] Step S960: When the count or timing of the call chain meets the requirements, the corresponding call chain data is sent to the target terminal as the target chain data, and the call chain corresponding to the target chain data is deleted from the graph.
[0111] Specifically, when the count of a call chain reaches the sampling ratio or the timing reaches the sampling time interval (i.e., the count and timing of the call chain meet the requirements), the corresponding call chain data is used as the target chain data and sent to the target terminal. The call chain corresponding to the target chain data is then deleted from the graph, thereby achieving the acquisition of the target chain data.
[0112] In this embodiment, when there are no anomalies in the call chain data, all link data of the call chain are acquired. Based on the SOA service and execution order of the link data, the identity of the call chain data with the call chain in the graph is determined. When there is no identity of the call chain in the link data, the call chain corresponding to the link data is added to the graph and counted and timed. When there is identity of the call chain in the link data, it is checked whether the count of the call chain corresponding to the link data reaches the sampling ratio or whether the time reaches the sampling time interval. When the count and time of the call chain do not meet the requirements, the link data, count, and time of the corresponding call chain are updated. When the count and time of the call chain meet the requirements, the corresponding call chain data is sent to the target terminal as the target link data, and the call chain corresponding to the target link data is deleted from the graph. This achieves data cleaning in the normal link data, thereby obtaining the target link data, reducing the amount of data to be transmitted, avoiding excessive system resource consumption caused by data transmission, and improving system performance.
[0113] Exemplary device
[0114] Figure 10 This is a block diagram illustrating a call chain data cleaning apparatus according to an exemplary embodiment. (Refer to...) Figure 10 The device 1000 includes a data collection module 1010, a data transfer module 1020, a link splicing module 1030, and a target link data acquisition module 1040.
[0115] The data collection module 1010 is used to collect data through call chain tracing and store the collected call chain element data in the cache.
[0116] The data transfer module 1020 is used to transfer the call chain element data in the cache in response to the trigger information of the background detection thread;
[0117] The link splicing module 1030 is used to splice the transferred call chain element data to obtain spliced call chain link data. It includes: a link ID acquisition module for acquiring the link ID of the call chain element data; an element information search module for searching all call chain element data based on the link ID, and using the call chain element data acquired within the search time limit as element data of the same link; and a link data acquisition module for acquiring the call hierarchy and order of the element data of the same link, and splicing the element data of the same link according to the call hierarchy and order to obtain spliced call chain link data.
[0118] The integrity detection module is used to detect the spliced call chain data and determine whether the call chain data is complete.
[0119] The target link data sending module is used to send the invoking link data as target link data to the target terminal when the invoking link data is incomplete.
[0120] The target link data acquisition module 1040 is used to perform anomaly detection on the call link data when the call link data is complete, acquire the target link data, and send it to the target terminal.
[0121] In this embodiment, the data collection module 1010 collects data using call chain tracing and stores the collected call chain element data in a cache. The data transfer module 1020, responding to the trigger information from the background detection thread, transfers the call chain element data from the cache. The link splicing module 1030 splices the transferred call chain element data to obtain spliced call chain link data. Finally, the target link data acquisition module 1040 performs anomaly detection on the call chain link data, acquires the target link data, and sends it to the target terminal. This process cleans the call chain data, reducing the data volume while retaining abnormal data, thus reducing the impact of data transmission on system resources and improving system performance.
[0122] In some embodiments, the device further includes: a parameter configuration module, configured to acquire configuration parameters and set a preset deviation, a buffer size, a batch data length, and a batch time interval according to the configuration parameters; and an element data acquisition module, configured to acquire call chain element data by identifying the call chain call hierarchy and order in the process running through call chain link tracing, and store the call chain element data in the buffer.
[0123] In some embodiments, the apparatus further includes: a data length detection module, configured to detect the data length of all received call chain element data in response to a data length triggering information from a background detection thread; and a first data transfer module, configured to transfer all call chain element data in the cache when the data length is equal to the batch data length.
[0124] In some embodiments, the apparatus further includes: a time detection module, configured to detect the time interval for receiving all call chain element data in response to periodic triggering information from a background detection thread; and a second data transfer module, configured to transfer all call chain element data in the cache when the time interval is equal to the batch processing time interval.
[0125] In some embodiments, the apparatus further includes: a runtime acquisition module, configured to acquire the overall runtime of the call chain data and the element runtime of a single method in the call chain; a baseline time calculation module, configured to select multiple baseline call chain data and calculate the baseline overall runtime and baseline element runtime of the call chain data based on the overall runtime of the multiple baseline call chain data and the element runtime of a single method; a first deviation calculation module, configured to calculate a first deviation based on the overall runtime and the baseline overall runtime; a second deviation calculation module, configured to calculate a second deviation based on the element runtime and the baseline element runtime; and an anomaly identification module, configured to acquire a preset deviation and identify an anomaly in the call chain data when the first deviation and / or the second deviation are greater than the preset deviation.
[0126] In some embodiments, the device further includes: a first data acquisition module, configured to acquire corresponding target link data and send it to a target terminal when there is an anomaly in the call link data; and a second data acquisition module, configured to perform sampling detection or delay detection on the call link data, acquire target link data, and send it to the target terminal when there is no anomaly in the call link data.
[0127] In some embodiments, the apparatus further includes: a link data acquisition module, configured to acquire all link data of the call chain link data when there are no anomalies in the call chain link data; an identity determination module, configured to determine the identity of the link data with the call chain link in the graph based on the SOA service and execution order of the link data; a link addition module, configured to add the call chain link corresponding to the link data to the graph when there is no call chain identity in the link data, and perform counting and timing; a link detection module, configured to detect whether the count of the call chain link corresponding to the link data reaches the sampling ratio or whether the timing reaches the sampling time interval when there is call chain identity in the link data; a link count update module, configured to update the corresponding link data, count, and timing when the count and timing of the call chain link do not meet the requirements; and a link deletion module, configured to send the corresponding call chain link data as target link data to the target terminal when the count or timing of the call chain link meets the requirements, and delete the call chain link corresponding to the target link data in the graph.
[0128] In the above embodiments, the operation of the device enables a method for cleaning call chain data, ensuring that the device can implement all aspects of the method for cleaning call chain data.
[0129] Exemplary vehicle
[0130] Figure 11 This is a block diagram illustrating a vehicle 800 according to an exemplary embodiment. The vehicle 800 may be a gasoline vehicle, a hybrid vehicle, an electric vehicle, a fuel cell vehicle, or other types of vehicles.
[0131] Reference Figure 11 The vehicle 800 may include multiple subsystems, such as a drive system 810, a control system 820, a sensing system 830, a communication system 840, an information display system 850, and a computing processing system 860. The vehicle 800 may also include more or fewer subsystems, and each subsystem may include multiple components, which will not be described in detail here.
[0132] The drive system 810 includes components that provide power to the vehicle 800. These include, for example, an engine, an energy source, and a transmission.
[0133] The control system 820 includes components that provide control for the vehicle 800. These include, for example, vehicle control, cockpit equipment control, and driver assistance control.
[0134] The perception system 830 includes components that provide the vehicle 800 with perception of its surroundings. These include, for example, a vehicle positioning system, a laser sensor, a voice sensor, an ultrasonic sensor, and camera equipment.
[0135] The communication system 840 includes components that provide communication connectivity for the vehicle 800. These may include, for example, mobile communication networks (e.g., 3G, 4G, 5G networks), WiFi, Bluetooth, and vehicle-to-everything (V2X) connectivity.
[0136] The information display system 850 includes components that provide various information displays for the vehicle 800. These include, for example, vehicle information displays, navigation information displays, and entertainment information displays.
[0137] The computing processing system 860 includes components that provide data computing and processing capabilities for the vehicle 800. The computing processing system 860 may include at least one processor 861 and a memory 862. The processor 861 can execute instructions stored in the memory 862.
[0138] The processor 861 can be any conventional processor, such as a commercially available CPU. The processor may also include, for example, a Graphics Processing Unit (GPU), a Field Programmable Gate Array (FPGA), a System on Chip (SOC), an Application Specific Integrated Circuit (ASIC), or a combination thereof.
[0139] The memory 862 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0140] In this embodiment of the disclosure, a set of instructions is stored in the memory 862, and the processor 861 can execute the set of instructions to implement all or part of the steps of the call chain data cleaning method described in any of the exemplary embodiments above.
[0141] Exemplary electronic devices
[0142] Figure 12 This is a block diagram illustrating an electronic device 900 according to an exemplary embodiment. The electronic device 900 may be a vehicle controller, an in-vehicle terminal, an in-vehicle computer, or other types of electronic devices.
[0143] Reference Figure 12The electronic device 900 may include at least one processor 910 and a memory 920. The processor 910 can execute instructions stored in the memory 920. The processor 910 is communicatively connected to the memory 920 via a data bus. In addition to the memory 920, the processor 910 can also be communicatively connected to an input device 930, an output device 940, and a communication device 950 via the data bus.
[0144] Processor 910 can be any conventional processor, such as a commercially available CPU. Processors may also include graphics processing units (GPUs), field-programmable gate arrays (FPGAs), systems-on-chips (SoCs), application-specific integrated circuits (ASICs), or combinations thereof.
[0145] The memory 920 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0146] In this embodiment of the present disclosure, the memory 920 stores executable instructions, and the processor 910 can read the executable instructions from the memory 920 and execute the instructions to implement all or part of the steps of the call chain data cleaning method described in any of the exemplary embodiments above.
[0147] Exemplary computer-readable storage media
[0148] In addition to the methods and apparatus described above, exemplary embodiments of this disclosure may also be a computer program product or a computer-readable storage medium storing the computer program product. The computer product includes computer program instructions that can be executed by a processor to perform all or part of the steps described in any of the methods in the exemplary embodiments described above.
[0149] The computer program product can be written in any combination of one or more programming languages to perform the operations of the embodiments of this application. The programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages, and scripting languages (e.g., Python). The program code can be executed entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0150] The computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media include: static random access memory (SRAM) having one or more electrically connected wires, electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk, or any suitable combination thereof.
[0151] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of this disclosure. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0152] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A method for cleaning call chain data, characterized in that, include: Data is collected through call chain tracing, and the collected call chain elements are stored in the cache. In response to the triggering information from the background detection thread, the call chain element data in the cache is transferred; The process of concatenating the transferred call chain element data to obtain concatenated call chain link data includes: obtaining the link ID of the call chain element data; searching among all the call chain element data based on the link ID; and taking the call chain element data obtained within the search time limit as element data of the same link; obtaining the call hierarchy and order of the element data of the same link; and concatenating the element data of the same link based on the call hierarchy and order to obtain concatenated call chain link data. The concatenated call chain data is inspected to determine whether it is complete. If the call chain data is incomplete, it is used as the target chain data and sent to the target terminal. If the call chain data is complete, anomaly detection is performed on the call chain data to obtain the target chain data and send it to the target terminal.
2. The method for cleaning call chain data according to claim 1, characterized in that, The step of collecting data through call chain tracing and storing the collected call chain elements in a cache includes: Obtain configuration parameters, and set the preset deviation, the size of the buffer, the batch data length, and the batch processing time interval according to the configuration parameters; The call chain tracing identifies the call chain hierarchy and order in the running process, obtains the call chain element data, and stores the call chain element data in the cache.
3. The method for cleaning call chain data according to claim 2, characterized in that, The step of transferring the call chain element data in the cache in response to the trigger information from the background detection thread includes: In response to the data length trigger message from the background detection thread, detect the data length of all received call chain element data; When the data length is equal to the batch data length, all the call chain element data in the cache are transferred; Alternatively, in response to the periodic triggering information of the background detection thread, detect the time interval at which all call chain element data is received; When the time interval is equal to the batch processing time interval, all the call chain element data in the cache are transferred.
4. The method for cleaning call chain data according to claim 2, characterized in that, The step of performing anomaly detection on the call chain data, obtaining target chain data, and sending it to the target terminal includes: Obtain the overall runtime of the call chain data and the runtime of an element of a single method in the call chain; Multiple benchmark call chain data are selected, and the overall benchmark runtime and benchmark element runtime of the call chain data are calculated based on the overall runtime and element runtime of the multiple benchmark call chain data. The first deviation is calculated based on the overall running time and the benchmark overall running time; The second deviation is calculated based on the running time of the element and the running time of the reference element; A preset deviation is obtained, and when the first deviation and / or the second deviation are greater than the preset deviation, it is determined that there is an anomaly in the call chain link data.
5. The method for cleaning call chain data according to claim 1, characterized in that, The step of performing anomaly detection on the call chain data, obtaining target chain data, and sending it to the target terminal includes: When there is an anomaly in the call chain link data, the corresponding target link data is obtained and sent to the target terminal; When there are no abnormalities in the call chain link data, the call chain link data is sampled and detected or delayed to obtain the target link data and send it to the target terminal.
6. The method for cleaning call chain data according to claim 5, characterized in that, When there are no anomalies in the call chain link data, the step of sampling or delay detection of the call chain link data to obtain target link data and sending it to the target terminal includes: If there are no anomalies in the call chain link data, obtain all link data of the call chain link data; Based on the SOA services and execution order of the link data, determine the identity of the link data with the call chain in the graph; When the link data does not have call chain identity, the call chain link corresponding to the link data is added to the graph, and counting and timing are performed; When the link data has the same call chain, check whether the count of the call chain corresponding to the link data reaches the sampling ratio or whether the timing reaches the sampling time interval. When the count and timing of the called link do not meet the requirements, the corresponding link data, count and timing will be updated; When the count or timing of the call chain meets the requirements, the corresponding call chain data is sent to the target terminal as target chain data, and the call chain corresponding to the target chain data is deleted from the graph.
7. A device for cleaning call chain data, characterized in that, A method for cleaning call chain data as described in any one of claims 1-6, comprising: The data collection module is used to collect data through call chain tracing and store the collected call chain elements in the cache. The data transfer module is used to transfer the call chain element data in the cache area in response to the trigger information of the background detection thread; A link splicing module is used to splice the transferred call chain element data to obtain spliced call chain link data. It includes: a link ID acquisition module for acquiring the link ID of the call chain element data; an element information search module for searching all the call chain element data based on the link ID, and taking the call chain element data acquired within the search time limit as element data of the same link; and a link data acquisition module for acquiring the call hierarchy and order of the element data of the same link, and splicing the element data of the same link according to the call hierarchy and order to obtain spliced call chain link data. The integrity detection module is used to detect the spliced call chain data and determine whether the call chain data is complete. The target link data sending module is used to send the invoking link data as target link data to the target terminal when the invoking link data is incomplete. The target link data acquisition module is used to perform anomaly detection on the call chain link data when the call chain link data is complete, acquire the target link data, and send it to the target terminal.
8. A vehicle, characterized in that, A set of instructions is stored, which is executed by the vehicle to implement the method for cleaning call chain data as described in any one of claims 1-6.
9. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to read the executable instructions from the memory and execute the instructions to implement the call chain data cleaning method according to any one of claims 1-6.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the program instructions are executed by the processor, they implement the steps of the method for cleaning call chain data as described in any one of claims 1-6.
Citation Information
Patent Citations
A real-time calling chain tracking method based on micro-service
CN109921927A
Vehicle data uploading method and device, computer equipment and storage medium
CN111586150A