A data reporting method and device, computer equipment and storage medium

CN115437615BActive Publication Date: 2026-08-18TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110612962.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-02
Publication Date
2026-08-18
Estimated Expiration
2041-06-02

AI Technical Summary

Technical Problem

但是,由于数据上报是各个应用程序的通用功能,若根据不同的操作系统开发出不同的数据上报方法,则需要对不同的数据上报方法进行维护,将会提高数据上报所需要的资源和成本

Benefits of technology

[0015]This application embodiment can receive multiple data to be reported transmitted from the data receiving layer in a data reporting framework. These multiple data to be reported are data collected by multiple operating systems, and each data to be reported corresponds to a code format. The format conversion layer in the data reporting framework converts the code format of each data to be reported into a compatible code format, resulting in format-compatible data for each data to be reported. The compatible code format supports multiple data to be reported sharing the data transmission interface in the format conversion layer. The data transmission interface is used to transmit each format-compatible data to the reporting layer in the data reporting framework. By reporting each format-compatible data through the reporting layer, the resources and costs required for data reporting are reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115437615B_ABST
    Figure CN115437615B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a data reporting method and device, computer equipment and a storage medium. Embodiments of the present application can receive a plurality of to-be-reported data transmitted by a data receiving layer in a data reporting framework, the plurality of to-be-reported data being data collected by a plurality of operating systems respectively, wherein one to-be-reported data corresponds to one code format; convert the code format of each to-be-reported data into a compatible code format by using a format conversion layer in the data reporting framework, to obtain format compatible data of each to-be-reported data, wherein the compatible code format supports the plurality of to-be-reported data sharing a data transmission interface in the format conversion layer; transmit each format compatible data to a reporting layer in the data reporting framework by using the data transmission interface; and report each format compatible data by the reporting layer, thereby reducing the resources and costs required for data reporting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, specifically to a data reporting method, apparatus, computer equipment, and storage medium. Background Technology

[0002] With the development of information technology and the rapid development and popularization of internet technology, the application programs on computer devices have flourished. As an extension of the functions of computer devices, applications have not only promoted the prosperity and development of the internet field, but also brought convenience to people's daily learning and life, becoming an indispensable part of people's daily learning and life.

[0003] To better develop applications, developers often collect data from them, report and analyze this data to optimize the application. Since applications can typically run on different operating systems, data reporting methods need to be developed for each system. However, because data reporting is a common function across applications, developing different reporting methods for different operating systems requires maintaining each method, increasing the resources and costs associated with data reporting. Summary of the Invention

[0004] This application provides a data reporting method, apparatus, computer equipment, and storage medium, which reduces the resources and costs required for data reporting.

[0005] This application provides a data reporting method, including: The data receiving layer in the data reporting framework receives multiple data to be reported, which are data collected by multiple operating systems respectively. Each data to be reported corresponds to a code format. The code format of each data to be reported is converted into a compatible code format using the format conversion layer in the data reporting framework, thereby obtaining format-compatible data for each data to be reported. The compatible code format supports the sharing of the data transmission interface in the format conversion layer among the multiple data to be reported. The data transmission interface is used to transmit each format-compatible data to the reporting layer in the data reporting framework; The data reporting logic of the reporting layer reports each format-compatible data.

[0006] Accordingly, embodiments of this application also provide a data reporting device, including: The receiving unit is used to receive multiple data to be reported transmitted by the data receiving layer in the data reporting framework. The multiple data to be reported are data collected by multiple operating systems respectively. Each data to be reported corresponds to a code format. The conversion unit is used to convert the code format of each data to be reported into a compatible code format using the format conversion layer in the data reporting framework, so as to obtain the format compatible data of each data to be reported, wherein the compatible code format supports the multiple data to be reported to share the data transmission interface in the format conversion layer; A transmission unit is used to transmit each format-compatible data to the reporting layer in the data reporting framework using the data transmission interface. The reporting unit is used to report each format-compatible data through the data reporting logic of the reporting layer.

[0007] In one embodiment, the conversion unit includes: A receiving subunit is configured to receive the data to be reported and the service reporting protocol corresponding to the data to be reported at the format conversion layer. The encoding processing subunit is used to encode the data to be reported according to the business reporting protocol using the format conversion layer to obtain the encoded data to be reported. The code format conversion subunit is used to convert the code format of the encoded data to be reported into a compatible code format, so as to obtain the format compatible data of each data to be reported.

[0008] In one embodiment, the encoding processing subunit includes: The parsing module is used to parse the business reporting protocol through the format conversion layer to obtain the data type corresponding to the data to be reported; The acquisition module is used to acquire the encoding protocol of the data to be reported based on the data type through the format conversion layer; The encoding module is used to encode the data to be reported according to the encoding protocol through the data encoding interface of the format conversion layer to obtain the encoded data to be reported.

[0009] In one embodiment, the code format conversion subunit includes: The identification module is used to identify the code format of the encoded data to be reported using the format conversion layer, and obtain the code format of the encoded data to be reported. The calling module is used to call the format conversion file corresponding to the code format in the format conversion layer; The conversion processing module is used to convert the code format of the data to be reported according to the format conversion file, so as to obtain format-compatible data of the data to be reported.

[0010] In one embodiment, the conversion processing module includes: The parsing submodule is used to parse the format conversion file to obtain the data attribute conversion logic; The conversion processing submodule is used to perform attribute conversion processing on the data to be reported according to the data attribute conversion logic, so as to obtain format-compatible data of the data to be reported.

[0011] In one embodiment, the transmission unit includes: The acquisition subunit is used to obtain the reporting configuration information of the data to be reported through the format conversion layer; The association subunit is used to associate the format-compatible data with the preset reporting service through the format conversion layer according to the reporting configuration information; The data transmission subunit is used to transmit format-compatible data associated with the preset reporting service to the reporting layer of the data reporting framework through the data transmission interface.

[0012] In one embodiment, the reporting unit includes: A receiving subunit is used to receive format-compatible data associated with the preset reporting service through the reporting layer; A sub-unit is defined to determine the target data reporting sub-logic in the data reporting logic according to the preset reporting service. An execution subunit is used to execute the target data reporting sub-logic in order to report the format-compatible data.

[0013] This application also provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various alternative embodiments described above.

[0014] Accordingly, this application also provides a storage medium storing instructions that, when executed by a processor, implement any of the data reporting methods provided in this application.

[0015] This application embodiment can receive multiple data to be reported transmitted from the data receiving layer in a data reporting framework. These multiple data to be reported are data collected by multiple operating systems, and each data to be reported corresponds to a code format. The format conversion layer in the data reporting framework converts the code format of each data to be reported into a compatible code format, resulting in format-compatible data for each data to be reported. The compatible code format supports multiple data to be reported sharing the data transmission interface in the format conversion layer. The data transmission interface is used to transmit each format-compatible data to the reporting layer in the data reporting framework. By reporting each format-compatible data through the reporting layer, the resources and costs required for data reporting are reduced. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is a schematic diagram of a scenario illustrating the data reporting method provided in an embodiment of this application; Figure 2 This is a flowchart illustrating the data reporting method provided in an embodiment of this application; Figure 3 This is a schematic diagram of a data receiving layer provided in an embodiment of this application; Figure 4 This is a schematic diagram of a scenario for the format conversion layer provided in an embodiment of this application; Figure 5 This is a schematic diagram of the reporting layer scenario provided in the embodiments of this application; Figure 6 This is another flowchart illustrating the data reporting method provided in the embodiments of this application; Figure 7 This is a schematic diagram of a data reporting framework provided in an embodiment of this application; Figure 8 This is a schematic diagram of the structure of the data reporting device provided in the embodiments of this application; Figure 9 This is a schematic diagram of the terminal structure provided in the embodiments of this application. Detailed Implementation

[0018] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. However, the described embodiments are only some embodiments of this application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0019] This application provides a data reporting method, which can be executed by a data reporting device integrated into a computer device. The computer device may include at least one of a terminal and a server. That is, the data reporting method proposed in this application can be executed by either a terminal or a server.

[0020] The terminals can be smartphones, tablets, laptops, personal computers (PCs), smart home devices, wearable electronic devices, VR / AR devices, in-vehicle computers, facial recognition devices, IoT devices, etc. The servers can be interconnecting servers between multiple heterogeneous systems or backend servers, or they can be independent physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud servers providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, and big data and artificial intelligence platforms, etc.

