Data sampling method, device, equipment, medium and product

By using multiple sampling strategies to sample link data in link tracking, the resource consumption problem caused by a single sampling method in the prior art is solved, and efficient collection and storage of important data is achieved.

CN119135557APending Publication Date: 2024-12-13GF SECURITIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411367955.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

The existing link tracking sampling method is single, which cannot effectively reduce the consumption of system resources. Especially in scenarios with high concurrency and high request volume, resulting in high data storage and processing pressure, and the inability to identify valuable sampled data.

Method used

By obtaining the call data requested by the user, the link data is sampled based on the sampling model, and a variety of sampling strategies are adopted, such as probability combination fixed-time strategy, important link staining strategy and long-time-consuming link strategy, to determine whether the link data meets the sampling. If the conditions are not met, the data will be re-acquisitioned until the conditions are met, and the collection of important data will be realized.

Benefits of technology

It reduces the number of link data sampling and server consumption, reduces the amount of data storage, and improves the flexibility and business practicality of the acquisition strategy, providing a powerful acquisition strategy for distributed systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119135557A_ABST
    Figure CN119135557A_ABST
Patent Text Reader

Abstract

The invention discloses a data sampling method, device and equipment, a medium and a product. The method comprises the following steps: acquiring calling data requested by a user; determining link data of a service node based on the calling data; and sampling the link data based on a sampling model to obtain sampling data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a data sampling method, device, equipment, medium and product. Background Art

[0002] In a distributed system, a user request usually passes through multiple service nodes, generating a series of call links. In order to monitor and analyze these links, the system needs to record the link information of each node. In scenarios with high concurrency and huge request volumes, a huge amount of link data will be generated in order to record all link information, resulting in huge storage and processing overhead. Therefore, sampling technology is widely used in link tracking.

[0003] In the related art, the sampling method of link tracking is single and cannot reduce the consumption of system resources. Summary of the invention

[0004] Embodiments of the present application provide a data sampling method, apparatus, device, medium, and product.

[0005] The technical solution of the embodiment of the present application is implemented as follows:

[0006] A data sampling method, the method comprising:

[0007] Get the call data requested by the user;

[0008] Determine link data of a service node based on the call data;

[0009] The link data is sampled based on a sampling model to obtain sampled data.

[0010] In the above solution, determining the link data of the service node based on the call data includes:

[0011] Obtaining a tracking identifier of the service node;

[0012] The link data is determined from the call data based on the tracking identifier.

[0013] In the above solution, sampling the link data based on the sampling model to obtain the sampled data includes:

[0014] Inputting the link data into the sampling model to determine whether the link data meets the sampling condition;

[0015] If so, obtaining sampling data output by the sampling model;

[0016] If not, the link data is reacquired based on the tracking identifier, and the reacquired link data is input into the sampling model until it is determined that the reacquired link data meets the sampling condition, thereby obtaining the sampling data.

[0017] In the above solution, the step of inputting the link data into the sampling model to determine whether the link data meets the sampling condition includes:

[0018] Inputting the link data into the sampling model, and determining a sampling value of the link data based on the tracking identifier;

[0019] Determining whether the sampling value is greater than the sampling probability;

[0020] If not, determining that the link data satisfies the first sampling condition;

[0021] If so, determining whether the time difference between the current sampling time of the sampled value and the historical sampling time of the sampled value is less than a sampling period threshold;

[0022] If so, determining that the link data does not satisfy the first sampling condition;

[0023] If not, it is determined that the link data meets the first sampling condition.

[0024] In the above solution, the step of inputting the link data into the sampling model to determine whether the link data meets the sampling condition includes:

[0025] Inputting the link data into the sampling model to determine whether the tracking identifier includes a target attribute tag;

[0026] If so, determining that the link data satisfies the second sampling condition;

[0027] If not, it is determined that the link data does not satisfy the second sampling condition.

[0028] In the above solution, the step of inputting the link data into the sampling model to determine whether the link data meets the sampling condition includes:

[0029] Inputting the link data into the sampling model to obtain the request time of the user request;

[0030] Determine whether the difference between the request time and the current sampling time is greater than or equal to a time threshold;

[0031] If so, determining that the link data satisfies the third sampling condition;

[0032] If not, it is determined that the link data does not satisfy the third sampling condition.

[0033] A data sampling device, comprising:

[0034] An acquisition unit, used for acquiring the call data requested by the user;

[0035] A processing unit, configured to determine link data of a service node based on the call data;

