Data reporting method, device, computer equipment and medium
By intercepting user operation messages in the message scheduler and calling common buried codes, the problem that each business code in the prior art needs to set buried codes independently is solved, achieving more efficient data reporting and reducing code maintenance costs.
Patent Information
- Application Number
- CN201910569287.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-06-27
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2039-11-20
AI Technical Summary
In the prior art, the method of burying point reporting of user behavior data requires setting burying point codes for each business code, resulting in large development workload and high code maintenance costs.
When the message scheduler processes the user operation message, the user operation message is intercepted, and the data is reported based on the intercepted message call the shared buried code provided by the base class. The buried point code provided by the base class is shared by at least two control elements.
It reduces the need to set different buried codes in each user interface, and implements data reporting by inheriting buried codes in the base class, reducing development workload and code maintenance costs.
Smart Images

Figure CN112148499B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to a data reporting method, device, computer equipment and medium. Background Art
[0002] User behavior data can be collected by tracking and reporting. Tracking refers to capturing user behavior data in the application, and reporting refers to transmitting the captured behavior data from the application to the server.
[0003] A method for reporting buried points is provided in the related technology, such as Figure 1 As shown, a plurality of control elements are provided on the user interface 12 of the application: control element 1, control element 2, control element 3, etc.; a business code 141 and a point-of-entry code 142 are provided on the interface logic 14 of the web page 12. The business code 141 and the point-of-entry code 142 correspond one to one. When a user clicks a control element on the interface 12, the control element is used to trigger the business code 141, and the application calls the corresponding point-of-entry code 142 to report the business data of the business code 141 to the backend server.
[0004] The above method requires setting a tracking code 142 for each business code 141, which results in a large development workload and high code maintenance cost. Summary of the invention
[0005] The present application provides a data reporting method, apparatus, computer equipment and medium. The technical solution is as follows:
[0006] According to one aspect of the present application, a data reporting method is provided, the method comprising:
[0007] Receiving a user operation event on a user interface, wherein the user interface includes at least one control element;
[0008] Convert the user operation event into a user operation message in a message scheduler;
[0009] When the message scheduler processes the user operation message, intercepting the user operation message;
[0010] According to the intercepted user operation message, call the embedding code provided by the base class to report data;
[0011] The embedding code provided by the base class is shared by the business codes corresponding to at least two control elements.
[0012] According to another aspect of the present application, a data reporting device is provided, the device comprising:
[0013] An interaction module, configured to receive a user operation event on a user interface, wherein the user interface includes at least one control element;
[0014] A conversion module, used for converting the user operation event into a user operation message in a message scheduler;
[0015] An interception module, used for intercepting the user operation message when the message scheduler processes the user operation message;
[0016] A reporting module, used to call the embedding code provided by the base class to report data according to the intercepted user operation message;
[0017] The embedding code provided by the base class is shared by the business codes corresponding to at least two control elements.
[0018] According to another aspect of the present application, a terminal is provided, comprising: a processor and a memory; the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set are loaded and executed by the processor to implement the data reporting method as described above.
[0019] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the data reporting method as described above.
[0020] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:
[0021] By intercepting user operation messages when the message scheduler processes user operation messages, and calling the embedding code provided by the base class to report data according to the intercepted user operation messages, since the embedding code provided by the base class is the embedding code shared by at least two control elements, there is no need to set different embedding codes according to different business codes in each user interface. Data reporting can be performed by inheriting the embedding code in the base class, thereby solving the problems of large development workload and high code maintenance cost when setting embedding codes for each business code. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0023] Figure 1 A schematic diagram of an interface of a data reporting method provided by the related art is shown;
[0024] Figure 2 A schematic diagram of an interface of a data reporting method provided by an exemplary embodiment of the present application is shown;
[0025] Figure 3 A structural block diagram of a base class provided by an exemplary embodiment of the present application is shown;
[0026] Figure 4 A block diagram of a computer system provided by an exemplary embodiment of the present application is shown;
[0027] Figure 5 A flow chart of a data reporting method provided by an exemplary embodiment of the present application is shown;
[0028] Figure 6 A schematic diagram of a Runtime mechanism provided by an exemplary embodiment of the present application is shown;
[0029] Figure 7 A schematic diagram of a Runtime mechanism provided by another exemplary embodiment of the present application is shown;
[0030] Figure 8 A flow chart of a data reporting method provided by another exemplary embodiment of the present application is shown;
[0031] Fig. 9 A schematic diagram showing a method for configuring a reporting field provided by another exemplary embodiment of the present application is shown;
[0032] Fig.10 A block diagram of a data reporting device provided by an exemplary embodiment of the present application is shown;
[0033] Fig.11 A block diagram of a terminal provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION
[0034] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0035] The tracking code is mainly divided into two types of events: exposure events and click events. Among them, exposure events refer to the exposure of the interface display content in the user interface (actually displaying the corresponding user interface for users to view); click events refer to the event that there is a control element in the user interface and the control element is clicked by the user. The reporting process of these two types of events is as follows: Figure 2 As shown:
[0036] 1. When the user clicks a control element on the user interface 22, a click event is triggered; or, when the user slides the user interface 22 to a certain position (a position containing a buried point) and stops, an exposure event is triggered;
[0037] 2. The tracking code obtains the data item bound to the control element currently displayed on the user interface 22, and encapsulates it into a reporting format;
[0038] For example, if control element 1 is a picture, when the position of the picture triggers an exposure event, the Uniform Resource Locator (URL) corresponding to the picture is extracted, and the extracted URL is encapsulated into a reporting format. For another example, if control element 2 is a button, when the position of the button triggers a click event, the activity (action, a kind of code logic) corresponding to the button is extracted, and the extracted action is encapsulated into a reporting format.
[0039] 3. The tracking code calls the reporting interface to report the encapsulated data items to the server.
[0040] From the perspective of the reporting process, the reporting logic of the exposure event and click event of each user interface is the same. Therefore, the embodiment of the present application provides an automated data reporting solution, which can abstract the embedding code of each user interface into a universal function method, and manage and maintain it by the base class (foundation class) 30 using the encapsulation and inheritance mechanism, such as Figure 3 As shown. The base class 30 is a basic programming class obtained by abstracting the code that can be shared by various user interfaces into a common code. For example, the error pop-up logic code when loading fails is abstracted into a common code; the display logic code of the buffer screen during the loading buffer process is abstracted into a common code. In the embodiment of the present application, the buried point code is abstracted into a common code, and the base class is used for management and maintenance.
[0041] Figure 4 The structure block diagram of a computer system 400 provided by an exemplary embodiment of the present application is shown. The computer system 400 may be an application system, and the present embodiment of the application does not limit the specific type of the application. The computer system 400 includes: a terminal 420 and a server cluster 440.
[0042] The terminal 420 is connected to the server cluster 420 via a wireless network or a wired network. The terminal 420 may be at least one of a smart phone, a game console, a desktop computer, a tablet computer, an e-book reader, an MP4 player, an MP4 player, and a laptop computer. The terminal 420 has an application installed and running. The application may be any one of an online video program, a short video program, a picture sharing program, a sound social program, an animation program, a wallpaper program, a news push program, a supply and demand information push program, an academic exchange program, a technical exchange program, a policy exchange program, a program including a comment mechanism, a program including a viewpoint release mechanism, and a knowledge sharing program. The terminal 420 is a terminal used by a user, and a user account is logged in to the application running in the terminal 420.
[0043] The terminal 420 is connected to the server 440 via a wireless network or a wired network.
[0044] The server cluster 440 includes at least one of a server, multiple servers, a cloud computing platform, and a virtualization center. The server cluster 440 is used to provide background services for applications that support voice messages. Optionally, the server cluster 440 undertakes the main computing work and the terminal 420 undertakes the secondary computing work; or, the server cluster 440 undertakes the secondary computing work and the terminal 420 undertakes the main computing work; or, the terminal 420 and the server cluster 440 adopt a distributed computing architecture for collaborative computing.
[0045] Optionally, taking the computer system 400 as a web browsing system, the server cluster 440 includes: an access server 442, a web server 444 and a data server 446. The access server 442 can be one or more, and the access server 442 can be deployed nearby in different cities. The access server 442 is used to receive service requests from each terminal 420 and forward the service requests to the corresponding server for processing. The web server 444 is a server for providing a web page to the terminal 420, and the web page is integrated with a point-of-sale code; the data server 446 is used to receive data reported by the terminal 420 (user behavior data, business data, etc.).
[0046] Figure 5 is a flow chart of a data reporting method provided by an exemplary embodiment of the present application. Figure 4 The terminal 420 shown executes the method, which includes:
[0047] Step 501, receiving a user operation event on a user interface, where the user interface includes at least one control element;
[0048] Control elements are the most basic elements in the user interface that organize the interface. Control elements include: text input box, button control, drop-down box, date / time control, upload control, tree control, list box, multi-format text box, Tab control or at least one of the set of other controls.
[0049] The user interface includes: one or more control elements. The user can perform at least one of the following operations on the control elements: click operation, double-click operation, slide operation, and long press operation. Click operation, double-click operation, and long press operation can all trigger user click events. Slide operation can move the user interface to a different position, thus triggering an interface refresh event.
[0050] Step 502, converting the user operation event into a user operation message in the message scheduler;
[0051] For example, the message dispatcher is a message dispatcher in the Runtime (runtime mechanism). The Runtime mechanism is a mechanism in the iOS system, which is used to do some processing at runtime. The Runtime mechanism belongs to the bottom layer of the objective-c language and can perform some very low-level operations:
[0052] -Dynamically create a class during program execution (such as the underlying implementation of KVO (Key-Value Observing));
[0053] -During program execution, dynamically add attributes\methods to a class and modify attribute values\methods;
[0054] -Traverse all member variables (attributes)\all methods of a class.
[0055] User operation events generated in the user interface can be converted into user operation messages and added to the message scheduler, waiting for the message scheduler to process the user operation messages in sequence.
[0056] Step 503, when the message scheduler processes the user operation message, intercept the user operation message;
[0057] When the business code in the user interface is running, every time a class creates a method, the system will number the method and then add a method to the method implementation list.
[0058] like Figure 6As shown, when a user operation event (a user click event 62 or an interface refresh event 64) is generated, the user operation event is converted into a user operation message in a message scheduler 66. For each user operation message, the message scheduler 66 calls a method corresponding to the user operation message in a method implementation list 68 to process the user operation message.
[0059] In this embodiment, if Figure 7 As shown, a message interceptor 67 is added between the message scheduler 66 and the method implementation list 68. When the message scheduler 66 processes the user operation message, it needs to call the corresponding method in the method implementation list, and at this time, the message interceptor 67 intercepts the user operation message.
[0060] Step 504: According to the intercepted user operation message, the embedding code provided by the base class is called to report data.
[0061] The message interceptor 67 calls the embedding code provided by the base class to report data according to the intercepted user operation message.
[0062] The tracking code provided by the base class is shared by the business codes corresponding to at least two control elements.
[0063] Optionally, after the data is reported, the message interceptor calls the method corresponding to the user operation message in the method implementation list 68 (the method provided by the business code) to process the user operation message.
[0064] To sum up, the method provided in this embodiment intercepts user operation messages when the message scheduler processes user operation messages, and calls the embedding code provided by the base class to report data according to the intercepted user operation message. Since the embedding code provided by the base class is the embedding code shared by at least two control elements, there is no need to set different embedding codes in each user interface according to different business codes. Data reporting can be performed by inheriting the embedding code in the base class, thereby solving the problems of large development workload and high code maintenance cost when setting the embedding code for each business code.
[0065] The method provided in this embodiment also executes business code through a message scheduler and uses a message interceptor to complete the collection and reporting of exposure data and click data, thereby decoupling business logic and tracking logic and reducing code maintenance costs.
[0066] Figure 8 is a flow chart of a data reporting method provided by another exemplary embodiment of the present application. Figure 4 The terminal 420 shown executes the method, which includes:
[0067] Step 801, receiving a configuration file;
[0068] Since there are many business codes in the same user interface or different user interfaces, different business codes correspond to different data items. Some data items need to be reported by tracking points, while others do not need to be reported by tracking points. In order to reduce the amount of data reported, the client can only report the required data, and the specific data to be reported can be configured by the server.
[0069] In this embodiment, the base class includes: a data source. The data source includes: various data items corresponding to the business code. In order to achieve targeted data reporting, each data item also corresponds to a reporting field, which is used to indicate whether the data item needs to be reported.
[0070] Indicatively, Table 1 shows the configuration relationship between business data, data items and reporting fields. A value of "1" indicates that reporting is required, and a value of "0" indicates that reporting is not required.
[0071] Table 1
[0072] Business data Data Item Report field (report) Business data 1 Data item 1 1 Business data 2 Data item 2 0 Business data 3 Data item 1 1 Business data 4 Data item 3 0 Business data 5 Data item 4 1
[0073] The server sends a configuration file to the terminal according to the dynamic data protocol agreed with the terminal. The configuration file is used to configure whether each data item needs to be reported. Optionally, a configuration interface is agreed between the server and the terminal, and the server sends the configuration file to the terminal through the configuration interface. The terminal receives the configuration file through the configuration interface according to the dynamic data protocol agreed with the server.
[0074] Step 802, configuring a reporting field of a data item in a data source according to a configuration file, where the reporting field is used to indicate whether the data item is to be reported;
[0075] After receiving the configuration file, the terminal parses the data source in the configuration file to obtain the corresponding relationship between business data, data items, and reporting fields. Since there is a corresponding relationship between business data and control elements, the terminal can bind the data items to the control elements displayed on the user interface.
[0076] like Fig. 9 As shown, the server sends a configuration file to the terminal, and the terminal configures the data source in the base class according to the configuration file. After configuration, the reporting field corresponding to control element 1 is 1, the reporting field corresponding to control element 2 is 0, and the reporting field corresponding to control element 3 is 1.
[0077] Step 803, receiving a user operation event on a user interface, where the user interface includes at least one control element;
[0078] Receive user click operations (single-click operation, double-click operation, long press operation, etc.) on the user interface, and generate user operation events based on the user click operations.
[0079] An interface refresh operation (sliding operation, clicking a refresh button, etc.) is received on the user interface, and an interface refresh event is generated according to the interface refresh operation.
[0080] Step 804, converting the user operation event into a user operation message in the message scheduler;
[0081] User operation events generated in the user interface can be converted into user operation messages and added to the message scheduler, waiting for the message scheduler to process the user operation messages in sequence.
[0082] Step 805, when the message scheduler processes the user operation message, intercept the user operation message;
[0083] The message interceptor is provided in the embedding code provided by the base class.
[0084] like Figure 7 As shown, a message interceptor 67 is added between the message scheduler 66 and the method implementation list 68. When the message scheduler 66 processes the user operation message, it needs to call the corresponding method in the method implementation list, and at this time, the message interceptor 67 intercepts the user operation message.
[0085] Step 806, according to the intercepted user operation message, call the embedding code provided by the base class in the data source to determine the data item corresponding to the user operation message;
[0086] After intercepting the user operation message, the message interceptor determines the data item corresponding to the user operation message in the data source of the base class.
[0087] The message interceptor may determine the control element corresponding to the user operation message, and determine the corresponding data item according to the control element. Alternatively, the message interceptor may determine the business code corresponding to the user operation message, and determine the corresponding data item according to the business code.
[0088] Step 807, generating business data to be reported according to the data items corresponding to the user operation message;
[0089] Optionally, the message interceptor also reads the reporting field corresponding to the data item.
[0090] When the reporting field indicates that the data item needs to be reported, the business data to be reported is generated according to the data item; when the reporting field indicates that the data item does not need to be reported, the processing of the data item is stopped.
[0091] Optionally, the data item is a data item involved in the business code, such as a URL address of a picture, text content, button activity, etc.
[0092] Optionally, the message interceptor generates a piece of business data based on the timestamp, user account, webpage URL, data item, etc. The business data may also be called user behavior data, automatic reporting data, embedded point reporting data, etc.
[0093] Step 808: reporting the business data.
[0094] The terminal reports the generated business data to the server.
[0095] To sum up, the method provided in this embodiment intercepts user operation messages when the message scheduler processes user operation messages, and calls the embedding code provided by the base class to report data according to the intercepted user operation message. Since the embedding code provided by the base class is the embedding code shared by at least two control elements, there is no need to set different embedding codes in each user interface according to different business codes. Data reporting can be performed by inheriting the embedding code in the base class, thereby solving the problems of large development workload and high code maintenance cost when setting the embedding code for each business code.
[0096] The method provided in this embodiment also executes business code through a message scheduler and uses a message interceptor to complete the collection and reporting of exposure data and click data, thereby decoupling business logic and tracking logic and reducing code maintenance costs.
[0097] The method provided in this embodiment can not only flexibly control the amount of reported data, but also dynamically expand statistical events by sending configuration files from the server to the terminal, thereby enhancing the ability to analyze online user behaviors in real time.
[0098] The automatic reporting solution provided in the embodiment of the present application can be used in the scenario where an application browses a web page, and can also be used in the scenario where an application uses a built-in application kernel to display a web page. Compared with the solutions in the related art:
[0099] (1) Improve the efficiency of point reporting;
[0100] It can be seen from the detailed description of the technical solution of the present application that if the technical solution of the present application is not used, each interface needs to write the tracking code, which takes O(N) development time; if the technical solution of the present application is used, it is only necessary to write the tracking code in the base class, which takes O(1) development time, and the development efficiency is improved by N times.
[0101] (2) Reduce the maintenance cost of embedding code;
[0102] Since the business codes in the related technology are scattered in various user interfaces, if the data reporting protocol needs to be updated, the tracking code of N user interfaces needs to be modified. However, this solution only needs to use the configuration file to modify the code in the base class, reducing the maintenance cost by N times.
[0103] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0104] Fig.10 A block diagram of a data reporting device provided by an exemplary embodiment of the present application is shown. The device can be implemented as all or part of a terminal through software, hardware, or a combination of both. The device includes:
[0105] An interaction module 1020, configured to receive a user operation event on a user interface, wherein the user interface includes at least one control element;
[0106] A conversion module 1040, configured to convert the user operation event into a user operation message in a message scheduler;
[0107] An interception module 1060, configured to intercept the user operation message when the message scheduler processes the user operation message;
[0108] The reporting module 1080 is used to call the embedding code provided by the base class to report data according to the intercepted user operation message;
[0109] The embedding code provided by the base class is shared by the business codes corresponding to at least two control elements.
[0110] In an optional embodiment, the base class includes a data source, which includes at least one data item; the interception module 1060 is used to call the embedding code provided by the base class in the data source according to the intercepted user operation message, and determine the data item corresponding to the user operation message; generate business data to be reported according to the data item corresponding to the user operation message; and report the business data.
[0111] In an optional embodiment, the base class further includes a reporting field corresponding to the data item;
[0112] The interception module 1060 is used to determine the target reporting field corresponding to the data item corresponding to the user operation message; when the target reporting field is used to indicate the reporting status, the business data to be reported is generated according to the data item corresponding to the user operation message.
[0113] In an optional embodiment, the device further comprises:
[0114] A receiving module 1010 is used to receive a configuration file;
[0115] The configuration module 1030 is used to configure the reporting field of the data item in the data source according to the configuration file, and the reporting field is used to indicate whether to report the data item.
[0116] In an optional embodiment, the interaction module 1020 is used to receive a user click operation on the user interface and generate the user operation event based on the user click operation; or, the interaction module 1020 is used to receive an interface refresh operation on the user interface and generate the interface refresh event based on the interface refresh operation.
[0117] It should be noted that: the data reporting device provided in the above embodiment only uses the division of the above functional modules as an example when reporting at the buried point. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the data reporting device provided in the above embodiment and the method embodiment of the data reporting method belong to the same concept. The specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0118] Fig.11 It shows a block diagram of a terminal 1100 provided by an exemplary embodiment of the present application. The terminal 1100 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, Moving Picture Experts Group Audio Layer 3), an MP4 (Moving Picture Experts Group Audio Layer IV, Moving Picture Experts Group Audio Layer 4) player, a laptop computer or a desktop computer. The terminal 1100 may also be called a user device, a portable terminal, a laptop terminal, a desktop terminal or other names.
[0119] Typically, the terminal 1100 includes a processor 1101 and a memory 1102 .
[0120] The processor 1101 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1101 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 1101 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1101 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1101 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0121] The memory 1102 may include one or more computer-readable storage media, which may be non-transitory. The memory 1102 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1102 is used to store at least one instruction, which is used to be executed by the processor 1101 to implement the data reporting method provided in the method embodiment of the present application.
[0122] In some embodiments, the terminal 1100 may also optionally include: a peripheral device interface 1103 and at least one peripheral device. The processor 1101, the memory 1102 and the peripheral device interface 1103 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 1103 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 1104, a touch display screen 1105, a camera 1106, an audio circuit 1107, a positioning component 1108 and a power supply 1109.
[0123] The peripheral device interface 1103 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 1101 and the memory 1102. In some embodiments, the processor 1101, the memory 1102, and the peripheral device interface 1103 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1101, the memory 1102, and the peripheral device interface 1103 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
[0124] The radio frequency circuit 1104 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 1104 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency circuit 1104 converts the electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 1104 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The radio frequency circuit 1104 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: a metropolitan area network, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a Wi-Fi (Wireless-Fidelity) network. In some embodiments, the radio frequency circuit 1104 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.
[0125] The display screen 1105 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 1105 is a touch display screen, the display screen 1105 also has the ability to collect touch signals on the surface or above the surface of the display screen 1105. The touch signal can be input to the processor 1101 as a control signal for processing. At this time, the display screen 1105 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 1105 can be one, and the front panel of the terminal 1100 is set; in other embodiments, the display screen 1105 can be at least two, which are respectively set on different surfaces of the terminal 1100 or are folded; in some other embodiments, the display screen 1105 can be a flexible display screen, which is set on the curved surface or folded surface of the terminal 1100. Even, the display screen 1105 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 1105 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
[0126] The camera assembly 1106 is used to capture images or videos. Optionally, the camera assembly 1106 includes a front camera and a rear camera. Typically, the front camera is arranged on the front panel of the terminal, and the rear camera is arranged on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize the panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 1106 may also include a flash. The flash can be a monochrome temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.
[0127] The audio circuit 1107 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 1101 for processing, or input them into the radio frequency circuit 1104 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the terminal 1100. The microphone may also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 1101 or the radio frequency circuit 1104 into sound waves. The speaker may be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 1107 may also include a headphone jack.
[0128] The positioning component 1108 is used to locate the current geographical location of the terminal 1100 to implement navigation or LBS (Location Based Service). The positioning component 1108 can be a positioning component based on the US GPS (Global Positioning System), China's Beidou system, Russia's Grenas system or the European Union's Galileo system.
[0129] The power supply 1109 is used to power various components in the terminal 1100. The power supply 1109 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 1109 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.
[0130] In some embodiments, the terminal 1100 further includes one or more sensors 1110 , including but not limited to: an acceleration sensor 1111 , a gyroscope sensor 1112 , a pressure sensor 1113 , a fingerprint sensor 1114 , an optical sensor 1115 , and a proximity sensor 1116 .
[0131] The acceleration sensor 1111 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established by the terminal 1100. For example, the acceleration sensor 1111 can be used to detect the components of gravity acceleration on the three coordinate axes. The processor 1101 can control the touch display screen 1105 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 1111. The acceleration sensor 1111 can also be used for collecting game or user motion data.
[0132] The gyro sensor 1112 can detect the body direction and rotation angle of the terminal 1100, and the gyro sensor 1112 can cooperate with the acceleration sensor 1111 to collect the user's 3D actions on the terminal 1100. The processor 1101 can implement the following functions based on the data collected by the gyro sensor 1112: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
[0133] The pressure sensor 1113 can be set on the side frame of the terminal 1100 and / or the lower layer of the touch display screen 1105. When the pressure sensor 1113 is set on the side frame of the terminal 1100, the user's holding signal of the terminal 1100 can be detected, and the processor 1101 performs left and right hand recognition or shortcut operations according to the holding signal collected by the pressure sensor 1113. When the pressure sensor 1113 is set on the lower layer of the touch display screen 1105, the processor 1101 controls the operability controls on the UI interface according to the user's pressure operation on the touch display screen 1105. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
[0134] The fingerprint sensor 1114 is used to collect the user's fingerprint, and the processor 1101 identifies the user's identity based on the fingerprint collected by the fingerprint sensor 1114, or the fingerprint sensor 1114 identifies the user's identity based on the collected fingerprint. When the user's identity is identified as a trusted identity, the processor 1101 authorizes the user to perform relevant sensitive operations, which include unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings. The fingerprint sensor 1114 can be set on the front, back, or side of the terminal 1100. When a physical button or a manufacturer logo is set on the terminal 1100, the fingerprint sensor 1114 can be integrated with the physical button or the manufacturer logo.
[0135] The optical sensor 1115 is used to collect the ambient light intensity. In one embodiment, the processor 1101 can control the display brightness of the touch display screen 1105 according to the ambient light intensity collected by the optical sensor 1115. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 1105 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 1105 is reduced. In another embodiment, the processor 1101 can also dynamically adjust the shooting parameters of the camera assembly 1106 according to the ambient light intensity collected by the optical sensor 1115.
[0136] The proximity sensor 1116, also called a distance sensor, is usually arranged on the front panel of the terminal 1100. The proximity sensor 1116 is used to collect the distance between the user and the front of the terminal 1100. In one embodiment, when the proximity sensor 1116 detects that the distance between the user and the front of the terminal 1100 is gradually decreasing, the processor 1101 controls the touch display screen 1105 to switch from the screen-on state to the screen-off state; when the proximity sensor 1116 detects that the distance between the user and the front of the terminal 1100 is gradually increasing, the processor 1101 controls the touch display screen 1105 to switch from the screen-off state to the screen-on state.
[0137] Those skilled in the art will understand that Fig. 9 The structure shown in the figure does not constitute a limitation on the terminal 1100, and the terminal 1100 may include more or fewer components than those shown in the figure, or combine certain components, or adopt a different component arrangement.
[0138] It should be understood that the "plurality" mentioned in this article refers to two or more. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.
[0139] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0140] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A data reporting method, characterized in that: The method comprises: Receiving a user operation event on a user interface, wherein the user interface includes at least one control element; Convert the user operation event into a user operation message in a message scheduler; When the message scheduler processes the user operation message, intercepting the user operation message; According to the intercepted user operation message, call the embedding code provided by the base class to report data, where the embedding code provided by the base class is shared by the business codes corresponding to at least two control elements; Wherein, the base class includes a data source, and the data source includes at least one data item; The method of calling the embedding code provided by the base class to report data according to the intercepted user operation message includes: According to the intercepted user operation message, calling the embedding code provided by the base class, and determining the data item corresponding to the user operation message in the data source; Generate business data to be reported according to the data items corresponding to the user operation message; The business data is reported.
2. The method according to claim 1, characterized in that The base class also includes a reporting field corresponding to the data item; The generating the business data to be reported according to the data item corresponding to the user operation message includes: Determine a target reporting field corresponding to the data item corresponding to the user operation message; When the target reporting field is used to indicate a reporting state, the business data to be reported is generated according to the data item corresponding to the user operation message.
3. The method according to claim 2, characterized in that The method further comprises: Receive configuration files; A reporting field of the data item in the data source is configured according to the configuration file, wherein the reporting field is used to indicate whether to report the data item.
4. The method according to any one of claims 1 to 3, characterized in that: The receiving of a user operation event on the user interface includes: Receiving a user click operation on the user interface, and generating the user operation event according to the user click operation; or, An interface refresh operation is received on the user interface, and the interface refresh event is generated according to the interface refresh operation.
5. A data reporting device, characterized in that: The device comprises: An interaction module, configured to receive a user operation event on a user interface, wherein the user interface includes at least one control element; A conversion module, used for converting the user operation event into a user operation message in a message scheduler; An interception module, used for intercepting the user operation message when the message scheduler processes the user operation message; A reporting module, used to call the embedding code provided by the base class to report data according to the intercepted user operation message; the embedding code provided by the base class is shared by the business codes corresponding to at least two control elements; Wherein, the base class includes a data source, and the data source includes at least one data item; The reporting module is used to call the embedding code provided by the base class according to the intercepted user operation message, determine the data item corresponding to the user operation message in the data source; generate the business data to be reported according to the data item corresponding to the user operation message; and report the business data.
6. The device according to claim 5, characterized in that The base class also includes a reporting field corresponding to the data item; The reporting module is used to determine a target reporting field corresponding to the data item corresponding to the user operation message; when the target reporting field is used to indicate a reporting state, generate business data to be reported according to the data item corresponding to the user operation message.
7. A terminal, characterized in that: The terminal includes: a processor and a memory; At least one program is stored in the memory, and the at least one program is loaded and executed by the processor to implement the data reporting method according to any one of claims 1 to 4.
8. A computer-readable storage medium, characterized in that: The storage medium stores at least one program, and the at least one program is loaded and executed by the processor to implement the data reporting method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Data reporting method, data reporting device, data statistics method and data statistics device for interface operations
CN106407092A
Dynamic point burying method and system for application program of client
CN106598868A