[0021] In one embodiment, such as Figure 1 The data reporting device can be integrated into computer equipment such as terminals or servers to implement the data reporting method proposed in this application embodiment. Specifically, the computer equipment can receive multiple data to be reported transmitted by the data receiving layer in the data reporting framework 10. The multiple data to be reported are data collected by multiple operating systems, wherein each data to be reported corresponds to a code format; the code format of each data to be reported is converted into a compatible code format by the format conversion layer in the data reporting framework 10 to obtain format-compatible data for each data to be reported, wherein the compatible code format supports multiple data to be reported sharing the data transmission interface in the format conversion layer; each format-compatible data is transmitted to the reporting layer in the data reporting framework 10 using the data transmission interface; and each format-compatible data is reported through the reporting layer.

[0022] The following will provide a detailed description of each example. It should be noted that the order of description of the following embodiments is not intended to limit the preferred order of the embodiments.

[0023] This application embodiment will be described from the perspective of a data reporting device, which can be integrated into a computer device, such as a server or a terminal.

[0024] like Figure 2 The above provides a data reporting method, the specific process of which includes: 110. Receive multiple data to be reported transmitted by the data receiving layer in the data reporting framework. The multiple data to be reported are data collected by multiple operating systems respectively. Each data to be reported corresponds to a code format.

[0025] The data reporting framework includes a single set of logic that enables the reporting of various data collected from multiple operating systems. For example, this framework could be a collection of system software that controls the execution of applications and provides developers with a user interface. This framework allows for the reporting of data collected from multiple operating systems without requiring the development of separate data reporting methods for each operating system.

[0026] In one embodiment, the data reporting framework may include multiple functional layers, each with its corresponding functions. These functional modules cooperate with each other to jointly realize the functions of the data reporting framework. For example, the data reporting framework may include functional layers such as a data receiving layer, a format conversion layer, and a reporting layer.

[0027] In one embodiment, the data receiving layer can receive various data collected by different operating systems and transmit data with other functional layers.

[0028] An operating system includes computer programs that manage the hardware and software resources of computer devices. For example, operating systems can include Android, iOS, Windows, and Linux, among others.

[0029] The data to be reported includes data collected and reported through the operating system. For example, the data to be reported may include data collected from operating systems such as Android, iOS, Windows, and Linux.

[0030] In one embodiment, the data to be reported collected by different operating systems have different code formats. The code format includes the code form of the data to be reported collected by the operating system. For example, the code format may include the programming language used to present the data, the syntax of that programming language, and so on.

[0031] For example, the data to be reported collected through the Linux operating system may be written in the C programming language and have the format corresponding to the Linux operating system, and so on.

[0032] For example, the data to be reported collected through the iOS operating system may be written in the C++ programming language and have the format corresponding to the iOS operating system, and so on.

[0033] For example, the data to be reported collected through the Android operating system may be written in the Java programming language and have the format corresponding to the Android operating system, and so on.

[0034] In one embodiment, developers can obtain the data to be reported by setting a data collection method in the application and using the operating system to collect data in the application through the data collection method.

[0035] For example, developers can set up tracking points in their applications and use the operating system to collect data from the applications through these tracking points to obtain the data to be reported.

[0036] Applications include computer programs that perform one or more specific functions. They run in interactive mode, can interact with the users of the application, and have a visual display interface.

[0037] For example, applications can include software on various terminals. These include mobile phone applications (APPs), tablet applications, laptop applications, personal computer (PC) applications, and so on.

[0038] For example, applications can include browsers, video playback software, game software, and so on.

[0039] For example, applications can also include mini-programs. A mini-program is an application that can be used without downloading or installing it. To provide users with more diverse business services, developers can develop corresponding mini-programs for terminal applications (such as instant messaging applications, shopping applications, email applications, etc.). These mini-programs can be embedded as sub-applications into the terminal applications, and by running the sub-applications (i.e., the corresponding mini-programs) within the application, corresponding business services can be provided to users.

[0040] In one embodiment, an operating system typically contains at least one application. Therefore, the data to be reported can also refer to data collected by a specific application within an operating system.

[0041] For example, the data receiving layer receives two data points to be reported from the Android operating system. One of these data points was collected by application A within the Android operating system, while the other was collected by application B within the Android operating system.

[0042] For example, the data receiving layer receives two data points to be reported, one from the Android operating system and the other from the iOS operating system. One of these data points was collected by application A in the Android operating system, and the other was collected by application A in the iOS operating system.

[0043] In one embodiment, since different applications have different business attributes, the data to be reported collected by different applications have different characteristics in terms of data type and data distribution.

[0044] For example, when the application is a social networking application, the data collected and reported may mainly consist of browsing and input event data, and so on. Similarly, when the application is a game application, the data collected and reported may mainly consist of click and swipe event data, and so on.

[0045] Events can encompass all feedback from an object within an application; that is, any feedback from the application when an object is used can be collectively referred to as an event. Events can be categorized into several types. For example, events can include click, voice control, swipe, loading, and browsing events.

[0046] In one embodiment, since the data to be reported collected on different operating systems has different code formats, and the data to be reported collected on different applications has different characteristics, business identification information can be added to each piece of data to be reported. This allows the system to identify which operating system and application the data belongs to. The business identification information includes information that identifies the data to be reported.

[0047] In one embodiment, such as Figure 3 As shown, the data receiving layer may include two functional modules: an information addition module 1101 and a business reporting protocol module 1102.

[0048] The information adding module 1101 can receive the data to be reported collected by various operating systems and add various identification information and configuration information to the data to be reported, etc.

[0049] For example, the information adding module 1101 can add business identification information to the data to be reported, so that other functional layers in the reporting framework can know which application in which operating system the collected data to be reported belongs to.

[0050] For example, the information adding module 1101 can add reporting configuration information to the data to be reported. This reporting configuration information includes the information that the data to be reported must adhere to during the reporting process. For instance, the reporting configuration information may include how the data is reported, in what form it is reported, where it is reported, whether it is scheduled or quantitative reporting, whether a real-time reporting mode is used, and so on.

[0051] For example, the data receiving layer receives two pieces of data to be reported. One piece of data is collected from application A on an Android operating system, and the other piece of data is collected from application A on an iOS operating system. Then, the information adding module in the data receiving layer adds business identification information to each of the two pieces of data. This allows other functional layers in the data reporting framework to know, through the business identification information, that one piece of data to be reported is collected from application A on an Android operating system, and the other piece of data is collected from application A on an iOS operating system.

[0052] The business reporting protocol module 1102 includes a module capable of generating business reporting protocols. These protocols define the reporting rules for the data to be reported during the reporting process. For example, the protocol can define how the data is reported, in what format, and to where it is reported. It can also define whether the data is reported periodically or quantitatively, whether real-time reporting is used, and other information such as the data type and storage type of the data to be reported.

[0053] In one embodiment, after receiving multiple data to be reported from the data receiving layer, the information adding module 1101 in the data receiving layer can be used to add service identification information to each data to be reported, and the data to be reported with service identification information can be transmitted to other functional layers, so that other functional layers know which application in which operating system the data to be reported belongs to.

[0054] Furthermore, the data to be reported, along with service identification information and reporting configuration information, can be transmitted to the service reporting protocol module 1102 in the data receiving layer. This allows the service reporting protocol module to generate a service reporting protocol for each piece of data to be reported based on the service identification information, and then transmit this service reporting protocol to other functional layers. This enables other functional layers to obtain the service identification information and reporting configuration information of the data to be reported through the service reporting protocol, and so on.

[0055] 120. Use the format conversion layer in the data reporting framework to convert the code format of each data to be reported into a compatible code format to obtain the format compatible data of each data to be reported. The compatible code format supports multiple data to be reported to share the data transmission interface in the format conversion layer. In one embodiment, the format conversion layer in the data reporting framework includes a functional layer that can convert the code format of the data to be reported into a compatible code format to obtain format-compatible data of the data to be reported, and communicate with other functional layers.

[0056] Among them, the compatible code format includes the format that enables multiple data to be reported to share the functional interfaces in the format conversion layer.

[0057] For example, if the format conversion layer receives three pieces of data to be reported, one written in C++, another in Java, and the last in C, the format conversion layer can convert the code format of all three pieces of data into a compatible code format, allowing them to share the functional interfaces within the format conversion layer.