[0036] The processing unit is further used to sample the link data based on a sampling model.

[0037] An electronic device comprising: a processor and a memory for storing a computer program that can be run on the processor,

[0038] Wherein, when the processor is used to run the computer program, it executes the steps of any one of the above methods.

[0039] A storage medium stores a computer program, wherein the computer program implements the steps of any of the above methods when executed by a processor.

[0040] A computer product comprises a computer program, wherein when the computer program is executed by a processor, the steps of any one of the above methods are implemented.

[0041] The data sampling method, device, equipment, medium and product provided in the embodiments of the present application; obtain the call data requested by the user; determine the link data of the service node based on the call data; sample the link data based on the sampling model to obtain the sampled data. In other words, the embodiments of the present application obtain the call data requested by the user; determine the link data of the service node based on the call data; sample the link data based on the sampling model to obtain the sampled data, so as to realize the collection of important data and reduce the data storage of the system, thus solving the problem that the sampling method of link tracking in the related technology is single and cannot reduce the consumption of system resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is a flowchart of probability sampling in related technologies;

[0043] Figure 2 A schematic diagram of a data sampling method provided in an embodiment of the present application;

[0044] Figure 3 A schematic diagram of another data sampling method provided in an embodiment of the present application;

[0045] Figure 4 A schematic diagram of a cloud platform framework provided in an embodiment of the present application;

[0046] Figure 5 A data schematic diagram of data sampling in the related technology;

[0047] Figure 6 A data schematic diagram of data sampling provided in an embodiment of the present application;

[0048] Figure 7 A schematic diagram of processor consumption for data sampling in related art;

[0049] Figure 8 A schematic diagram of processor consumption for data sampling provided in an embodiment of the present application;

[0050] Fig. 9 A schematic diagram of link visualization provided in an embodiment of the present application;

[0051] Fig.10 A schematic diagram of a link topology structure provided in an embodiment of the present application;

[0052] Fig.11 A schematic diagram of the structure of a data sampling device provided in an embodiment of the present application;

[0053] Fig.12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions of the present application are further elaborated in detail below in conjunction with the drawings and embodiments. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0055] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0056] The terms "first / second / third" involved in the present application are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first / second / third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0057] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0058] In related technologies, a common sampling technique is probabilistic sampling, which assigns a sampling probability to each request and randomly determines whether to collect the data of the request. Figure 1 As shown, the probability sampling method is implemented as follows:

[0059] Determine the sampling probability: First, set a sampling probability p for the system, which is usually between 0 and 1. For example, setting p = 0.1 means that the system will sample 10% of the span.

[0060] Generate random numbers and compare to determine whether to sample: A unique link code is generated at the beginning of each link, hereinafter referred to as traceId. Each span generated by the request link will carry the traceId. The traceId of each span is converted into a 0-1 number r. Compared with the preset probability, if r≤p, the span is included in the sampling range and marked with a sampling mark, otherwise it is skipped and discarded.

[0061] Record sampling data: record and store all spans with sampling marks.

[0062] Probabilistic sampling usually simply decides whether to sample based on probability. There are the following problems:

[0063] 1. The probability value is not flexible enough and has low adaptability. If a high sampling rate is set, a system with a high request volume will generate a large amount of link data, which will put a lot of pressure on the collection and reduce the advantages of the sampling technology. If a low sampling rate is set, the number of collections will be too small for a system with a low request volume, and no valuable and meaningful link information will be collected; for the system, the request volume also has high and low peaks in time, and a fixed probability can only identify links, but not time periods or request frequencies.

[0064] 2. Unable to identify valuable sampled data. There is a large amount of link data in the system. Whether it is full sampling or probability sampling, valuable data is easily buried in the massive data or even discarded. Fixed probability can only identify link identifiers, but cannot identify link meanings.

[0065] The embodiment of the present application provides a data sampling method, as shown in Figure 2, the method includes the following steps:

[0066] Step S201: Obtain calling data requested by the user.

[0067] It is understandable that a user request usually passes through multiple service nodes, generating a series of call links (Trace). In order to monitor and analyze these links, the system needs to record the call information (Span) of each service node.

[0068] In practical applications, the call data can be understood as data consisting of the call information of the service node. The call data can include the call information of multiple service nodes.

[0069] Step S202: Determine the link data of the service node based on the calling data.

[0070] It is understandable that each service node can generate a link unique code, namely, a link identifier (TraceIdentity, TraceId). The data formed by the call information of the service node can also be understood as link data.

