Data acquisition method, vehicle, computer equipment and computer program product
By obtaining data acquisition configuration information and judging the call target, generating and uploading the collected data, the problem of low degree of data acquisition automation in the existing technology is solved, the acquisition efficiency is improved, and the decoupling of data acquisition and service is achieved.
Patent Information
- Application Number
- CN202411350693.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2024-12-27
AI Technical Summary
The existing data acquisition methods have low degree of automation, high degree of coupling, and low collection efficiency, which is not conducive to maintenance and upgrade.
By obtaining data acquisition configuration information, we judge whether the call of the data acquisition interface is a target call, and generate and store the collected data when the upload conditions are met, and upload it to the cloud to realize the automation of data acquisition and independently determine whether the current call is Target call to achieve decoupling of data acquisition and service.
It improves data acquisition efficiency, realizes automation of data acquisition, reduces the coupling degree with services, and facilitates maintenance and upgrades.
Smart Images

Figure CN119201624A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of data processing, and in particular to a data collection method, a vehicle, a computer device, and a computer program product. Background Art
[0002] Data embedding in vehicle software is an important software design method. It captures and collects data generated by software operation by installing and running special tags or "sensors" in the system. This data is of great significance for understanding user needs, optimizing product design and operation, and improving business efficiency. As a special application, vehicle software needs to process complex vehicle environment and driving behavior data. Through data embedding, we can better understand the vehicle's operating status and environmental information, thereby improving the safety and stability of the vehicle communication system and enhancing the intelligence and convenience of the vehicle.
[0003] However, existing data collection usually uses manual recording or detection systems, log analysis tools, etc. These methods have a low degree of automation, a high degree of coupling with software, and low collection efficiency, which is not conducive to maintenance and upgrades. Summary of the invention
[0004] The embodiments of the present disclosure at least provide a data collection method, a vehicle, a computer device, and a computer program product.
[0005] In a first aspect, an embodiment of the present disclosure provides a data collection method, including:
[0006] Acquire data collection configuration information; the data collection configuration information indicates that there is at least one object to be collected;
[0007] In the case where at least one data collection interface is called by the tracking code in the business code, based on the to-be-collected object indicated by the data collection configuration information and the target object corresponding to the data collection interface currently called, determining whether the current call is a target call;
[0008] When the current call is a target call, the collected data corresponding to the current call is generated and stored;
[0009] In response to satisfying the upload condition, the stored collected data is uploaded to the cloud.
[0010] In an optional implementation manner, the obtaining of data acquisition configuration information includes:
[0011] The data collection configuration information is obtained from the data collection management process by using inter-process communication; the data collection management process is used to obtain the data collection configuration information from the cloud.
[0012] In an optional implementation manner, the service code is generated by the following steps:
[0013] Obtain an interface definition file; the interface definition file indicates objects to be collected that need to be buried;
[0014] Generate data acquisition code using a code generation tool of an interface definition language and the interface definition file; the data acquisition code includes a library file corresponding to the embedding code and a header file matching the library file;
[0015] The business code is generated based on the data collection code and the business function code.
[0016] In an optional implementation manner, the object to be collected indicated by the data collection configuration information and the target object corresponding to the data collection interface currently called determine whether the current call is a target call:
[0017] Determine the target object corresponding to the data acquisition interface called in the current call;
[0018] In the case where the target object matches any object to be collected indicated by the data collection configuration information, the current call is determined to be a target call.
[0019] In an optional implementation manner, the upload condition includes an upload period;
[0020] The method further comprises:
[0021] The upload period in the upload condition is determined based on at least one of the computing resource occupancy and bandwidth resource condition of the current system and the importance of the data indicated in the data acquisition configuration information.
[0022] In an optional implementation manner, uploading the stored collected data to the cloud includes:
[0023] Merging and compressing the stored collected data to obtain combined and compressed collected data;
[0024] The combined and compressed collected data is uploaded to the cloud.
[0025] In an optional implementation manner, the acquisition object includes at least one method object and / or at least one event object;
[0026] When the acquisition object includes a method object, the acquisition data includes:
[0027] Data indicating the number of times a method object has been called;
[0028] When the collection object includes an event object, the collection data includes:
[0029] Data indicating the number of times the event object was triggered.
[0030] In a second aspect, an embodiment of the present disclosure further provides a vehicle, comprising at least one domain controller; the domain controller is used to execute the steps of the first aspect, or any possible data collection method in the first aspect.
[0031] In a third aspect, an optional implementation of the present disclosure further provides a computer device, comprising: a processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the machine-readable instructions are executed by the processor to perform the first aspect, or any possible data collection method in the first aspect.
[0032] In a fourth aspect, an optional implementation of the present disclosure further provides a computer program product, including a computer program, which, when executed, implements the first aspect, or any possible data collection method in the first aspect.
[0033] For a description of the effects of the above-mentioned vehicle, computer equipment and computer program product, please refer to the description of the above-mentioned data collection method, which will not be repeated here.
[0034] It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and are not intended to limit the technical solutions of the present disclosure.
[0035] The data collection method, vehicle, computer device and computer program product provided by the embodiments of the present disclosure can determine whether the call of the data collection interface is a target call based on the data collection configuration information, and generate and store corresponding collection data when it is a target call, and upload the stored collection data to the cloud when the upload conditions are met, thereby realizing the automation of data collection and improving data collection efficiency; and, because it is possible to independently determine whether the current call is a target call, the data collection process can be separated from the business process, realizing the decoupling of data collection and business, which is convenient for maintenance and upgrading.
[0036] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.
[0038] Figure 1 A schematic diagram showing a data collection architecture provided by some embodiments of the present disclosure is shown;
[0039] Figure 2 A flow chart of a data collection method provided by some embodiments of the present disclosure is shown;
[0040] Figure 3 A flow chart showing another data collection method provided by some embodiments of the present disclosure is shown;
[0041] Figure 4 A schematic diagram of a computer device provided by some embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure is not intended to limit the scope of the present disclosure claimed for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.
[0043] Research has found that existing data collection usually uses manual recording or detection systems, log analysis tools, etc. These methods have a low degree of automation, a high degree of coupling with software, and low collection efficiency, which is not conducive to maintenance and upgrades.
[0044] Based on the above research, the present disclosure provides a data collection method, a vehicle, a computer device and a computer program product, which can determine whether the call of the data collection interface is a target call according to the data collection configuration information, and generate and store corresponding collection data when it is a target call, and upload the stored collection data to the cloud when the upload conditions are met, thereby realizing the automation of data collection and improving data collection efficiency; and, because it can independently determine whether the current call is a target call, the data collection process can be separated from the business process, realizing the decoupling of data collection and business, which is convenient for maintenance and upgrading.
[0045] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0046] The term "and / or" herein only describes an association relationship, indicating that three relationships may exist. For example, A and / or B may represent the following three situations: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C may represent including any one or more elements selected from the set consisting of A, B, and C.
[0047] It can be understood that before using the technical solutions disclosed in the embodiments of the present disclosure, the personal information involved in the present disclosure (including but not limited to attribute information, facial images, etc.) is obtained with the authorization of the user. Specifically, it can be through a pop-up window in the page, information push, etc., sending a prompt message requesting authorization to the user, and obtaining the above personal information after the user agrees to the authorization.
[0048] To facilitate understanding of this embodiment, a data collection method disclosed in the embodiment of the present disclosure is first introduced in detail. The execution subject of the data collection method provided in the embodiment of the present disclosure is generally a computer device with certain computing capabilities, and the computer device includes, for example: a terminal device or other processing device, and the terminal device can be a computing device, a vehicle-mounted device, etc. In some possible implementations, the data collection method can be implemented by a processor calling a computer-readable instruction stored in a memory.
[0049] See also Figure 1 FIG. 1 is a schematic diagram of a data collection architecture provided by an embodiment of the present disclosure. The data collection architecture can be deployed on a vehicle, and the vehicle can include multiple domain controllers (or domains for short, such as Figure 1In the A domain, B domain, C domain and D domain), the vehicle can adopt a service-oriented architecture (Service-Oriented Architecture, SOA).
[0050] SOA is a software design pattern that modularizes the different functions or services of an application so that these services can communicate and collaborate with each other over the network. Each service is usually independent and self-contained and can be developed, deployed and managed separately. Services communicate through well-defined interfaces (usually based on standard protocols such as HTTP, SOAP, REST, etc.), which enables different services to interoperate seamlessly even if they are implemented in different programming languages.
[0051] The domain controller may include a server and a client. For example, the domain A may include ClientA, which may include services corresponding to the business code, services corresponding to the SOA communication middleware, and data collection services corresponding to the data collection module; the domain C may include ServerA, which may include services corresponding to the business code, services corresponding to the SOA communication middleware, and data collection services. Among them, ClientA and ServerA may interact with each other. For example, ClientA may initiate a service interface call to ServerA, and ServerA may use the service interface to return the call result to ClientA. When ClientA initiates a service interface call to ServerA, it may use the service of the SOA communication middleware. In the business code, a point-of-entry code may be included. When the point-of-entry code is triggered, the data collection service may be called, so that data collection may be performed through the data collection service. The data collection service may send the collected data to the data engine DataEngine (that is, the data collection management process or the data collection management service), and the data engine may upload the collected data to the cloud database (that is, DataCloud or CloudDataEngine).
[0052] See also Figure 2 FIG. 1 is a flow chart of a data collection method provided by an embodiment of the present disclosure. The execution subject of the data collection method may be a vehicle or a domain controller in the vehicle or a service module in the domain controller SOA architecture, and the method includes:
[0053] S201. Acquire data collection configuration information; the data collection configuration information indicates that there is at least one object to be collected.
[0054] In this step, data collection configuration information may be obtained from the cloud. The data collection configuration information may indicate an object to be collected that needs data collection. The object to be collected may include at least one method object and / or at least one event object.
[0055] Among them, the method object can be a method in the business code, which refers to a function defined in a class (or object). Methods are functions associated with objects, and they are usually used to define the behavior or operation of objects. Methods can access and modify the properties of objects and can be called through instances of objects. Event objects can be events such as receiving specific data and executing specific behaviors.
[0056] In a possible implementation, the data collection configuration information may also indicate that there are upload conditions, thereby enabling configuration of the upload conditions in the cloud.
[0057] The upload conditions sent by the cloud can be configured by the user on the cloud, or can be automatically generated or updated by the cloud.
[0058] When obtaining data collection configuration information, the data collection management process can be used to communicate with the cloud to obtain the data collection configuration information sent by the cloud. The data collection process (or data collection service) can obtain the data collection configuration information sent by the cloud from the data collection management process through inter-process communication.
[0059] S202. When at least one data collection interface is called by the tracking code in the business code, determine whether the current call is a target call based on the object to be collected indicated by the data collection configuration information and the target object corresponding to the data collection interface currently called.
[0060] After obtaining the data collection configuration information, you can determine what kind of data needs to be collected when collecting data. The business code can be inserted with tracking code. When the business code runs to the tracking location, the tracking code will be executed, thereby calling the data collection interface.
[0061] The data collection service may provide one or more data collection interfaces. In one possible implementation, the data collection service may use a proxy to call the corresponding data collection interface when the interface corresponding to the embedding code is called, thereby enabling the data collection service to detect that the business code is called.
[0062] Specifically, when the data acquisition interface is called, the target object corresponding to the data acquisition interface called in the current call can be determined. If the target object matches any object to be collected indicated by the data acquisition configuration information (such as the target object is the object to be collected), the current call can be determined as a target call.
[0063] The above business code can be generated by following the steps below:
[0064] Obtain an interface definition file; the interface definition file indicates objects to be collected that need to be buried;
[0065] Generate data acquisition code using a code generation tool of an interface definition language and the interface definition file; the data acquisition code includes a library file corresponding to the embedding code and a header file matching the library file;
[0066] The business code is generated based on the data collection code and the business function code.
[0067] The above interface definition file can indicate the objects to be collected that need to be buried. Exemplarily, the interface definition file can indicate the request method and event that need to be buried. In some possible implementations, the interface definition file can also indicate parameter requirements, data format, response structure and other information.
[0068] After obtaining the interface definition file, the data acquisition code can be generated according to the information indicated by the interface definition file. The data acquisition code can include a library file corresponding to the embedding code and a header file matching the library file. The header file can be referenced by other codes (such as business function codes). By referencing the header file, the library file can be called, that is, the embedding code can be executed.
[0069] The above library files may contain specific implementations of functions containing embedded code.
[0070] Among them, the above-mentioned business function code may refer to the original code developed by the business personnel for the business function. The business function code usually only contains the relevant code of the software business. After obtaining the business function code, the business function code can reference the above-mentioned header file to obtain the business code. During the execution of the business code, the function in the library file (that is, the embedded point code) can be called through the header file to complete the call to the data acquisition interface.
[0071] In this way, when the tracking code in the business code is executed, the data collection interface will be called, and the data collection service will determine whether the call is a target call, that is, whether to collect the data corresponding to the call.
[0072] S203: When the current call is a target call, generate and store the collected data corresponding to the current call.
[0073] When determining that the current call is a target call, the data collection service may determine that data collection is required for the current call. At this time, the collection data corresponding to the current call may be generated and stored.
[0074] Specifically, when the acquisition object includes a method object, the acquisition data includes data indicating the number of times the method object is called; when the acquisition object includes an event object, the acquisition data includes data indicating the number of times the event object is triggered.
[0075] In a possible implementation, the collected data may also include relevant information of the current call, such as the call time, parameters carried in the call, etc.
[0076] S204: In response to satisfying the upload condition, the stored collected data is uploaded to the cloud.
[0077] When the upload conditions are met, the data collection service can upload the stored collected data to the cloud. Specifically, the data collection service can first merge and compress the stored collected data to obtain merged and compressed data, thereby simplifying the data structure of the collected data and reducing the data volume. Afterwards, the merged and compressed collected data can be uploaded to the cloud to complete the data collection.
[0078] The above upload conditions may be carried in the data collection configuration information, or may be determined autonomously by the data collection service. In a possible implementation, the above upload conditions may include an upload cycle. When the collection cycle ends at the current moment, the stored collection data may be uploaded to the cloud and a new collection cycle may begin.
[0079] When the above-mentioned upload conditions are determined autonomously by the data collection service, the data collection service may determine the upload period in the above-mentioned upload conditions based on at least one of the computing resource occupancy of the current system, the bandwidth resource situation, and the importance of the data indicated in the data collection configuration information, and update the upload period in real time.
[0080] When uploading the collected data to the cloud, the collected data can be first sent to the data collection management process through inter-process communication, and then the data collection management process sends the collected data to the cloud.
[0081] The data collection method provided by the present disclosure can determine whether the call of the data collection interface is a target call according to the data collection configuration information, and generate and store the corresponding collection data when it is a target call, and upload the stored collection data to the cloud when the upload conditions are met, thereby realizing the automation of data collection and improving data collection efficiency; and, because it is possible to independently determine whether the current call is a target call, the data collection process can be separated from the business process, realizing the decoupling of data collection and business, and facilitating maintenance and upgrading.
[0082] See also Figure 3FIG. 1 is a flowchart of another data collection method provided by an embodiment of the present disclosure. In this method, the cloud (Cloud DataEngine) responds to the request for synchronization of data collection configuration information (synchronization of tracking configuration) from the data collection management process (DataEngine) and returns data collection configuration information (return tracking configuration) to the data collection management process; the data collection service (SOA) DataCollector.so, which can be a dynamic library file) can obtain data collection configuration information from the data collection management process (obtain SOA tracking configuration), and the data collection management process will send the obtained data collection configuration information to the data collection service through inter-process communication (return SOA tracking configuration); in this way, when the tracking code in the business code is triggered (such as ClientA calls ServerA's service interface, ServerA returns call information through the service interface, ServerA sends information to ClientA to trigger a service event, etc.), the data collection interface provided by the data collection service will be called (client interface call, client interface return, client interface signal tracking trigger), at this time, the data collection service can determine whether the call is a target call based on the data collection configuration information, and if so, generate and store the corresponding collection data; the data collection service can send the stored collection data to the data collection management process (synchronize SOA data tracking), and when the upload conditions are met, the data collection management process can send the stored collection data to the cloud (upload data tracking).
[0083] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0084] Based on the same inventive concept, a data acquisition device corresponding to the data acquisition method is also provided in the embodiment of the present disclosure. Since the principle of solving the problem by the device in the embodiment of the present disclosure is similar to the above-mentioned data acquisition method in the embodiment of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0085] Based on the same inventive concept, a vehicle corresponding to the data collection method is also provided in the embodiment of the present disclosure, and the vehicle may include at least one domain controller, and the domain controller is used to point to the steps of any data collection method described in the embodiment of the present disclosure. Since the principle of solving the problem by the device in the embodiment of the present disclosure is similar to the above-mentioned data collection method in the embodiment of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0086] Based on the same technical concept, the embodiment of the present disclosure also provides a computer device. Figure 4As shown, it is a schematic diagram of the structure of a computer device 400 provided in an embodiment of the present disclosure, including a processor 401, a memory 402, and a bus 403. Among them, the memory 402 is used to store execution instructions, including a memory 4021 and an external memory 4022; the memory 4021 here is also called an internal memory, which is used to temporarily store the operation data in the processor 401, and the data exchanged with the external memory 4022 such as a hard disk. The processor 401 exchanges data with the external memory 4022 through the memory 4021. When the computer device 400 is running, the processor 401 communicates with the memory 402 through the bus 403, so that the processor 401 executes the following instructions:
[0087] Acquire data collection configuration information; the data collection configuration information indicates that there is at least one object to be collected;
[0088] In the case where at least one data collection interface is called by the tracking code in the business code, based on the to-be-collected object indicated by the data collection configuration information and the target object corresponding to the data collection interface currently called, determining whether the current call is a target call;
[0089] When the current call is a target call, the collected data corresponding to the current call is generated and stored;
[0090] In response to satisfying the upload condition, the stored collected data is uploaded to the cloud.
[0091] In an optional implementation manner, the obtaining of data acquisition configuration information includes:
[0092] The data collection configuration information is obtained from the data collection management process by using inter-process communication; the data collection management process is used to obtain the data collection configuration information from the cloud.
[0093] In an optional implementation manner, the processor 401 further executes:
[0094] Obtain an interface definition file; the interface definition file indicates objects to be collected that need to be buried;
[0095] Generate data acquisition code using a code generation tool of an interface definition language and the interface definition file; the data acquisition code includes a library file corresponding to the embedding code and a header file matching the library file;
[0096] The business code is generated based on the data collection code and the business function code.
[0097] In an optional implementation, in the instructions executed by the processor 401, the object to be collected indicated by the data collection configuration information and the target object corresponding to the data collection interface currently called determine whether the current call is a target call:
[0098] Determine the target object corresponding to the data acquisition interface called in the current call;
[0099] In the case where the target object matches any object to be collected indicated by the data collection configuration information, the current call is determined to be a target call.
[0100] In an optional implementation, in the instruction executed by the processor 401, the upload condition includes an upload cycle;
[0101] The processor 401 also executes:
[0102] The upload period in the upload condition is determined based on at least one of the computing resource occupancy and bandwidth resource condition of the current system and the importance of the data indicated in the data acquisition configuration information.
[0103] In an optional implementation manner, in the instructions executed by the processor 401, uploading the stored collected data to the cloud includes:
[0104] Merging and compressing the stored collected data to obtain combined and compressed collected data;
[0105] The combined and compressed collected data is uploaded to the cloud.
[0106] In an optional implementation manner, in the instruction executed by the processor 401, the acquisition object includes at least one method object and / or at least one event object;
[0107] When the acquisition object includes a method object, the acquisition data includes:
[0108] Data indicating the number of times a method object has been called;
[0109] When the collection object includes an event object, the collection data includes:
[0110] Data indicating the number of times the event object was triggered.
[0111] The present disclosure also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the data acquisition method described in the above method embodiment are executed. The storage medium can be a volatile or non-volatile computer-readable storage medium.
[0112] The present disclosure also provides a computer program product that carries a program code. The program code includes instructions that can be used to execute the steps of the data acquisition method described in the above method embodiment. For details, please refer to the above method embodiment, which will not be repeated here.
[0113] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is implemented as a computer storage medium. In another optional embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).
[0114] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.
[0115] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0116] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0117] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0118] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. A data collection method, characterized in that: include: Get data collection configuration information; The data collection configuration information indicates that there is at least one object to be collected; In the case where at least one data collection interface is called by the tracking code in the business code, based on the to-be-collected object indicated by the data collection configuration information and the target object corresponding to the data collection interface currently called, determining whether the current call is a target call; When the current call is a target call, the collected data corresponding to the current call is generated and stored; In response to satisfying the upload condition, the stored collected data is uploaded to the cloud.
2. The method according to claim 1, characterized in that The obtaining of data collection configuration information includes: The data collection configuration information is obtained from the data collection management process by using inter-process communication; the data collection management process is used to obtain the data collection configuration information from the cloud.
3. The method according to claim 1, characterized in that Generate the business code by following the steps below: Obtain an interface definition file; the interface definition file indicates objects to be collected that need to be buried; Generate data acquisition code using a code generation tool of an interface definition language and the interface definition file; The data acquisition code includes a library file corresponding to the embedding code and a header file matching the library file; The business code is generated based on the data collection code and the business function code.
4. The method according to claim 1, characterized in that The object to be collected indicated by the data collection configuration information and the target object corresponding to the data collection interface currently called determine whether the current call is a target call: Determine the target object corresponding to the data acquisition interface called in the current call; In the case where the target object matches any object to be collected indicated by the data collection configuration information, the current call is determined to be a target call.
5. The method according to claim 1, characterized in that The upload conditions include an upload period; The method further comprises: The upload period in the upload condition is determined based on at least one of the computing resource occupancy and bandwidth resource condition of the current system and the importance of the data indicated in the data acquisition configuration information.
6. The method according to claim 1, characterized in that The step of uploading the stored collected data to the cloud comprises: Merging and compressing the stored collected data to obtain combined and compressed collected data; The combined and compressed collected data is uploaded to the cloud.
7. The method according to claim 1, characterized in that The acquisition object includes at least one method object and / or at least one event object; When the acquisition object includes a method object, the acquisition data includes: Data indicating the number of times a method object has been called; When the collection object includes an event object, the collection data includes: Data indicating the number of times the event object was triggered.
8. A vehicle, characterized in that: The vehicle includes at least one domain controller; the at least one domain controller is used to execute the data collection method according to any one of claims 1-7.
9. A computer device, characterized in that: include: A processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the machine-readable instructions are executed by the processor to perform the data collection method according to any one of claims 1 to 7.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed, the data collection method according to any one of claims 1 to 7 is implemented.