[0058] Format-compatible data includes data whose code format has been converted to a compatible code format. By converting each piece of data to be reported into format-compatible data, data with different code formats can share the same data reporting framework, eliminating the need to develop a separate data reporting method for each operating system, thus saving resources and costs associated with data reporting.

[0059] In one embodiment, the format-compatible data can be glue code. Glue code includes code that enables incompatible code to become compatible. For example, the format conversion layer receives three pieces of data to be reported: one written in C++, another in Java, and the last in C. In this case, the three pieces of data can be converted into glue code, making the data with different code formats compatible. Glue code can not only combine incompatible programs or software components but also connect code modules of any size, from small functions to large libraries. Furthermore, glue code is very effective in cross-framework development environments, allowing several components to be quickly integrated into a single language or framework. Therefore, glue code is commonly used for information transfer between computer languages ​​and as a means of cross-framework implementation.

[0060] In one embodiment, the format conversion layer may include multiple functional interfaces, each with its corresponding function. For example, such as Figure 4 As shown, the format conversion layer may include a registration initialization interface 1103, a data transmission interface 1104, a network reporting interface 1105, and an encoding / decoding interface 1106, etc.

[0061] The registration initialization interface 1103 is used to receive information sent from other functional layers and to initialize other interfaces based on that information.

[0062] For example, since the data reporting framework proposed in this application allows data to be reported from different applications on different operating systems to coexist, each piece of data to be reported has a business identification information and a corresponding business reporting protocol.

[0063] For example, the registration initialization interface 1103 can receive the service identification information and register the service identification information to other functional layers, so that other functional layers can know which application in which operating system the collected data to be reported belongs to through the service identification information.

[0064] For example, the registration initialization interface 1103 can register the service identification information to the reporting layer, so that the reporting layer can know which application in which operating system the collected data to be reported belongs to through the service identification information.

[0065] For example, the registration initialization interface 1103 can receive the business reporting protocol, parse the business reporting protocol, and transmit the parsed information to other functional interfaces.

[0066] In addition, the registration initialization interface 1103 can also initialize other interfaces in the format conversion layer according to the business identification information, so that other interfaces in the format conversion layer can process the data to be reported according to the business identification information.

[0067] For example, the registration initialization interface 1103 can initialize the data transmission interface 1104, the reporting network interface 1105, and the encoding / decoding interface 1106 in the format conversion layer according to the service identification information, so that the data transmission interface 1104, the reporting network interface 1105, and the encoding / decoding interface 1106 can process the data to be reported according to the service identification information.

[0068] Specifically, data transmission interface 1104 can transmit format-compatible data to other functional layers. For example, data transmission interface 1104 can transmit format-compatible data to the reporting layer, and so on.

[0069] Among them, the reporting network interface 1105 can obtain the reporting configuration information of the data to be reported, associate the format-compatible data with the preset reporting service according to the reporting configuration information, and transmit the format-compatible data with the preset reporting service to other functional layers.

[0070] The encoding / decoding interface 1106 can encode or decode the data to be reported.

[0071] In one embodiment, since the data to be reported may be collected from different operating systems, or from different applications within those operating systems, each piece of data to be reported may have a different data type. For example, some data to be reported may be of Boolean type, some may be of byte type, some may be of integer type, and so on. Therefore, an encoding / decoding interface can be used to encode the data to be reported, so that the lower layer of the format conversion layer does not need to understand the data type of the data to be reported.

[0072] In one embodiment, when using the format conversion layer in the data reporting framework to convert the code format of each piece of data to be reported into a compatible code format, the data to be reported can first be encoded to obtain encoded data to be reported, and then the code format of the encoded data to be reported can be converted into a compatible code format. Specifically, the step "using the format conversion layer in the data reporting framework to convert the code format of each piece of data to be reported into a compatible code format to obtain format-compatible data for each piece of data to be reported" can include: The format conversion layer receives the data to be reported and the corresponding business reporting protocol. Using a format conversion layer, the data to be reported is encoded according to the business reporting protocol to obtain the encoded data to be reported. The encoded data to be reported is converted into a compatible code format to obtain the format-compatible data for each data to be reported.

[0073] In one embodiment, before using the format conversion layer of the reporting framework to perform code format conversion processing on the data to be reported, the format conversion layer can first be used to receive the data to be reported and the business reporting protocol corresponding to the data to be reported.

[0074] For example, the format conversion layer can receive the data to be reported from the data receiving layer, as well as the corresponding business reporting protocol, from the data receiving layer. Another example is that the registration initialization interface in the format conversion layer can be used to receive the business reporting protocol from the data receiving layer.

[0075] In one embodiment, after the format conversion layer receives the service reporting protocol, it can encode the data to be reported according to the service reporting protocol to obtain encoded data to be reported. Specifically, during the encoding process, the format conversion layer can parse the service reporting protocol to obtain the service attributes corresponding to the data to be reported. Then, based on the service attributes, the encoding protocol of the data to be reported is obtained. Next, the data to be reported can be encoded according to this encoding protocol to obtain encoded data to be reported. Specifically, the step "using the format conversion layer to encode the data to be reported according to the service reporting protocol to obtain encoded data to be reported" can include: The business reporting protocol is parsed through the format conversion layer to obtain the data type corresponding to the data to be reported; The encoding protocol of the data to be reported is obtained through the format conversion layer based on the data type. The data encoding interface of the format conversion layer encodes the data to be reported according to the encoding protocol to obtain the encoded data to be reported.

[0076] The encoding protocol includes the encoding rules that must be followed when encoding the data to be reported. For example, when the data to be reported is of boolean type, the rules that must be followed when encoding the data to be reported into the target data type. Another example is when the data to be reported is of byte type, the rules that must be followed when encoding the data to be reported into the target data type.

[0077] The target data type can be any predefined data type, such as a string, etc.

[0078] In one embodiment, since each type of data to be reported may have a different data type, in this embodiment, the business reporting protocol of the data to be reported can be parsed first through a format conversion layer to obtain the data type corresponding to the data to be reported.

[0079] For example, the business reporting protocol can be parsed through the registration initialization interface of the format conversion layer to obtain the data type of the data to be reported.

[0080] In one embodiment, after obtaining the data type of the data to be reported, the encoding protocol of the data to be reported can be obtained based on the data type.

[0081] For example, a storage module can be pre-set in the format conversion layer, which stores the encoding protocol corresponding to each data type. Then, the corresponding encoding protocol can be obtained according to the data type of the data to be reported.

[0082] For example, if the target data type is predefined as string, then the format conversion layer can pre-store the encoding protocols corresponding to data types such as Boolean, byte, short integer, and character. For instance, Boolean corresponds to encoding protocol 1, byte to encoding protocol 2, short integer to encoding protocol 3, character to encoding protocol 4, and so on. Therefore, after obtaining the data type of the data to be reported, the corresponding encoding protocol can be retrieved from the storage module in the format conversion layer based on that storage type.

[0083] In one embodiment, after obtaining the encoding protocol of the data to be reported, the data to be reported can be encoded according to the encoding protocol through the data encoding interface of the format conversion layer to obtain the encoded data to be reported.

[0084] For example, when the data to be reported is character type and the target data type is string type, after obtaining the encoding protocol, the character data to be reported can be encoded into string type according to the encoding protocol through the data encoding interface, thereby obtaining the encoded data to be reported.

[0085] For example, when the data to be reported is boolean and the target data type is string, after obtaining the encoding protocol, the boolean data to be reported can be encoded into a string according to the encoding protocol through the data encoding interface, thereby obtaining the encoded data to be reported.

[0086] In one embodiment, after obtaining the encoded data to be reported, the code format of the encoded data to be reported can be converted into a compatible code format to obtain format-compatible data for each data to be reported. Specifically, when converting the code format of the encoded data to be reported into a compatible code format, a format conversion layer can be used to identify the encoded data to be reported, obtain its code format, and then perform conversion processing on that code format. Specifically, the step "converting the code format of the encoded data to be reported into a compatible code format to obtain format-compatible data for each data to be reported" includes: The format conversion layer is used to identify the code format of the encoded data to be reported, and the code format of the encoded data to be reported is obtained. The format conversion layer calls the format conversion file corresponding to the code format; According to the format conversion file, the code format of the data to be reported is converted to obtain format-compatible data. The format conversion file includes the logic that must be followed when converting the code format of the data to be reported into a compatible code format. This format conversion file can be a piece of code, a function, etc.