[0071] In actual applications, the link data of each service node can be filtered from the call data according to TraceId.

[0072] Step S203: sampling the link data based on the sampling model to obtain sampled data.

[0073] It is understandable that the sampling model can be understood as a model including multiple sampling strategies. Exemplarily, the sampling model can include multiple sampling components, each sampling component adopting a different sampling strategy.

[0074] In practical applications, the sampling strategies of the sampling model may include but are not limited to probability combined with fixed time strategy, important link coloring strategy and long-time link strategy. The probability combined with fixed time strategy records the time point of each sampling on the basis of maintaining probability sampling. When judging whether to sample each time, it combines the last sampling time point and the probability value to decide whether to sample. The important link coloring strategy can color important links with attribute labels to identify and collect valuable data. The long-time link strategy can record the start time as the attribute label of the span at the beginning of each link on the basis of maintaining probability sampling. Each sampling checks the duration of the span from the start time. When the duration is greater than a specific threshold, the sampling label is added and sampling is performed. At the same time, all subsequent derived spans are sampled.

[0075] It can be seen from the above content that the embodiment of the present application obtains the call data requested by the user; determines the link data of the service node based on the call data; samples the link data based on the sampling model to obtain the sampling data, so as to realize the collection of important data through multiple sampling strategies and reduce the data storage of the system, thereby solving the problem that the sampling method of link tracking in the related technology is single and cannot reduce the consumption of system resources.

[0076] In some embodiments of the present application, determining the link data of the service node based on the call data includes:

[0077] Get the tracking ID of the service node;

[0078] Link data is determined from the call data based on the tracking identifier.

[0079] It is understandable that each service node can generate a link unique code, namely, a link identifier (TraceIdentity, TraceId). The data formed by the call information of the service node can also be understood as link data.

[0080] In actual applications, the link data of each service node can be filtered from the call data according to TraceId.

[0081] In some embodiments of the present application, sampling the link data based on the sampling model to obtain the sampled data includes:

[0082] Input the link data into the sampling model to determine whether the link data meets the sampling conditions;

[0083] If so, obtain the sampling data output by the sampling model;

[0084] If not, the link data is re-acquired based on the tracking identifier, and the re-acquired link data is input into the sampling model until it is determined that the re-acquired link data meets the sampling condition, thereby obtaining the sampling data.

[0085] It is understandable that the sampling model can be understood as a model including multiple sampling strategies. Exemplarily, the sampling model can include multiple sampling components, each sampling component adopting a different sampling strategy.

[0086] In practical applications, the sampling strategy of the sampling model may include but is not limited to probability combined with fixed time strategy, important link coloring strategy and long time-consuming link strategy. Link data can be processed by different sampling components to determine whether the link data meets the sampling conditions.

[0087] refer to Figure 3 As shown, SpanA, SpanB, SpanC...SpanN are link data of different service nodes respectively. The link data of each service node is input into the universal sampler model to determine whether the sampling conditions are met. The universal sampler model includes a probability combined with a fixed time strategy sampler, an important link coloring strategy sampler, and a long-time link strategy sampler. Each sampler processes the link data separately, outputs the processing result, and determines whether to sample. The results of the three strategies can be taken or, that is, if one meets the sampling conditions, it is collected. If any one of them does not meet the conditions, the link data can be retrieved based on the tracking identifier, and the retrieved link data can be input into the sampling model until it is determined that the retrieved link data meets the sampling conditions and the sampled data is obtained.

[0088] Multiple sampling components can significantly reduce the number of link data samples, reduce server consumption and storage, while ensuring flexibility and business practicality, providing a powerful acquisition strategy for distributed systems.

[0089] In some embodiments of the present application, inputting link data into a sampling model to determine whether the link data meets the sampling conditions includes:

[0090] Inputting the link data into the sampling model and determining the sampling value of the link data based on the tracking identifier;

[0091] Determining whether the sampling value is greater than the sampling probability;

[0092] If not, determining that the link data meets the first sampling condition;

[0093] If so, determining whether the time difference between the current sampling time and the historical sampling time of the sampling value is less than the sampling period threshold;

[0094] If so, determining that the link data does not meet the first sampling condition;

[0095] If not, determining that the link data meets the first sampling condition.

[0096] It can be understood that the probability combined with the fixed-time strategy can set a sampling probability p and a minimum sampling time period n. The first sampling condition can be the condition that meets the probability combined with the fixed-time strategy.