[0087] In one embodiment, since the data to be reported may be one of multiple programming languages, when converting the code format of the encoded data to be reported into a compatible code format, a format conversion layer can be used first to identify the code format of the encoded data to be reported, thereby obtaining the code format of the encoded data to be reported.

[0088] For example, the registration initialization interface in the format conversion layer can be used to identify the code format of the data to be reported, thereby obtaining the code format of the encoded data to be reported.

[0089] In one embodiment, after obtaining the code format of the data to be reported after encoding, the format conversion file corresponding to the code format can be called in the format conversion layer, thereby using the format conversion file to obtain format-compatible data of the data to be reported.

[0090] In this embodiment, Djinni can be used to pre-generate format conversion files corresponding to various code formats. Djinni is a tool for generating cross-language type declarations and interface bindings, enabling interoperability between multiple programming languages. Djinni is an open-source code library that can generate corresponding interfaces and glue code based on code formats, allowing data to be reported in different code formats to share the same interface.

[0091] For example, Djinni can pre-generate format conversion files for C++ and Java code formats to be reported, and store these files in the format conversion layer. When converting the format of the encoded data to be reported, the corresponding format conversion file can be called. Then, based on the format conversion file, the code format of the data to be reported is converted to obtain format-compatible data.

[0092] In one embodiment, when converting the code format of the data to be reported according to the format conversion file, the format conversion file can be parsed to obtain data attribute conversion logic, and then the data to be reported can be converted according to the data attribute conversion logic. Specifically, the step "converting the code format of the data to be reported according to the format conversion file to obtain format-compatible data of the data to be reported" may include: The format conversion file is parsed to obtain the data attribute conversion logic; Based on the data attribute conversion logic, the data to be reported is processed by attribute conversion to obtain data with a compatible format.

[0093] The data attribute conversion logic includes the rules that must be followed when converting the code format of various data components in the data to be reported into a compatible code format. For example, this data attribute conversion logic can be an interface function or a code block.

[0094] In one embodiment, the data to be reported may consist of multiple components. For example, the data to be reported may consist of data processing components, data control components, and data transmission components, etc.

[0095] The data operation component can include the operations contained in the data to be reported. For example, the operands included in the data to be reported. For example, when the code format of the data to be reported is Java programming language, the data operation component can be the operation statements in the code, and so on.

[0096] The data control component can include controls contained in the data to be reported. For example, the data to be reported may include sequential control structures, loop control structures, and branch control structures, etc. For instance, when the code format of the data to be reported is Java programming language, the data control component could be loop statements in the code, etc.

[0097] The data transmission components can include the input and output elements of the data to be reported. For example, when the code format of the data to be reported is Java programming language, the data transmission components can be various function statements in the code, and so on.

[0098] Therefore, the data attribute conversion logic may include data transmission component conversion logic, data control component conversion logic, and data operation component conversion logic. When performing attribute conversion processing on the data to be reported according to the data attribute conversion logic, the data to be reported can be converted according to the data transmission component conversion logic, data control component conversion logic, and data operation component conversion logic to obtain the format-compatible data. Specifically, the step "performing attribute conversion processing on the data to be reported according to the data attribute conversion logic to obtain format-compatible data of the data to be reported" may include: Based on the data transmission component conversion logic, the data to be reported is processed by transmission attribute conversion to obtain the first data to be reported. Based on the data control component conversion logic, the first data to be reported is processed by control attribute conversion to obtain the second data to be reported. Based on the data operation component conversion logic, the second data to be reported is processed by operation attribute conversion to obtain the format-compatible data.

[0099] In one embodiment, the relationship between the data processing component, data control component, and data transmission component in the data to be reported can be that the data processing component is within the data control component, and then the data control component is within the data transmission component. Therefore, attribute transformation processing can be performed on the data to be reported in a hierarchical manner from the outside in.

[0100] Specifically, the data transmission component conversion logic includes the logic required when converting the code format of the transmission components in the data to be reported into a compatible code format. The data control component conversion logic includes the logic required when converting the code format of the control components in the data to be reported into a compatible code format. The data computation component conversion logic includes the logic required when converting the code format of the computation components in the data to be reported into a compatible code format.

[0101] Therefore, when performing attribute conversion on the data to be reported, we can first convert the data transmission components of the data to be reported into glue codes according to the data transmission component conversion logic to obtain the first data to be reported. Then, according to the data control component conversion logic, we convert the data control components in the first data to be reported into glue codes to obtain the second data to be reported. Finally, according to the data operation component conversion logic, we convert the data operation components in the second data to be reported into glue codes to obtain format-compatible data.

[0102] For example, if the data operation components in the data to be reported are written in C++, the data operation components can first be converted into glue code according to the data transmission component conversion logic. Next, the data control components in the data to be reported can be converted into glue code. Finally, the data transmission components in the data to be reported can be converted into glue code, thus obtaining format-compatible data.

[0103] In one embodiment, the data to be reported can also be transformed in an inside-out hierarchical manner. For example, first, the data operation components of the data to be reported are transformed, then the data control components are transformed, and finally the data transmission components are transformed, thereby obtaining format-compatible data.

[0104] This hierarchical transformation allows for robust and layered conversion of the code format of reported data, improving the robustness and reliability of the conversion process.

[0105] For example, if the data control components in the data to be reported are written in the C++ programming language, then the data control components written in the C++ programming language can be converted into glue code according to the data control component conversion logic.

[0106] By using data transmission component conversion logic, data control component conversion logic, and data operation component conversion logic, the code formats of data operation components, data control components, and data transmission components in the data to be reported can all be converted into compatible code formats. This allows data to be reported in different code formats to be compatible and reported within the same data reporting framework, reducing the resources and costs required for data reporting.

[0107] 130. Use the data transmission interface to transmit each format-compatible data to the reporting layer in the data reporting framework.

[0108] In one embodiment, after obtaining the format-compatible data for each data to be reported, the data transmission interface in the format conversion layer can be used to transmit each format-compatible data to the reporting layer, thereby reporting the format-compatible data through the reporting layer.

[0109] In one embodiment, when transmitting format-compatible data to the reporting layer, the reporting configuration information of the data to be reported can be obtained through the format conversion layer. Based on the reporting configuration information, the format-compatible data is associated with a preset reporting service, and the format-compatible data associated with the preset reporting service is transmitted to the reporting layer. Specifically, the step "transmitting each format-compatible data to the reporting layer in the data reporting framework using the data transmission interface" may include: The reporting configuration information of the data to be reported is obtained through the format conversion layer; Based on the reported configuration information, the format-compatible data is associated with the preset reporting service through the format conversion layer; Through the data transmission interface, format-compatible data associated with the preset reporting service is transmitted to the reporting layer of the data reporting framework.

[0110] For example, the format conversion layer can receive the reporting configuration information of the data to be reported transmitted from other functional layers, thereby obtaining the reporting configuration information of the data to be reported.

[0111] In one example, the reporting configuration information can include how the data to be reported is reported, in what form it is reported, where it is reported, whether it is scheduled or quantitative reporting, whether a real-time reporting mode is used, and so on. Different configuration information can associate format-compatible data with preset reporting services, allowing the reporting layer to report format-compatible data according to the preset reporting services.

[0112] The preset reporting service includes pre-configured services that allow format-compatible data to be reported according to the reporting configuration information. For example, the preset reporting service may include preset timed reporting service, preset quantitative reporting service, and preset real-time reporting service, etc.

[0113] Therefore, the reported configuration information can be associated with the preset reporting service through the format conversion layer to make the format-compatible data compatible.

[0114] For example, when the reported configuration information includes data reporting methods such as real-time reporting and quantitative reporting, the format-compatible data and the preset quantitative reporting service and the preset real-time reporting service can be associated.

[0115] For example, when the reported configuration information includes data reported via scheduled reporting, the format-compatible data can be associated with the preset scheduled reporting service.

[0116] 140. Report each format-compatible data through the data reporting logic of the reporting layer.

[0117] The reporting layer includes a functional layer that can report data compatible with each format.

[0118] In one embodiment, the reporting layer can solve the problem of inconsistent reporting architectures between different operating systems. For example, the reporting architectures of Android and iOS operating systems are not unified, but the reporting layer can integrate the reporting architectures of Android and iOS operating systems into the reporting layer, so that data to be reported from different operating systems can be reported through the reporting layer.

[0119] In one embodiment, such as Figure 5 As shown, the reporting layer may include a reporting configuration file module 1401, a reporting timer 1402, a reporting service manager 1403, a reporting queue 1404, and a reporting module 1405.

[0120] The reporting configuration file module 1401 can be used to configure whether the data to be reported is reported quantitatively or periodically. It can also be used by the data receiving layer to pass the reporting configuration information down through the format conversion layer and store the reporting configuration information.

[0121] Among them, the reporting queue 1404 can be used to receive the storage type of the data to be reported.

[0122] The reporting service manager 1403 can be used to implement data scheduling and reporting. It is equivalent to the control center of the reporting service. The reporting service manager 1403 automatically completes the data storage and reporting capabilities.

[0123] Among them, the reporting timer 1402 can be a tool file used to associate reporting time. For example, when the reporting configuration information of the data to be reported is scheduled reporting, the data to be reported can be associated with the reporting time, so that the data to be reported can be reported on a scheduled basis.

[0124] In one embodiment, when the operating system collects data to be reported using a point-tracking method, it encapsulates the data into an object and stores the object in a memory storage device. However, when the application starts, various exceptions may cause the object stored in the memory storage device to be lost.

[0125] Therefore, this application embodiment sets up a reporting module in the reporting layer, which can store the data collected by the application in a file instead of in memory.

[0126] This file can be implemented using Mmap. Mmap is a memory-mapped file method that maps a file or other object into the address space of a process, establishing a one-to-one mapping between the file's disk address and a segment of virtual addresses in the process's virtual address space. After establishing this mapping, the process can read and write to this memory segment using pointers, and the system will automatically write back dirty pages to the corresponding file on disk, thus completing file operations without needing to call system call functions such as read and write.

[0127] In one embodiment, after the reporting layer receives format-compatible data, it can identify the storage type of the format-compatible data through the reporting layer, then determine the target storage file for the format-compatible data based on the storage type, and store the format-compatible data in the target storage file. Specifically, the data reporting method proposed in this application embodiment may further include: The storage type of format-compatible data is identified by the reporting layer; Determine the target storage space for format-compatible data based on the storage type; Store format-compatible data to the target storage space.

[0128] For example, the storage type of format-compatible data can be determined by identifying the reporting configuration information of format-compatible data through the reporting management server.

[0129] The storage type for format-compatible data can include whether it is stored in an in-memory utility or in a storage file. For example, when the format-compatible data is important, such as data involving personal information of an object, it can be stored in a storage file to avoid loss. Conversely, when storing less important data, it can be stored in an in-memory utility.

[0130] In one embodiment, after determining the storage type of the format-compatible data, the target storage space for the format-compatible data can be determined based on the storage type. For example, a mapping pointer between the storage type and the target storage space can be established in advance. Then, after determining the storage type of the format-compatible data, a mapping pointer can be added to the format-compatible data, and the format-compatible data can be stored in the target storage space determined by the mapping pointer.

[0131] In one embodiment, the reporting layer may further include data reporting logic. This data reporting logic includes rules to be followed when reporting data collected from various operating systems. This data reporting logic can be developed using various programming languages. For example, it can be developed using the C++ programming language, allowing various operating systems to share this set of data reporting logic developed in C++.

[0132] This data reporting logic can include multiple data reporting sub-logic. Each data reporting sub-logic can be a code block or function within the overall data reporting logic, and each sub-logic has a corresponding reporting function.

[0133] For example, the data reporting logic can include three data reporting logics: data reporting logic 1 can perform timed reporting, data reporting logic 2 can perform quantitative reporting, and data reporting logic 3 can perform real-time reporting.

[0134] Therefore, in one embodiment, the reporting layer can receive format-compatible data associated with a preset reporting service transmitted by the format conversion layer, and call the corresponding target data reporting sub-logic in the data reporting logic according to the preset reporting service, and execute the target reporting sub-logic, thereby realizing the reporting of format-compatible data. Specifically, the step "reporting each format-compatible data through the data reporting logic of the reporting layer" may include: Receive format-compatible data associated with the preset reporting service through the reporting layer; The target data reporting sub-logic is determined in the data reporting logic based on the preset reporting service. Execute the target data reporting sub-logic to report format-compatible data.

[0135] Specifically, when determining the target data reporting sub-logic within the data reporting logic based on a preset reporting service, the target data reporting sub-logic can be determined based on information such as the identifier of the preset reporting service. For example, the target data reporting sub-logic can be determined based on information such as the name of the preset reporting service, and so on.

[0136] For example, the data reporting logic includes three sub-logic logics: data reporting logic 1 can perform timed reporting, corresponding to a timed reporting service; data reporting logic 2 can perform quantitative reporting, corresponding to a quantitative reporting service; and data reporting logic 3 can perform real-time reporting, corresponding to a real-time reporting service. Therefore, the target data reporting sub-logic can be determined based on the name of the preset reporting service.

[0137] Once the target data reporting sub-logic is determined, it can be executed to report data in a format compatible manner.

[0138] In one embodiment, the data reporting framework proposed in this application may further include a verification layer. This verification layer performs verification processing on each data to be reported before the format conversion layer converts the code format of each type of data to be reported into a compatible code format to obtain format-compatible data for each type of data to be reported. Specifically, the data reporting method proposed in this application may further include: The verification layer in the data reporting framework is used to perform verification processing on each piece of data to be reported. When the data to be reported passes the verification, the data to be reported is transmitted to the format conversion layer for format conversion. When the data to be reported fails the verification, an error protocol is generated based on the data to be reported, and the error protocol is reported.

[0139] The verification layer includes a functional layer that can perform verification processing on each type of data to be reported.

[0140] In one embodiment, the verification layer may include a reporting specification interface, wherein the reporting specification interface has various pre-set verification specifications, and the data to be reported can be verified through the pre-set verification specifications.

[0141] For example, the reporting specification interface can have a preset field specification protocol, which includes the field specifications that the data to be reported should conform to. Since the data to be reported may be collected from different applications, corresponding field specification protocols can be set for the data to be reported from each application.

[0142] For example, the default field specification protocol for application A is: the field length of the data to be reported cannot exceed 20 characters, and negative numbers are not allowed. Another example is the default field specification protocol for application B: the field length cannot exceed 32 characters, and so on.

[0143] Therefore, when using the validation layer to validate each piece of data to be reported, the data fields of the data to be reported can be matched with a preset field specification protocol, and the data to be reported can be validated based on the matching result. Specifically, the step "using the validation layer in the data reporting framework to validate each piece of data to be reported" can include: The verification layer is used to identify the fields of the data to be reported, thereby obtaining the data fields of the data to be reported. The data fields are matched with the preset field specification protocol in the verification layer to obtain the matching result; The data to be reported is verified based on the matching results.

[0144] In one embodiment, when the verification layer performs verification processing on each piece of data to be reported, the verification layer can be used to identify the fields of the data to be reported, thereby obtaining the data fields of the data to be reported. For example, the data to be reported can be traversed to obtain the data fields of the data to be reported.

[0145] Then, the data fields can be matched with the preset field specification protocol to obtain the matching result. For example, if the preset field specification protocol is: the field length of the data to be reported cannot exceed 20 characters, and negative numbers are not allowed, then the matching result between the data fields and the preset field specification protocol can be obtained by determining whether the field length of the data to be reported exceeds 20 characters and whether negative numbers are allowed.

[0146] Next, the data to be reported can be validated based on the matching results. For example, if the data fields of the data to be reported match the preset field specification protocol, it means that the data to be reported has passed the validation. If the data fields of the data to be reported do not match the preset field specification, it means that the data to be reported has failed the validation.

[0147] In one embodiment, the verification layer further includes a basic reporting protocol. When the data to be reported passes verification, the basic reporting protocol can be obtained. This basic reporting protocol includes basic reporting attributes. Then, basic reporting attributes can be added to the data to be reported according to the basic reporting protocol, and the data to be reported containing the basic reporting data can be transmitted to the format conversion layer for format conversion. Specifically, the step "when the data to be reported passes verification, the data to be reported can be transmitted to the format conversion layer for format conversion" can include: When the data to be reported passes the verification, the basic reporting protocol is obtained, and the basic reporting protocol includes basic reporting attributes; Add basic reporting attributes to the data to be reported according to the basic reporting protocol; The data to be reported, which contains basic reporting data, is transmitted to the format conversion layer for format conversion.