[0097] In practical applications, referring to Figure 3 as shown, 8 to 15 bytes of the TraceId string can be taken and converted into an unsigned integer, then the unsigned integer is divided by 2 and the integer result is retained, and the integer result is mapped to a number r in the range of 0-1. The sampling value can be understood as r.

[0098] Comparing r with p, if r ≤ p, then sampling is hit, that is, the first sampling condition is met, and the previous sampling time ts of the sampling value can be recorded. If r > p, then sampling is not hit. Comparing the current sampling time now of the sampling value with the previous sampling time ts, if now - ts ≥ n, then sampling is hit, and the link data is collected. If now - ts < n, the link data can be re-obtained based on the tracking identifier, and the re-obtained link data is input into the sampling model until it is determined that the re-obtained link data meets the sampling conditions to obtain sampling data.

[0099] In some embodiments of the present application, inputting link data into a sampling model to determine whether the link data meets the sampling conditions includes:

[0100] Inputting the link data into the sampling model and determining whether the tracking identifier includes a target attribute label;

[0101] If so, determining that the link data satisfies a second sampling condition;

[0102] If not, it is determined that the link data does not meet the second sampling condition.

[0103] It can be understood that the important link coloring strategy can add specific label attributes to the important business process span. The second sampling condition can be understood as the condition that satisfies the important link coloring strategy.

[0104] In practical applications, reference Figure 3 As shown, the span attribute generated by the link can be checked for specific tags. If so, the sampling is hit, that is, the second sampling condition is met, and the link data is collected. If not, the link data can be re-acquired based on the tracking identifier, and the re-acquired link data can be input into the sampling model until it is determined that the re-acquired link data meets the sampling condition to obtain the sampling data.

[0105] In some embodiments of the present application, link data is input into a sampling model to determine whether the link data meets a sampling condition, including:

[0106] Input the link data into the sampling model to obtain the request time of the user request;

[0107] Determine whether the difference between the request time and the current sampling time is greater than or equal to the time threshold;

[0108] If so, determining that the link data satisfies a third sampling condition;

[0109] If not, it is determined that the link data does not meet the third sampling condition.

[0110] It can be understood that the long-time link strategy can be set to set a time threshold n. The third sampling condition can be understood as a condition of the long-time link strategy.

[0111] In practical applications, reference Figure 3 As shown, the request time ts is recorded at the beginning of each request and recorded in the attributes of the span. In each subsequent span, the current sampling time now is compared with the request time ts. If now-ts≥n, it means that the link duration is time-consuming, and the span is marked as hitting the sampling, that is, it meets the third sampling condition, and its parent span is also marked for subsequent collection.

[0112] refer to Figure 4As shown, the collection component package can be integrated into each service instance, the address of the Jaeger collector can be configured, the address of the backend storage database can be configured, and multiple nodes can be deployed, with at least 2 instances per node. The deployment platform can use a cloud platform for automated continuous integration / continuous deployment (CI / CD). For the client, it can be applied separately on the Android system and the IOS system, and can be accessed through specific interfaces on different ends.

[0113] The interface request data will be processed by three strategies at the same time to determine whether to sample, and then sent to the configured Jaeger collector address for collection and storage by Jaeger. Figure 5 As shown, it is the total number of samples per minute for probability sampling in the related art, refer to Figure 6 As shown in the figure, after the three strategies are applied, the total number of samples per minute is significantly reduced. Figure 7 As shown, it is the CPU consumption during data sampling in the related art, refer to Figure 8 As shown, after the three strategies are applied, the CPU consumption is reduced.

[0114] refer to Fig. 9 As shown in the figure, the performance and link collection status can be viewed through the cloud platform monitoring panel and link visualization tool. Fig.10 Schematic diagram of the link topology structure of the service node after visualization.

[0115] It can be seen from the above content that the embodiment of the present application combines multiple collection strategies so that each sampling strategy can be organically combined, thereby increasing the scalability of the sampling component, greatly reducing the number of link data samples, server consumption and storage, while ensuring flexibility and business practicality, and providing a powerful collection strategy for distributed systems.

[0116] Based on the same inventive concept as above, Fig.11 A schematic diagram of the structure of a data sampling device provided by an embodiment of the present invention, the data sampling device 1100 includes:

[0117] The acquisition unit 1101 is used to acquire the calling data requested by the user;

[0118] The processing unit 1102 is configured to determine the link data of the service node based on the calling data;

[0119] The processing unit 1102 is further configured to sample the link data based on the sampling model to obtain sampled data.

[0120] In some embodiments of the present application, the acquisition unit 1101 is further used to acquire a tracking identifier of a service node;

[0121] The processing unit 1102 is further configured to determine the link data from the call data based on the tracking identifier.

[0122] In some embodiments of the present application, the processing unit 1102 is further configured to input the link data into a sampling model to determine whether the link data satisfies a sampling condition;

[0123] If so, obtain the sampling data output by the sampling model;

[0124] If not, the link data is re-acquired based on the tracking identifier, and the re-acquired link data is input into the sampling model until it is determined that the re-acquired link data meets the sampling condition, thereby obtaining the sampling data.

[0125] In some embodiments of the present application, the processing unit 1102 is further configured to input the link data into a sampling model and determine a sampling value of the link data based on the tracking identifier;

[0126] Determine whether the sampled value is greater than the sampling probability;

[0127] If not, determining that the link data satisfies the first sampling condition;

[0128] If so, determining whether the time difference between the current sampling time of the sampled value and the historical sampling time of the sampled value is less than the sampling period threshold;

[0129] If so, determining that the link data does not satisfy the first sampling condition;

[0130] If not, it is determined that the link data meets the first sampling condition.

[0131] In some embodiments of the present application, the processing unit 1102 is further configured to input the link data into a sampling model to determine whether the tracking identifier includes a target attribute tag;

[0132] If so, determining that the link data satisfies a second sampling condition;

[0133] If not, it is determined that the link data does not meet the second sampling condition.

[0134] In some embodiments of the present application, the processing unit 1102 is further configured to input the link data into the sampling model to obtain the request time of the user request;

[0135] Determine whether the difference between the request time and the current sampling time is greater than or equal to the time threshold;

[0136] If so, determining that the link data satisfies a third sampling condition;

[0137] If not, it is determined that the link data does not meet the third sampling condition.

[0138] Based on the above embodiments, an embodiment of the present application provides an electronic device, Fig.12 1 is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. The electronic device 1200 includes: at least one processor 1201, a memory 1202, and optionally, the electronic device 1200 may further include at least one communication interface 1203. The various components in the electronic device 1200 are coupled together via a bus system 1204. It can be understood that the bus system 1204 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 1204 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Fig.12 Various buses are labeled as bus system 1204.

[0139] Based on the hardware implementation of the above program modules, the communication interface 1203 can exchange information with other communication devices;

[0140] The processor 1201 is connected to the communication interface 1203 to implement information interaction with other communication devices, and is used to execute the method provided by one or more of the above technical solutions when running the computer program;

[0141] A memory 1202 on which the computer program is stored.

[0142] Specifically, the processor 1201 is used to obtain the call data requested by the user;

[0143] Determine link data of the service node based on the call data;

[0144] The link data is sampled based on the sampling model to obtain sampled data.

[0145] In some embodiments of the present application, the processor 1201 is configured to obtain a tracking identifier of a service node;

[0146] Link data is determined from the call data based on the tracking identifier.

[0147] In some embodiments of the present application, the processor 1201 is used to input the link data into the sampling model to determine whether the link data meets the sampling condition;

[0148] If so, obtain the sampling data output by the sampling model;

[0149] If not, the link data is re-acquired based on the tracking identifier, and the re-acquired link data is input into the sampling model until it is determined that the re-acquired link data meets the sampling condition, thereby obtaining the sampling data.

[0150] In some embodiments of the present application, the processor 1201 is configured to input the link data into a sampling model and determine a sampling value of the link data based on the tracking identifier;

[0151] Determine whether the sampled value is greater than the sampling probability;

[0152] If not, determining that the link data satisfies the first sampling condition;

[0153] If so, determining whether the time difference between the current sampling time of the sampled value and the historical sampling time of the sampled value is less than the sampling period threshold;

[0154] If so, determining that the link data does not satisfy the first sampling condition;

[0155] If not, it is determined that the link data meets the first sampling condition.

[0156] In some embodiments of the present application, the processor 1201 is configured to input the link data into a sampling model to determine whether the tracking identifier includes a target attribute tag;

[0157] If so, determining that the link data satisfies a second sampling condition;

[0158] If not, it is determined that the link data does not meet the second sampling condition.

[0159] In some embodiments of the present application, the processor 1201 is configured to input link data into a sampling model to obtain a request time of a user request;