[0148] In one embodiment, when the data to be reported passes verification, a basic reporting protocol is obtained in the verification layer. This basic reporting protocol includes basic reporting attributes. These basic reporting attributes include properties related to the reporting of the data. For example, whether the data to be reported is reported in real time, quantitatively, or periodically, etc.

[0149] Then, basic reporting attributes can be added to the reported data according to the basic reporting protocol. Finally, the data to be reported, containing the basic reporting data, is transmitted to the format conversion layer for format conversion.

[0150] In this embodiment, when the data to be reported fails the verification, an error protocol can be generated based on the data to be reported, and the error protocol can be reported. For example, when the data to be reported fails the verification, the data to be reported can be encapsulated into an error file, error identification information can be added to the error file, and then the error file with the error identification information can be reported.

[0151] This application proposes a data reporting method, which includes: receiving multiple data to be reported transmitted by a data receiving layer in a data reporting framework, wherein the multiple data to be reported are data collected by multiple operating systems respectively, and each data to be reported corresponds to a code format; using a format conversion layer in the data reporting framework to convert the code format of each data to be reported into a compatible code format, obtaining format-compatible data for each data to be reported, wherein the compatible code format supports multiple data to be reported sharing the data transmission interface in the format conversion layer; using the data transmission interface to transmit each format-compatible data to the reporting layer in the data reporting framework; and reporting each format-compatible data through the reporting layer. This application proposes a data reporting framework that allows data to be reported by various operating systems to be reported using this data reporting framework, eliminating the need to develop a separate data reporting framework for each operating system. This reduces the resources and costs required for reporting data collected by multiple operating systems, as it eliminates the need for significant manpower and resources to develop and maintain multiple data reporting frameworks.

[0152] Furthermore, the data reporting framework proposed in this application embodiment can include multiple functional layers such as a data receiving layer, a format conversion layer, a reporting layer, and a verification layer. The data receiving layer receives data to be reported from each operating system and adds business identification information and a business reporting protocol to the data. This allows other functional layers to directly obtain the operating system and application from which the data was collected, as well as the reporting configuration information, thereby improving the efficiency of data reporting. The verification layer verifies the data to be reported, improving the reliability and stability of data reporting. The format conversion layer converts the code of the data to be reported from various operating systems into a compatible code format, allowing multiple data sets to share the data constant interface in the format conversion layer and transmit it to the reporting layer via the data transmission interface, reducing the resources and costs required to report data collected from multiple operating systems.

[0153] Based on the method described in the above embodiments, the following examples will provide further detailed explanations.

[0154] This application will use the integration of a data reporting method into a computer device as an example to illustrate the method of this application.

[0155] In one embodiment, such as Figure 6 As shown, a data reporting method has the following specific process: 210. In the data receiving layer of the computer equipment receiving and reporting framework, multiple data to be reported are transmitted. These multiple data to be reported are data collected by multiple operating systems. Each data to be reported corresponds to a code format.

[0156] The data reporting framework can be as follows: Figure 7 As shown in Figure 20, the data reporting framework 20 may include a data receiving layer 30, a verification layer 40, a format conversion layer 50, and a reporting layer 60.

[0157] In one embodiment, the data receiving layer 30 may include a reporting object, an information adding module, and a service reporting protocol module.

[0158] The reporting object is used to receive data to be reported from various operating systems. For example, this reporting object can receive data to be reported from Android, iOS, Windows, and Linux operating systems.

[0159] In one embodiment, the collected data to be reported can also be data collected by the operating system on various different applications.

[0160] For example, multiple data points to be reported collected by the Android operating system can be data collected from multiple different applications. For instance, two data points to be reported might be collected on the Android operating system, one of which was collected in application A, and the other in application B.

[0161] For example, multiple data points to be reported collected by the iOS operating system can also be data collected from various different applications.

[0162] In one embodiment, the information adding module in the data receiving layer 30 can be used to add business identification information to each piece of data to be reported, so that other functional layers know which application in which operating system the data to be reported belongs to.

[0163] In one embodiment, the information adding module in the data receiving layer 30 can also be used to add reporting configurations for each piece of data to be reported.

[0164] In one embodiment, the data to be reported, along with service identification information and reporting configuration information, can also be transmitted to the service reporting protocol module in the data receiving layer 30. This allows the service reporting protocol module to generate a service reporting protocol for each piece of data to be reported based on the service identification information, and then transmit this service reporting protocol to other functional layers. This enables other functional layers to obtain the service identification information and reporting configuration information of the data to be reported through the service reporting protocol, and so on.

[0165] 220. The computer equipment uses the verification layer of the data reporting framework to perform verification processing on each piece of data to be reported, and obtains the target data to be reported.

[0166] The verification layer 40 can include two modules. The first module is an abstract reporting utility class, which integrates the reporting utility class, so that the data receiving layer 30 can be used even without any customization after connecting to the verification layer.

[0167] The abstract reporting utility class includes a reporting specification interface, a configurable parameter table, and an EventCenter module. The reporting specification interface performs standardization validation on the data to be reported. The configurable parameter table integrates several general reporting configuration items, such as whether to report periodically or quantitatively, and whether to report in real-time. Furthermore, to address the issue of the data reporting framework being able to report data from different applications, an EventCenter module is integrated into the validation layer 40 for cross-process event forwarding.

[0168] 230. The computer equipment uses the format conversion layer in the data reporting framework to convert the code format of each target data to be reported into a compatible code format, thereby obtaining format-compatible data for each target data to be reported.

[0169] The format conversion layer 50 in the data reporting framework 20 may include a registration initialization interface, a data transmission interface, a reporting network interface, and an encoding / decoding interface.

[0170] The registration initialization interface is used to receive information sent from other functional layers and to initialize other interfaces based on that information.

[0171] For example, since the data reporting framework proposed in this application allows data to be reported from different applications on different operating systems to coexist, each piece of data to be reported has a business identification information and a corresponding business reporting protocol.

[0172] For example, the registration initialization interface can receive the service identification information and register it with other functional layers, so that other functional layers can know which application in which operating system the collected data to be reported belongs to through the service identification information.

[0173] For example, the registration initialization interface can register the service identification information to the reporting layer, so that the reporting layer can know which application in which operating system the collected data to be reported belongs to through the service identification information.

[0174] For example, the registration initialization interface can receive the business reporting protocol, parse the business reporting protocol, and transmit the parsed information to other functional interfaces.

[0175] In addition, the registration initialization interface can also initialize other interfaces in the format conversion layer based on the business identification information, so that other interfaces in the format conversion layer can process the data to be reported based on the business identification information.

[0176] For example, the registration initialization interface can initialize the data transmission interface, reporting network interface, and encoding / decoding interface in the format conversion layer according to the service identification information, so that the data transmission interface, reporting network interface, and encoding / decoding interface can process the data to be reported according to the service identification information.

[0177] The data transmission interface can transmit format-compatible data to other functional layers. For example, it can transmit format-compatible data to the reporting layer, and so on.

[0178] The reporting network interface can obtain the reporting configuration information of the data to be reported, associate the format-compatible data with the preset reporting service according to the reporting configuration information, and transmit the format-compatible data with the preset reporting service to other functional layers.

[0179] The encoding / decoding interface can encode or decode the data to be reported.

[0180] 240. Computer equipment uses data transmission interfaces to transmit each format-compatible data to the reporting layer in the data reporting framework.

[0181] 250. Computer equipment reports each format-compatible data through the data reporting logic of the reporting layer.

[0182] The reporting layer 60 in the data reporting framework 20 may include a reporting configuration file module, a reporting timer, a reporting service manager, a reporting queue, and a reporting module.

[0183] The reporting configuration file module can be used to configure whether the data to be reported is reported quantitatively or periodically. It can also be used by the data receiving layer to pass the reporting configuration information down through the format conversion layer and store the reporting configuration information.

[0184] The reporting queue can be used to receive the storage type of data to be reported.

[0185] The reporting service manager can be used to implement data scheduling and reporting. It is equivalent to the control center of the reporting service and automatically completes the data storage and reporting capabilities through the reporting configuration file module.

[0186] The reporting timer can be a tool file used to associate reporting times. For example, when the reporting configuration information for the data to be reported is scheduled reporting, the data to be reported can be associated with the reporting time, thus enabling the data to be reported to be reported on a scheduled basis.

[0187] In one embodiment, when the operating system collects data to be reported using a point-tracking method, it encapsulates the data into an object and stores the object in a memory storage device. However, when the application starts, various exceptions may cause the object stored in the memory storage device to be lost.

[0188] Therefore, this application embodiment sets up a reporting module in the reporting layer, which can store the data collected by the application in a file instead of in memory.

[0189] This file can be implemented using Mmap. Mmap is a memory-mapped file method that maps a file or other object into the address space of a process, establishing a one-to-one mapping between the file's disk address and a segment of virtual addresses in the process's virtual address space. After establishing this mapping, the process can read and write to this memory segment using pointers, and the system will automatically write back dirty pages to the corresponding file on disk, thus completing the file operation without having to call system call functions such as read and write.

[0190] In this embodiment, the computer device can receive multiple data to be reported transmitted by the data receiving layer in the data reporting framework. These multiple data to be reported are data collected by multiple operating systems, and each data to be reported corresponds to a code format. The computer device uses the format conversion layer in the data reporting framework to convert the code format of each data to be reported into a compatible code format, obtaining format-compatible data for each data to be reported. The compatible code format supports multiple data to be reported sharing the data transmission interface in the format conversion layer. The computer device uses the data transmission interface to transmit each format-compatible data to the reporting layer in the data reporting framework. The computer device reports each format-compatible data through the reporting layer, reducing the resources and costs required for data reporting.

[0191] To better implement the data reporting method provided in the embodiments of this application, a data reporting device is also provided in one embodiment, which can be integrated into a computer device. The meanings of the terms used are the same as in the data reporting method described above, and specific implementation details can be found in the description of the method embodiments.

[0192] In one embodiment, a data reporting device is provided, which can be specifically integrated into a computer device, such as... Figure 8 As shown, the data reporting device includes: a receiving unit 310, a conversion unit 320, a transmission unit 330, and a reporting unit 340, as detailed below: The receiving unit 310 is used to receive multiple data to be reported transmitted by the data receiving layer in the data reporting framework. The multiple data to be reported are data collected by multiple operating systems respectively. Each data to be reported corresponds to a code format. The conversion unit 320 is used to convert the code format of each data to be reported into a compatible code format using the format conversion layer in the data reporting framework, so as to obtain the format compatible data of each data to be reported, wherein the compatible code format supports the multiple data to be reported to share the data transmission interface in the format conversion layer; Transmission unit 330 is used to transmit each format-compatible data to the reporting layer in the data reporting framework using the data transmission interface; The reporting unit 340 is used to report each format-compatible data through the data reporting logic of the reporting layer.

[0193] In one embodiment, the conversion unit includes: A receiving subunit is configured to receive the data to be reported and the service reporting protocol corresponding to the data to be reported at the format conversion layer. The encoding processing subunit is used to encode the data to be reported according to the business reporting protocol using the format conversion layer to obtain the encoded data to be reported. The code format conversion subunit is used to convert the code format of the encoded data to be reported into a compatible code format, so as to obtain the format compatible data of each data to be reported.

[0194] In one embodiment, the encoding processing subunit includes: The parsing module is used to parse the business reporting protocol through the format conversion layer to obtain the data type corresponding to the data to be reported; The acquisition module is used to acquire the encoding protocol of the data to be reported based on the data type through the format conversion layer; The encoding module is used to encode the data to be reported according to the encoding protocol through the data encoding interface of the format conversion layer to obtain the encoded data to be reported.

[0195] In one embodiment, the code format conversion subunit includes: The identification module is used to identify the code format of the encoded data to be reported using the format conversion layer, and obtain the code format of the encoded data to be reported. The calling module is used to call the format conversion file corresponding to the code format in the format conversion layer; A conversion processing module is used to convert the code format of the data to be reported according to the format conversion file, thereby obtaining format-compatible data of the data to be reported. In one embodiment, the conversion processing module includes: The parsing submodule is used to parse the format conversion file to obtain the data attribute conversion logic; The conversion processing submodule is used to perform attribute conversion processing on the data to be reported according to the data attribute conversion logic, so as to obtain format-compatible data of the data to be reported.

[0196] In one embodiment, the transmission unit includes: The acquisition subunit is used to obtain the reporting configuration information of the data to be reported through the format conversion layer; The association subunit is used to associate the format-compatible data with the preset reporting service through the format conversion layer according to the reporting configuration information; The data transmission subunit is used to transmit format-compatible data associated with the preset reporting service to the reporting layer of the data reporting framework through the data transmission interface.

[0197] In one embodiment, the reporting unit includes: A receiving subunit is used to receive format-compatible data associated with the preset reporting service through the reporting layer; A sub-unit is defined to determine the target data reporting sub-logic in the data reporting logic according to the preset reporting service. An execution subunit is used to execute the target data reporting sub-logic in order to report the format-compatible data.

[0198] In practice, each of the above units can be implemented as an independent entity or can be arbitrarily combined to be implemented as the same or several entities. For the specific implementation of each of the above units, please refer to the previous method embodiments, which will not be repeated here.

[0199] The data reporting device described above can reduce the resources and costs required for data reporting.

[0200] This application also provides a computer device, which may include a terminal or a server. For example, the computer device can act as a data reporting terminal, such as a mobile phone, tablet computer, etc.; or it can act as a server, such as a data reporting server. Figure 9 As shown, it illustrates the structural diagram of the terminal involved in the embodiments of this application, specifically: The computer device may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will understand that... Figure 9 The computer device structure shown does not constitute a limitation on the computer device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein: The processor 401 is the control center of the computer device. It connects various parts of the computer device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 402, and by calling data stored in the memory 402, it performs various functions of the computer device and processes data, thereby performing overall detection of the computer device. Optionally, the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user page, and application programs, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 401.

[0201] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.

[0202] The computer device also includes a power supply 403 that supplies power to the various components. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 403 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0203] The computer device may also include an input unit 404, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

[0204] Although not shown, the computer device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 401 in the computer device loads the executable files corresponding to the processes of one or more applications into the memory 402 according to the following instructions, and the processor 401 runs the applications stored in the memory 402 to realize various functions, as follows: The data receiving layer in the data reporting framework receives multiple data to be reported, which are data collected by multiple operating systems respectively. Each data to be reported corresponds to a code format. The code format of each data to be reported is converted into a compatible code format using the format conversion layer in the data reporting framework, thereby obtaining format-compatible data for each data to be reported. The compatible code format supports the sharing of the data transmission interface in the format conversion layer among the multiple data to be reported. The data transmission interface is used to transmit each format-compatible data to the reporting layer in the data reporting framework; The data reporting logic of the reporting layer reports each format-compatible data.

[0205] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0206] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various optional implementations of the above embodiments.

[0207] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by a computer program, or by a computer program controlling related hardware. The computer program can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0208] Therefore, embodiments of this application also provide a storage medium storing a computer program that can be loaded by a processor to execute the steps in any of the data reporting methods provided in embodiments of this application. For example, the computer program can execute the following steps: The data receiving layer in the data reporting framework receives multiple data to be reported, which are data collected by multiple operating systems respectively. Each data to be reported corresponds to a code format. The code format of each data to be reported is converted into a compatible code format using the format conversion layer in the data reporting framework, thereby obtaining format-compatible data for each data to be reported. The compatible code format supports the sharing of the data transmission interface in the format conversion layer among the multiple data to be reported. The data transmission interface is used to transmit each format-compatible data to the reporting layer in the data reporting framework; The data reporting logic of the reporting layer reports each format-compatible data.

[0209] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0210] Since the computer program stored in the storage medium can execute the steps in any of the data reporting methods provided in the embodiments of this application, the beneficial effects that any of the data reporting methods provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.

[0211] The foregoing has provided a detailed description of a data reporting method, apparatus, computer device, and storage medium provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A data reporting method, characterized in that, include: The data receiving layer in the data reporting framework receives multiple data to be reported. These multiple data to be reported are data collected by applications of multiple operating systems through the embedded points set in their respective applications. Each data to be reported corresponds to a code format. The code format of each data to be reported is converted into a compatible code format using the format conversion layer in the data reporting framework, thereby obtaining format-compatible data for each data to be reported. The compatible code format supports the sharing of the data transmission interface in the format conversion layer among the multiple data to be reported. The data transmission interface is used to transmit each format-compatible data to the reporting layer in the data reporting framework; The data reporting logic of the reporting layer reports each format-compatible data.