[0160] Determine whether the difference between the request time and the current sampling time is greater than or equal to the time threshold;

[0161] If so, determining that the link data satisfies a third sampling condition;

[0162] If not, it is determined that the link data does not meet the third sampling condition.

[0163] It can be understood that the memory 1202 can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), Sync Link Dynamic Random Access Memory (SLDRAM), and Direct Rambus Random Access Memory (DRRAM).The memory 1202 described in the embodiments of the present invention is intended to include, but is not limited to, these and any other suitable types of memories.

[0164] The memory 1202 in the embodiment of the present invention is used to store various types of data to support the operation of the electronic device 1200. Examples of such data include: any computer program for operating on the electronic device 1200. The program for implementing the method of the embodiment of the present invention may be included in the memory 1202.

[0165] The method disclosed in the above embodiment of the present invention can be applied to the processor 1201, or implemented by the processor 1201. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor may be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present invention, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0166] In an exemplary embodiment, the electronic device 1200 can be implemented by one or more application specific integrated circuits (ASIC), DSP, programmable logic device (PLD), complex programmable logic device (CPLD), field programmable gate array (FPGA), general processor, controller, microcontroller (MCU), microprocessor, or other electronic components to execute the above method.

[0167] Based on the above embodiments, the embodiments of the present application further provide a computer product, including a computer program, which is executed by a processor to implement Figure 2 The corresponding embodiments provide steps in the data sampling method.

[0168] Based on the above embodiments, the embodiments of the present application further provide a storage medium, wherein the storage medium stores computer executable instructions, and the computer executable instructions are configured to execute Figure 2 The corresponding embodiment provides a data sampling method.

[0169] It should be noted that the above-mentioned computer storage medium can be a memory such as ROM, PROM, EPROM, EEPROM, FRAM, FlashMemory, magnetic surface storage, optical disk, or CD-ROM; it can also be various electronic devices including one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.

[0170] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0171] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0172] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0173] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0174] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0175] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0176] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A data sampling method, characterized in that: The method comprises: Get the call data requested by the user; Determine link data of a service node based on the call data; The link data is sampled based on a sampling model to obtain sampled data.

2. The method according to claim 1, characterized in that The determining the link data of the service node based on the calling data includes: Obtaining a tracking identifier of the service node; The link data is determined from the call data based on the tracking identifier.

3. The method according to claim 2, characterized in that The step of sampling the link data based on the sampling model to obtain the sampled data includes: Inputting the link data into the sampling model to determine whether the link data meets the sampling condition; If so, obtaining sampling data output by the sampling model; If not, the link data is reacquired based on the tracking identifier, and the reacquired link data is input into the sampling model until it is determined that the reacquired link data meets the sampling condition, thereby obtaining the sampling data.

4. The method according to claim 3, characterized in that The step of inputting the link data into the sampling model and determining whether the link data meets a sampling condition includes: Inputting the link data into the sampling model, and determining a sampling value of the link data based on the tracking identifier; Determining whether the sampling value is greater than the sampling probability; If not, determining that the link data satisfies a first sampling condition; If so, determining whether the time difference between the current sampling time of the sampled value and the historical sampling time of the sampled value is less than a sampling period threshold; If so, determining that the link data does not satisfy the first sampling condition; If not, it is determined that the link data meets the first sampling condition.

5. The method according to claim 3, characterized in that: The step of inputting the link data into the sampling model and determining whether the link data meets a sampling condition includes: Inputting the link data into the sampling model to determine whether the tracking identifier includes a target attribute tag; If so, determining that the link data satisfies a second sampling condition; If not, it is determined that the link data does not satisfy the second sampling condition.

6. The method according to claim 3, characterized in that The step of inputting the link data into the sampling model and determining whether the link data meets a sampling condition includes: Inputting the link data into the sampling model to obtain the request time of the user request; Determine whether the difference between the request time and the current sampling time is greater than or equal to a time threshold; If so, determining that the link data satisfies a third sampling condition; If not, it is determined that the link data does not satisfy the third sampling condition.

7. A data sampling device, characterized in that: The data sampling device comprises: An acquisition unit, used for acquiring the call data requested by the user; A processing unit, configured to determine link data of a service node based on the call data; The processing unit is further used to sample the link data based on a sampling model.

8. An electronic device, characterized in that: include: a processor and a memory for storing a computer program capable of being executed on the processor, Wherein, when the processor is used to run the computer program, it executes the steps of the method described in any one of claims 1 to 6.

9. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.