2. The data reporting method as described in claim 1, characterized in that, The process of using the format conversion layer in the data reporting framework to convert the code format of each piece of data to be reported into a compatible code format to obtain format-compatible data for each piece of data to be reported includes: The format conversion layer receives the data to be reported and the corresponding service reporting protocol for the data to be reported. Using the format conversion layer, the data to be reported is encoded according to the business reporting protocol to obtain the encoded data to be reported. The encoded data to be reported is converted into a compatible code format to obtain the format-compatible data for each data to be reported.

3. The data reporting method as described in claim 2, characterized in that, The process of using the format conversion layer to encode the data to be reported according to the business reporting protocol to obtain encoded data to be reported includes: The business reporting protocol is parsed through the format conversion layer to obtain the data type corresponding to the data to be reported; The encoding protocol of the data to be reported is obtained through the format conversion layer based on the data type. The data encoding interface of the format conversion layer encodes the data to be reported according to the encoding protocol to obtain the encoded data to be reported.

4. The data reporting method as described in claim 2, characterized in that, The step of converting the encoded data to be reported into a compatible code format to obtain format-compatible data for each piece of data to be reported includes: The format conversion layer is used to identify the code format of the encoded data to be reported, thereby obtaining the code format of the encoded data to be reported. The format conversion layer calls the format conversion file corresponding to the code format. Based on the format conversion file, the code format of the data to be reported is converted to obtain format-compatible data of the data to be reported.

5. The data reporting method as described in claim 4, characterized in that, The step of converting the code format of the data to be reported according to the format conversion file to obtain format-compatible data of the data to be reported includes: The format conversion file is parsed to obtain the data attribute conversion logic; According to the data attribute conversion logic, the data to be reported is processed by attribute conversion to obtain format-compatible data.

6. The data reporting method as described in claim 5, characterized in that, The data attribute conversion logic includes data transmission component conversion logic, data control component conversion logic, and data operation component conversion logic; The step of performing attribute conversion processing on the data to be reported according to the data attribute conversion logic to obtain format-compatible data of the data to be reported includes: According to the data transmission component conversion logic, the data to be reported is subjected to transmission attribute conversion processing to obtain the first data to be reported; According to the data control component conversion logic, the first data to be reported is processed by control attribute conversion to obtain the second data to be reported. According to the data operation component conversion logic, the second data to be reported is subjected to operation attribute conversion processing to obtain the format-compatible data.

7. The data reporting method as described in claim 2, characterized in that, The step of using the data transmission interface to transmit each format-compatible data to the reporting layer in the data reporting framework includes: The reporting configuration information of the data to be reported is obtained through the format conversion layer; Based on the reported configuration information, the format-compatible data is associated with the preset reporting service through the format conversion layer; Through the data transmission interface, format-compatible data associated with the preset reporting service is transmitted to the reporting layer of the data reporting framework.

8. The data reporting method as described in claim 7, characterized in that, The process of reporting each format-compatible data through the data reporting logic of the reporting layer includes: The reporting layer receives format-compatible data associated with the preset reporting service. The target data reporting sub-logic is determined in the data reporting logic according to the preset reporting service; The target data reporting sub-logic is executed to report the format-compatible data.

9. The data reporting method as described in claim 8, characterized in that, The method further includes: The storage type of the format-compatible data is identified through the reporting layer; Determine the target storage space for the format-compatible data based on the storage type; Store the format-compatible data in the target storage space.

10. The data reporting method as described in claim 1, characterized in that, Before converting the code format of each piece of data to be reported into a compatible code format using the format conversion layer in the data reporting framework to obtain format-compatible data for each type of data to be reported, the process includes: The verification layer in the data reporting framework is used to verify each piece of data to be reported. When the data to be reported passes the verification, the data to be reported is transmitted to the format conversion layer for format conversion. When the data to be reported fails the verification, an error protocol is generated based on the data to be reported, and the error protocol is reported.

11. The data reporting method as described in claim 10, characterized in that, The step of using the verification layer in the data reporting framework to verify each piece of data to be reported includes: The verification layer is used to identify the fields of the data to be reported, thereby obtaining the data fields of the data to be reported. The data fields are matched with the preset field specification protocol in the verification layer to obtain the matching result; The data to be reported is verified based on the matching results.

12. The data reporting method as described in claim 11, characterized in that, When the data to be reported passes the verification, the data to be reported is transmitted to the format conversion layer for format conversion, including: When the data to be reported passes the verification, the basic reporting protocol is obtained, and the basic reporting protocol includes basic reporting attributes; Add basic reporting attributes to the data to be reported according to the basic reporting protocol; The data to be reported, which contains basic reporting data, is transmitted to the format conversion layer for format conversion.

13. A data reporting device, characterized in that, include: The receiving unit is used to receive multiple data to be reported transmitted by the data receiving layer in the data reporting framework. The multiple data to be reported are data collected by multiple operating systems through the application of the embedded points set in the application. Each data to be reported corresponds to a code format. The conversion unit is used to convert the code format of each data to be reported into a compatible code format using the format conversion layer in the data reporting framework, so as to obtain the format compatible data of each data to be reported, wherein the compatible code format supports the multiple data to be reported to share the data transmission interface in the format conversion layer; A transmission unit is used to transmit each format-compatible data to the reporting layer in the data reporting framework using the data transmission interface. The reporting unit is used to report each format-compatible data through the data reporting logic of the reporting layer.

14. The data reporting device as described in claim 13, characterized in that, The conversion unit includes: A receiving subunit is configured to receive the data to be reported and the service reporting protocol corresponding to the data to be reported at the format conversion layer. The encoding processing subunit is used to encode the data to be reported according to the business reporting protocol using the format conversion layer to obtain the encoded data to be reported. The code format conversion subunit is used to convert the code format of the encoded data to be reported into a compatible code format, so as to obtain the format compatible data of each data to be reported.

15. The data reporting device as described in claim 14, characterized in that, The encoding processing subunit includes: The parsing module is used to parse the business reporting protocol through the format conversion layer to obtain the data type corresponding to the data to be reported; The acquisition module is used to acquire the encoding protocol of the data to be reported based on the data type through the format conversion layer; The encoding module is used to encode the data to be reported according to the encoding protocol through the data encoding interface of the format conversion layer to obtain the encoded data to be reported.

16. The data reporting device as described in claim 14, characterized in that, The code format conversion subunit includes: The identification module is used to identify the code format of the encoded data to be reported using the format conversion layer, and obtain the code format of the encoded data to be reported. The calling module is used to call the format conversion file corresponding to the code format in the format conversion layer; The conversion processing module is used to convert the code format of the data to be reported according to the format conversion file, so as to obtain format-compatible data of the data to be reported.

17. The data reporting device as described in claim 16, characterized in that, The conversion processing module includes: The parsing submodule is used to parse the format conversion file to obtain the data attribute conversion logic; The conversion processing submodule is used to perform attribute conversion processing on the data to be reported according to the data attribute conversion logic, so as to obtain format-compatible data of the data to be reported.

18. The data reporting device as described in claim 14, characterized in that, The transmission unit includes: The acquisition subunit is used to obtain the reporting configuration information of the data to be reported through the format conversion layer; The association subunit is used to associate the format-compatible data with the preset reporting service through the format conversion layer according to the reporting configuration information; The data transmission subunit is used to transmit format-compatible data associated with the preset reporting service to the reporting layer of the data reporting framework through the data transmission interface.

19. The data reporting device as described in claim 18, characterized in that, The reporting unit includes: A receiving subunit is used to receive format-compatible data associated with the preset reporting service through the reporting layer; A sub-unit is defined to determine the target data reporting sub-logic in the data reporting logic according to the preset reporting service. An execution subunit is used to execute the target data reporting sub-logic in order to report the format-compatible data.

20. A computer device, characterized in that, It includes a memory and a processor; the memory stores an application program, and the processor runs the application program within the memory to perform the operations in the data reporting method according to any one of claims 1 to 12.

21. A storage medium, characterized in that, The storage medium stores a plurality of instructions adapted for loading by a processor to execute the steps of the data reporting method according to any one of claims 1 to 12.

22. A computer program product, characterized in that, The computer program product includes computer instructions stored in a computer-readable storage medium; the processor of the computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps of the data reporting method according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Module uploading method, request method and loading method for cross-terminal architecture

    CN105468398A