CN113515425A - Method and device for dynamically reporting data - Google Patents

Method and device for dynamically reporting data Download PDF

Info

Publication number
CN113515425A
CN113515425A CN202110545172.7A CN202110545172A CN113515425A CN 113515425 A CN113515425 A CN 113515425A CN 202110545172 A CN202110545172 A CN 202110545172A CN 113515425 A CN113515425 A CN 113515425A
Authority
CN
China
Prior art keywords
data
reporting
reported
server
client
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110545172.7A
Other languages
Chinese (zh)
Inventor
张磊
吴红
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hunan Happly Sunshine Interactive Entertainment Media Co Ltd
Original Assignee
Hunan Happly Sunshine Interactive Entertainment Media Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hunan Happly Sunshine Interactive Entertainment Media Co Ltd filed Critical Hunan Happly Sunshine Interactive Entertainment Media Co Ltd
Priority to CN202110545172.7A priority Critical patent/CN113515425A/en
Publication of CN113515425A publication Critical patent/CN113515425A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3089Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
    • G06F11/3093Configuration details thereof, e.g. installation, enabling, spatial arrangement of the probes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • G06F11/3072Monitoring arrangements determined by the means or processing involved in reporting the monitored data where the reporting involves data filtering, e.g. pattern matching, time or event triggered, adaptive or policy-based reporting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • G06F11/3072Monitoring arrangements determined by the means or processing involved in reporting the monitored data where the reporting involves data filtering, e.g. pattern matching, time or event triggered, adaptive or policy-based reporting
    • G06F11/3079Monitoring arrangements determined by the means or processing involved in reporting the monitored data where the reporting involves data filtering, e.g. pattern matching, time or event triggered, adaptive or policy-based reporting the data filtering being achieved by reporting only the changes of the monitored data

Abstract

The application provides a method and a device for dynamically reporting data, wherein the method applicable to a client comprises the steps of responding to an operation instruction of a user and sending a request event to a server based on the operation instruction; receiving data to be reported generated by the server according to the request event; the data to be reported comprises a reporting field appointed by the server; collecting data matched with the reported field at the client; adding the data matched with the reporting field to the data to be reported to obtain supplemented data to be reported; and reporting the supplemented data to be reported to the server. In the scheme, after the client is on line, the matched data can be still collected and reported according to the field to be reported specified by the server, so that the dynamic reporting of the data is realized, and the requirement of the server for reporting the data is met in time.

Description

Method and device for dynamically reporting data
Technical Field
The present invention relates to the field of data reporting technologies, and in particular, to a method and an apparatus for dynamically reporting data.
Background
The data reporting generally refers to a process that a client collects relevant data according to a scene and preset requirements, processes the collected data, and sends the data to a server through protocols such as network communication and the like. Currently, data reporting is generally completed in a client development stage, and finally, the data is released to be online after a test, that is, in the existing data reporting technology, after a client is online (i.e., provided for a user to use), only data specified in the development stage is collected and reported.
The method has the following problems that when hidden problems which are not found in a testing stage exist, or early-stage product requirement planning is not in place, or problems such as new data reporting requirements occur, the server possibly needs to collect some data which are not specified to be reported in a development stage, and the client cannot report the data at the moment, so that the server cannot collect the required data in time.
Disclosure of Invention
In view of the problems in the prior art, the present application provides a method and an apparatus for dynamically reporting data, so as to dynamically adjust reported data after a client is online.
A first aspect of the present application provides a method for dynamically reporting data, which is applicable to a client, and the method includes:
responding to an operation instruction of a user, and sending a request event to a server based on the operation instruction;
receiving data to be reported generated by the server according to the request event; the data to be reported comprises a reporting field appointed by the server;
collecting data matched with the reported field at the client;
adding the data matched with the reporting field to the data to be reported to obtain supplemented data to be reported;
and reporting the supplemented data to be reported to the server.
Optionally, the reporting the supplemented data to be reported to the server includes:
reporting the supplemented data to be reported to the server side according to the reporting parameters carried by the data to be reported; the reporting parameters comprise a reporting switch, a reporting time, a reporting frequency and a reporting address.
Optionally, after the data matched with the reporting field is added to the data to be reported to obtain the supplemented data to be reported, the method further includes:
preprocessing the supplemented data to be reported to obtain processed data to be reported;
wherein the reporting the supplemented data to be reported to the server includes:
and reporting the processed data to be reported to the server.
A second aspect of the present application provides a method for dynamically reporting data, which is applicable to a server, and the method includes:
receiving a request event sent by a client; wherein the request event is sent by the client based on an operation instruction of a user;
generating data to be reported according to the request event; the data to be reported comprises a reporting field appointed by the server;
sending the data to be reported to the client;
receiving the supplemented data to be reported fed back by the client; and the supplemented data to be reported carries data matched with the reporting field.
Optionally, the generating data to be reported according to the request event includes:
determining service reporting requirements according to the request event and the current service scene;
acquiring the known data of the server side in the service reporting requirement, and determining a reporting field according to the service reporting requirement;
and based on a data format specification preset in a reporting protocol, packaging the known data of the server and the reporting field to obtain the data to be reported.
Optionally, after obtaining the data known to the server in the service reporting requirement and determining the reporting field according to the service reporting requirement, the method further includes:
determining a reporting parameter according to the service reporting requirement; the reporting parameters comprise a reporting switch, a reporting opportunity, a reporting frequency and a reporting address;
the method for encapsulating the data known by the server and the report field based on the data format specification preset in the report protocol to obtain the data to be reported includes:
and based on a data format specification preset in a reporting protocol, packaging the data known by the server, the reporting field and the reporting parameter to obtain the data to be reported.
A third aspect of the present application provides an apparatus for dynamically reporting data, which is suitable for a client, and the apparatus includes:
the sending unit is used for responding to an operation instruction of a user and sending a request event to the server based on the operation instruction;
a receiving unit, configured to receive data to be reported, where the data is generated by the server according to the request event; the data to be reported comprises a reporting field appointed by the server;
the acquisition unit is used for acquiring data matched with the reported field at the client;
the adding unit is used for adding the data matched with the reporting field to the data to be reported to obtain supplemented data to be reported;
and the sending unit is used for reporting the supplemented data to be reported to the server.
Optionally, when the sending unit reports the supplemented data to be reported to the server, the sending unit is specifically configured to:
reporting the supplemented data to be reported to the server side according to the reporting parameters carried by the data to be reported; the reporting parameters comprise a reporting switch, a reporting time, a reporting frequency and a reporting address.
A fourth aspect of the present application provides a device for dynamically reporting data, which is applicable to a server, and the device includes:
the receiving unit is used for receiving a request event sent by a client; wherein the request event is sent by the client based on an operation instruction of a user;
the generating unit is used for generating data to be reported according to the request event; the data to be reported comprises a reporting field appointed by the server;
a sending unit, configured to send the data to be reported to the client;
the receiving unit is used for receiving the supplemented data to be reported fed back by the client; and the supplemented data to be reported carries data matched with the reporting field.
Optionally, when the generating unit generates the data to be reported according to the request event, the generating unit is specifically configured to:
determining service reporting requirements according to the request event and the current service scene;
acquiring the known data of the server side in the service reporting requirement, and determining a reporting field according to the service reporting requirement;
and based on a data format specification preset in a reporting protocol, packaging the known data of the server and the reporting field to obtain the data to be reported.
The application provides a method and a device for dynamically reporting data, wherein the method applicable to a client comprises the steps of responding to an operation instruction of a user and sending a request event to a server based on the operation instruction; receiving data to be reported generated by the server according to the request event; the data to be reported comprises a reporting field appointed by the server; collecting data matched with the reported field at the client; adding the data matched with the reporting field to the data to be reported to obtain supplemented data to be reported; and reporting the supplemented data to be reported to the server. In the scheme, after the client is on line, the matched data can be still collected and reported according to the field to be reported specified by the server, so that the dynamic reporting of the data is realized, and the requirement of the server for reporting the data is met in time.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a method for dynamically reporting data suitable for a client according to an embodiment of the present application;
fig. 2 is a flowchart of a method for dynamically reporting data suitable for a server according to an embodiment of the present application;
fig. 3 is an interaction flow diagram of a method for dynamically reporting data according to an embodiment of the present application;
fig. 4 is a schematic diagram of data to be reported according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an apparatus for dynamically reporting data suitable for a client according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an apparatus for dynamically reporting data at a server according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the technical field of information communication, scenes and requirements for data reporting all exist. And the client acquires and processes the relevant data of the client according to the reporting requirement, and then sends the data to the server through a network communication protocol. The main purpose of data reporting is to collect the operation and usage of the client device, so as to further improve the experience and effect of the product. The specification and the requirement of data reporting are completed in a development stage, and finally the data is released to be online after being tested. Specifically, there are the following problems: firstly, the data reporting requirement is completed in a client development stage, and if reporting omission or even errors exist or reporting parameters are newly added after the data is on line, version sending repair of the client is required; and secondly, reporting switch, frequency, collection address and the like, which relate to reporting management and the like, cannot be dynamically adjusted and controlled.
The data reporting generally refers to a process that a client collects and processes related data according to a scene and preset requirements, and then sends reported data to a server by using protocols such as network communication and the like. At present, data reporting is generally completed in a client development stage, and finally the data is released and online after being tested. This approach has problems in nature: if the hidden problem is not found in the test stage or the requirement planning of the previous-stage product is not in place or a new data reporting requirement is generated after the product is on line, the issued version cannot be repaired or the problem is realized, the reported data cannot meet the requirement or even is wrong, the client must wait until the modification of the next version is completed to solve the problem, and the client has a certain updating period after being issued. The problem to be solved by the present invention is to provide a method and a device for dynamically reporting data, so as to implement dynamic control of client data reporting by a server, and solve the pain that the client cannot intervene in the data reporting process once version is issued.
The invention mainly realizes the report of the dynamic data from the client to the server by the following aspects:
the server and the client formulate a uniform reporting protocol specification which is a necessary means for realizing a dynamic data reporting method;
the server side realizes the logic of the dynamic data reporting part according to the requirement and sends the dynamic data to be reported to the client side according to the uniform reporting protocol standard;
after receiving the data to be reported issued by the server, the client acquires the data (namely the data matched with the reporting field in the data to be reported) to be collected at the client in the data to be reported, processes the two parts of data and then sends the processed data to the data collection server, thereby realizing the dynamic reporting of the data.
Based on the improvement of the aspects, the invention provides a method and a device for dynamically reporting data, wherein partial logic of data reporting is transferred from a client layer to a server layer, the server dynamically issues data and requirements to be reported, and the client reports the data according to the data reporting content issued by the server and the reporting content of the client after processing, so that the problems that the problem of reporting logic by the client cannot be repaired, the reporting content needs to be newly added in product operation, the reporting logic occupies a large amount of development cycle of the client and the like are solved; and simultaneously, a reporting protocol standard is formulated with the client, so that dynamic adjustment and management of the reporting opportunity, the reporting switch, the reporting frequency, the reporting address and the like of the client are realized.
A first aspect of the present application provides a method for dynamically reporting data, which is applicable to a client, please refer to fig. 1, and the method may include the following steps:
and S101, responding to an operation instruction of a user, and sending a request event to a server based on the operation instruction.
And S102, receiving data to be reported generated by the server according to the request event.
The data to be reported comprises a reporting field specified by the server.
And S103, collecting data matched with the reported field at the client.
And S104, adding the data matched with the reporting field to the data to be reported to obtain the supplemented data to be reported.
Optionally, after adding the data matched with the reporting field to the data to be reported to obtain the supplemented data to be reported, the method further includes:
preprocessing the supplemented data to be reported to obtain processed data to be reported;
the reporting of the supplemented data to be reported to the server includes:
and reporting the processed data to be reported to the server.
The preprocessing performed after step S104 may include checking the integrity and correctness of the supplemented data to be reported, and deleting abnormal data and error data that may exist in the supplemented data to be reported.
And S105, reporting the supplemented data to be reported to the server.
Optionally, the reporting the supplemented data to be reported to the server includes:
reporting the supplemented data to be reported to the server side according to the reporting parameters carried by the data to be reported; the reporting parameters comprise a reporting switch, a reporting time, a reporting frequency and a reporting address.
A second aspect of the present application provides a method for dynamically reporting data, which is applicable to a server, please refer to fig. 2, where the method may include the following steps:
the server side can be a server or a server cluster formed by a plurality of servers which are in communication connection with each other.
S201, receiving a request event sent by a client.
Wherein, the request event is sent by the client based on the operation instruction of the user.
And S202, generating data to be reported according to the request event.
The data to be reported comprises a reporting field specified by the server.
Optionally, generating data to be reported according to the request event includes:
determining service reporting requirements according to the request event and the current service scene;
acquiring data known by a server side in service reporting requirements, and determining a reporting field according to the service reporting requirements;
and based on the data format specification preset in the reporting protocol, packaging the known data of the server and the reporting field to obtain the data to be reported.
Optionally, after obtaining the data known by the server in the service reporting requirement and determining the reporting field according to the service reporting requirement, the method further includes:
determining a reporting parameter according to a service reporting requirement; the reporting parameters comprise a reporting switch, a reporting time, a reporting frequency and a reporting address;
the method for encapsulating the data known by the server and the report field based on the data format specification preset in the report protocol to obtain the data to be reported includes:
and packaging the known data of the server, the report field and the report parameters based on the data format specification preset in the report protocol to obtain the data to be reported.
S203, sending the data to be reported to the client.
And S204, receiving the supplemented data to be reported fed back by the client.
And the supplemented data to be reported carries data matched with the reported field.
To facilitate understanding of the method for dynamically reporting data provided by the present application, the method for dynamically reporting data of the present application is described below with reference to an interaction process between a client and a server, please refer to fig. 3, where fig. 3 is a schematic diagram of an interaction flow of the method for dynamically reporting data:
s301, the client responds to an operation instruction of the user and sends a request event to the server based on the operation instruction.
And S302, the server generates data to be reported according to the request event.
S303, the server side sends the data to be reported containing the reporting field to the client side.
S304, the client locally collects the data matched with the reported field.
S305, the client adds the data matched with the reporting field to the data to be reported to obtain the supplemented data to be reported.
S306, the client reports the supplemented data to be reported to the server.
The application provides a method for dynamically reporting data, wherein the method applicable to a client comprises the steps of responding to an operation instruction of a user and sending a request event to a server based on the operation instruction; receiving data to be reported generated by the server according to the request event; the data to be reported comprises a reporting field appointed by the server; collecting data matched with the reported field at the client; adding the data matched with the reporting field to the data to be reported to obtain supplemented data to be reported; and reporting the supplemented data to be reported to the server. In the scheme, after the client is on line, the matched data can be still collected and reported according to the field to be reported specified by the server, so that the dynamic reporting of the data is realized, and the requirement of the server for reporting the data is met in time.
Based on the data dynamic reporting method and the device, the dynamic control of the data reporting of the client side can be realized at the server, and simultaneously, most of business logic of the data reporting is transferred from the client side to the server side to be completed, thereby bringing the following advantages:
the development work of the client is simpler. The method is focused on business development and collection processing of self-related data, and version release is not limited by development of a data reporting part;
and data reporting is dynamic. The logic of the data report of the client is transferred to the server, so that the report dynamism is realized, and the increasingly changing service requirements of operation are met;
the following is a detailed description of the above steps:
first, as described above, the dynamic reporting method for data provided by the present application may be implemented based on a reporting protocol pre-established between a client and a server, where the reporting protocol may specifically specify a data format specification, a dynamic extension mechanism, and a plurality of reporting parameters, where the reporting parameters include a reporting switch, a reporting time, a reporting frequency, a reporting address, and the like.
The details of the reporting protocol are as follows:
in the present application, the data to be reported issued by the server needs to be divided into multiple layers according to the data format specification, where different layers represent different data modules, functions, and reporting points, and each layer may have one or more reporting fields, and the reporting fields may be recursively nested, and support default at a certain level, where fig. 4 is an example of data to be reported determined based on the data format specification of the present application.
In fig. 4, "key 1 ═ value1& key2-value2 … …", that is, the content behind "server", belongs to the aforementioned data known to the server, "mac", "net", "device", and so on, belong to the report field, "mac" represents the local network address of the client, "net" represents the network state of the client, "device" represents the device type of the client, after receiving the data to be reported as shown in fig. 4, the client can collect its local network address, network state and device type, and fill these data into the fields "mac", "net" and "device" shown in fig. 4 correspondingly, and the examples after filling are as follows:
“mac”:192.168.5.7;
"net": state 1;
“device”:MobilePhone。
after the completion of the filling, the supplemented data to be reported is obtained, and then the supplemented data to be reported can be sent to the server.
A dynamic extension mechanism. The dynamic expansion and reduction of data reporting are realized through an expansion mechanism. For example, the data format to be reported may be organized into a key value structure of a dictionary, each key is used as a parameter name of the data to be reported, and a value is a value of the data to be reported.
Taking fig. 4 as an example, the data known by the server after "server" is organized by using a dynamic extension mechanism, and each time an item of data known by the server is added, it is only necessary to add the symbol &atthe end of the original data, and then add a key value pair (i.e., key value) indicating the known data after the symbol, thereby implementing dynamic extension of the data known by the server.
In terms of the report field that needs to be collected by the client, in the structure client [ ] shown in fig. 4, when a report field is newly added, the report field can be directly added at the end of the client [ ], taking fig. 4 as an example, if a report field "user id" needs to be newly added by the server, the "user id" can be directly added below "device" in fig. 4 according to a dynamic extension mechanism.
Each reporting parameter in the reporting protocol is respectively used for controlling the mode of reporting data from the client to the server. The reporting switch is used for enabling or disabling a data reporting function of the client, the reporting time is used for limiting the reporting of the client within a certain time range, the reporting frequency is used for controlling the reporting times of the client, and the reporting address is used for specifying which server of the server the client specifically reports.
For example, the server may include the server 1 to the server 3, and the reporting address specified for a certain client may be a network address of the server 1, so that the client only sends data to the server 1, but not to the server 2 and the server 3 when reporting the data.
Each client can be configured with a set of default reporting parameters, when the client is started for the first time, the server can report data according to the default reporting parameters, and meanwhile, based on the dynamic reporting method provided by the application, the server can designate new reporting parameters in the issued data to be reported, that is, as described in the previous step S202, based on the data format specification preset in the reporting protocol, the known data, the reporting field and the reporting parameters of the server are encapsulated to obtain the data to be reported, then the data to be reported carrying the new reporting parameters are issued to the client, and then the client can perform data reporting based on the new reporting parameters.
The reporting parameters may be expressed by using variables or expressions in the data to be reported, for example, as follows:
the reporting switch may set a logical variable as an identifier of the reporting switch (e.g., a defined variable Changer), where when the value of the variable is True, the reporting switch indicates that a data reporting function is enabled, and when the value of the variable is False, the reporting switch indicates that a data reporting function is disabled, the default reporting switch may be True, when the server does not need to change the reporting switch of the client, the variable may be absent in the data to be reported (i.e., the variable does not carry a variable indicating the reporting switch), when the server needs to change the reporting switch of the client, for example, from enabled to disabled, the "Changer" may be added to the data to be reported, and the client disables the data reporting function of the client after receiving the change, until the server notifies that the reporting switch is enabled (the client is enabled by issuing the "Changer" to the client).
And reporting the opportunity. The reporting time can be controlled by different latitudes. If two parties report valid time periods by appointment, table 1 shows expressions and meanings of various reporting opportunities:
TABLE 1
Figure BDA0003073262280000101
Figure BDA0003073262280000111
And reporting the frequency. The reporting frequency is mainly used for controlling the reporting times of the client, the server can issue different reporting frequencies to the client according to the reporting requirements and the version requirements, the reporting times and bandwidth of the client can be saved on the premise of meeting the data sampling reliability, meanwhile, the calculation cost of the server for analyzing the reported data can be reduced, and the calculation analysis period is shortened. Referring to table 2, reporting the frequency condition expression includes, but is not limited to:
TABLE 2
Figure BDA0003073262280000112
And reporting the address. The server side sends the reporting parameters and simultaneously increases the sending of the reporting address, can control the reporting path and the domain name with finer granularity, and realizes the functions of dynamic migration, data storage separation and the like of the server. As described above, the server may specify that the client specifically reports data to one or more servers through the reporting address, and may notify the client to send data to a new network address by issuing a new reporting address after the network address of the server is changed.
With reference to fig. 3, in step S301, a user may perform a plurality of operations on a client, such as a search operation, a video viewing operation, a comment operation, and the like, where each time the user performs one operation, the client may obtain a corresponding operation instruction, for example, after the user performs the search operation, the client may obtain the search operation instruction, and based on the search operation instruction, the client may trigger a search request event, and then send the search request event to a server.
In step S302, the server may pre-configure a corresponding relationship table between the request event and the report data, where the corresponding relationship table records the service report requirement corresponding to each request event, so that the server may find the service report requirement corresponding to the currently received request event in the corresponding relationship table. The service reporting requirement includes two aspects, that is, specifying which data needs to be reported on one hand, and specifying which clients need to be reported on the other hand, which is service logic, and specifically includes specifying which clients need to be reported, corresponding reporting timing, differences of reporting parameters between different versions of the clients, and the like.
Optionally, the request events triggered in different service scenarios may respectively correspond to different service reporting requirements.
After the service reporting requirement is determined, the server may perform logic calculation on the data to be reported specified in the first aspect according to the service logic of the second aspect, so as to determine which fields of data need to be reported by the client (i.e., the client that currently sends the request event), for example, which fields of the local area network address and the device type need to be reported by the client, the fields of mac and device that need to be reported may be determined, and at the same time, which data is known by the server in the data to be reported specified in the first aspect may be determined, and finally, the server may encapsulate the fields that need to be reported (i.e., the reported fields), the known data of the server, and the reported parameters according to the data format specification, so as to obtain the data to be reported. Step S303 may be executed subsequently, that is, the encapsulated data to be reported is sent back to the client.
The data to be reported may or may not include the reporting parameters, and when not, the client reports according to the originally default reporting parameters.
It can be seen that the data to be reported sent by the server has two parts, one of which is the known data of the server and is directly provided to the client as a part of the reported content; the other part is data which needs to be collected by the specified client, such as mac address, device name, device type, network state and the like, namely data matched with the reported fields.
In step S304, after receiving the data to be reported, the client may collect data matched with the reporting field therein, for example, if the data to be reported includes the reporting field "mac", the client may collect its own local area network address (i.e., mac address).
After the data corresponding to the reporting fields are collected, the client can correspondingly add the data to each reporting field in the data to be reported to obtain the supplemented data to be reported.
Finally, in step S306, the client sends the supplemented data to be reported to the server, and completes the complete process of dynamically reporting the data.
In summary, the method for dynamically reporting data provided by the present application may include two parts, one part is executed by the server and the other part is executed by the client.
The server matches the reporting requirements preset by the product or the operation requirements according to different requests of the client, encapsulates the data according to a data reporting protocol agreed with the client through logic processing and sends the encapsulated data to the client, and the specific implementation steps are as follows:
the server receives a client request event, for example, when a user enters a search page to execute a search action, the server triggers the search request event. After receiving a client request event, the server side obtains the service requirement of the data to be reported according to different scenes and requirements;
and carrying out logic processing and packaging on the data to be reported. Processing according to reporting requirements, such as which clients need to report, reporting opportunities of different clients, differences of reporting parameters among different versions of the clients and other business logics, and calculating data reporting content suitable for the clients;
and encapsulating the data to be reported and sending the data back to the client. And encapsulating the data to be reported according to the reporting protocol specifications formulated by the server and the client, and sending the data back to the client. The data to be reported is sent down by two parts, one part is the known report content of the server and is directly provided to the client as a part of the report content; the other part is data needed to be collected by the specified client, such as mac address, device name, device type, network status, and the like.
And the client side processes the data to be reported according to the data reporting requirement issued by the server side and then sends the reported data to the server side through a network communication protocol. The specific implementation steps are as follows:
and the client receives the report requirement and data issued by the server. And judging whether the data needs to be reported or at what time, and collecting the information required to be collected at the client in the reported data.
And calculating and sending reported data. After the reported data issued by the server and the data to be reported by the client are processed, the data to be reported are sent to the server collection server according to the data reporting requirement and the reporting specification issued by the server, and the complete process of the dynamic reporting of the data is completed.
With reference to fig. 5, the apparatus for dynamically reporting data is further provided in this embodiment, and is applicable to a client, and may include:
a sending unit 501, configured to respond to an operation instruction of a user, and send a request event to a server based on the operation instruction.
A receiving unit 502, configured to receive data to be reported, which is generated by the server according to the request event; the data to be reported comprises a reporting field specified by the server.
The collecting unit 503 is configured to collect, at the client, data matched with the reported field.
An adding unit 504, configured to add the data matched with the reporting field to the data to be reported, so as to obtain supplemented data to be reported.
A sending unit 501, configured to report the supplemented data to be reported to the server.
Optionally, when the sending unit 501 reports the supplemented data to be reported to the server, the sending unit is specifically configured to:
reporting the supplemented data to be reported to the server side according to the reporting parameters carried by the data to be reported; the reporting parameters comprise a reporting switch, a reporting time, a reporting frequency and a reporting address.
Optionally, the apparatus further includes a processing unit 505, configured to, after the supplemented data to be reported is obtained, perform preprocessing on the supplemented data to be reported, so as to obtain processed data to be reported.
When the sending unit 501 reports the supplemented data to be reported to the server, the sending unit is specifically configured to:
and reporting the processed data to be reported to the server.
An embodiment of the present application further provides a device for dynamically reporting data, which is suitable for a server, please refer to fig. 6, where the device may include:
the receiving unit 601 is configured to receive a request event sent by a client.
Wherein, the request event is sent by the client based on the operation instruction of the user.
A generating unit 602, configured to generate data to be reported according to the request event.
The data to be reported comprises a reporting field specified by the server.
A sending unit 603, configured to send data to be reported to the client.
The receiving unit 601 is configured to receive the supplemented to-be-reported data fed back by the client.
And the supplemented data to be reported carries data matched with the reported field.
Optionally, when the generating unit 602 generates the data to be reported according to the request event, the generating unit is specifically configured to:
determining service reporting requirements according to the request event and the current service scene;
acquiring data known by a server side in service reporting requirements, and determining a reporting field according to the service reporting requirements;
and based on the data format specification preset in the reporting protocol, packaging the known data of the server and the reporting field to obtain the data to be reported.
Optionally, the generating unit 602 is further configured to: determining a reporting parameter according to a service reporting requirement; the reporting parameters comprise a reporting switch, a reporting time, a reporting frequency and a reporting address;
the generating unit 602, based on a data format specification preset in the reporting protocol, encapsulates the data known by the server and the reporting field, and when obtaining the data to be reported, is specifically configured to:
and packaging the known data of the server, the report field and the report parameters based on the data format specification preset in the report protocol to obtain the data to be reported.
For the specific working principle of the dynamic data reporting device suitable for the client shown in fig. 5, reference may be made to the steps executed by the client in the dynamic data reporting method provided in the embodiment of the present application, and for the specific working principle of the dynamic data reporting device suitable for the server shown in fig. 6, reference may be made to the steps executed by the server in the dynamic data reporting method provided in the embodiment of the present application, which are not described herein again.
The application provides a device for dynamically reporting data, wherein the device suitable for a client comprises a sending unit 501, a receiving unit and a sending unit, wherein the sending unit responds to an operation instruction of a user and sends a request event to a server based on the operation instruction; the receiving unit 502 receives data to be reported generated by the server according to the request event; the data to be reported comprises a reporting field appointed by the server; the acquisition unit 503 acquires data matched with the reported field at the client; the adding unit 504 adds the data matched with the reporting field to the data to be reported to obtain supplemented data to be reported; the sending unit 501 reports the supplemented data to be reported to the server. In the scheme, after the client is on line, the matched data can be still collected and reported according to the field to be reported specified by the server, so that the dynamic reporting of the data is realized, and the requirement of the server for reporting the data is met in time.
The embodiment of the present application further provides a computer storage medium, which is used for storing a computer program, and when the computer program is executed, the computer program is specifically used for implementing the data dynamic reporting method applicable to the client terminal provided by the present application, or for implementing the data dynamic reporting method applicable to the server terminal provided by the present application.
An electronic device is further provided in the embodiment of the present application, please refer to fig. 7, which includes a memory 701 and a processor 702.
The memory 701 is used for storing a computer program.
The processor 702 is configured to execute the computer program, and is specifically configured to implement the method for dynamically reporting data applicable to the client provided in the embodiment of the present application, or implement the method for dynamically reporting data applicable to the server provided in the embodiment of the present application.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
It should be noted that the terms "first", "second", and the like in the present invention are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
Those skilled in the art can make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for dynamically reporting data is applicable to a client, and the method comprises the following steps:
responding to an operation instruction of a user, and sending a request event to a server based on the operation instruction;
receiving data to be reported generated by the server according to the request event; the data to be reported comprises a reporting field appointed by the server;
collecting data matched with the reported field at the client;
adding the data matched with the reporting field to the data to be reported to obtain supplemented data to be reported;
and reporting the supplemented data to be reported to the server.
2. The method of claim 1, wherein the reporting the supplemented data to be reported to the server comprises:
reporting the supplemented data to be reported to the server side according to the reporting parameters carried by the data to be reported; the reporting parameters comprise a reporting switch, a reporting time, a reporting frequency and a reporting address.
3. The method according to claim 1 or 2, wherein the adding the data matched with the reporting field to the data to be reported to obtain supplemented data to be reported further comprises:
preprocessing the supplemented data to be reported to obtain processed data to be reported;
wherein the reporting the supplemented data to be reported to the server includes:
and reporting the processed data to be reported to the server.
4. A method for dynamically reporting data is applicable to a server, and the method comprises the following steps:
receiving a request event sent by a client; wherein the request event is sent by the client based on an operation instruction of a user;
generating data to be reported according to the request event; the data to be reported comprises a reporting field appointed by the server;
sending the data to be reported to the client;
receiving the supplemented data to be reported fed back by the client; and the supplemented data to be reported carries data matched with the reporting field.
5. The method of claim 4, wherein the generating data to be reported according to the request event comprises:
determining service reporting requirements according to the request event and the current service scene;
acquiring the known data of the server side in the service reporting requirement, and determining a reporting field according to the service reporting requirement;
and based on a data format specification preset in a reporting protocol, packaging the known data of the server and the reporting field to obtain the data to be reported.
6. The method of claim 4, wherein after obtaining the data known to the server in the service reporting requirement and determining the reporting field according to the service reporting requirement, the method further comprises:
determining a reporting parameter according to the service reporting requirement; the reporting parameters comprise a reporting switch, a reporting opportunity, a reporting frequency and a reporting address;
the method for encapsulating the data known by the server and the report field based on the data format specification preset in the report protocol to obtain the data to be reported includes:
and based on a data format specification preset in a reporting protocol, packaging the data known by the server, the reporting field and the reporting parameter to obtain the data to be reported.
7. An apparatus for dynamically reporting data, adapted to a client, the apparatus comprising:
the sending unit is used for responding to an operation instruction of a user and sending a request event to the server based on the operation instruction;
a receiving unit, configured to receive data to be reported, where the data is generated by the server according to the request event; the data to be reported comprises a reporting field appointed by the server;
the acquisition unit is used for acquiring data matched with the reported field at the client;
the adding unit is used for adding the data matched with the reporting field to the data to be reported to obtain supplemented data to be reported;
and the sending unit is used for reporting the supplemented data to be reported to the server.
8. The apparatus of claim 7, wherein when the sending unit reports the supplemented to-be-reported data to the server, the sending unit is specifically configured to:
reporting the supplemented data to be reported to the server side according to the reporting parameters carried by the data to be reported; the reporting parameters comprise a reporting switch, a reporting time, a reporting frequency and a reporting address.
9. An apparatus for dynamically reporting data, which is adapted to a server, the apparatus comprising:
the receiving unit is used for receiving a request event sent by a client; wherein the request event is sent by the client based on an operation instruction of a user;
the generating unit is used for generating data to be reported according to the request event; the data to be reported comprises a reporting field appointed by the server;
a sending unit, configured to send the data to be reported to the client;
the receiving unit is used for receiving the supplemented data to be reported fed back by the client; and the supplemented data to be reported carries data matched with the reporting field.
10. The apparatus according to claim 9, wherein when the generating unit generates the data to be reported according to the request event, the generating unit is specifically configured to:
determining service reporting requirements according to the request event and the current service scene;
acquiring the known data of the server side in the service reporting requirement, and determining a reporting field according to the service reporting requirement;
and based on a data format specification preset in a reporting protocol, packaging the known data of the server and the reporting field to obtain the data to be reported.
CN202110545172.7A 2021-05-19 2021-05-19 Method and device for dynamically reporting data Pending CN113515425A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110545172.7A CN113515425A (en) 2021-05-19 2021-05-19 Method and device for dynamically reporting data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110545172.7A CN113515425A (en) 2021-05-19 2021-05-19 Method and device for dynamically reporting data

Publications (1)

Publication Number Publication Date
CN113515425A true CN113515425A (en) 2021-10-19

Family

ID=78064446

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110545172.7A Pending CN113515425A (en) 2021-05-19 2021-05-19 Method and device for dynamically reporting data

Country Status (1)

Country Link
CN (1) CN113515425A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114513358A (en) * 2022-02-15 2022-05-17 湖南快乐阳光互动娱乐传媒有限公司 Data reporting method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120042051A1 (en) * 1999-10-04 2012-02-16 Google Inc. System and Method for Monitoring and Analyzing Internet Traffic
CN106407092A (en) * 2016-09-30 2017-02-15 广州华多网络科技有限公司 Data reporting method, data reporting device, data statistics method and data statistics device for interface operations
CN108365968A (en) * 2018-01-05 2018-08-03 广州风声计算机有限公司 Data collection and analysis control method and computer storage media, terminal
CN111177625A (en) * 2019-12-24 2020-05-19 深圳市优必选科技股份有限公司 Data acquisition method, data reporting method, terminal device and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120042051A1 (en) * 1999-10-04 2012-02-16 Google Inc. System and Method for Monitoring and Analyzing Internet Traffic
CN106407092A (en) * 2016-09-30 2017-02-15 广州华多网络科技有限公司 Data reporting method, data reporting device, data statistics method and data statistics device for interface operations
CN108365968A (en) * 2018-01-05 2018-08-03 广州风声计算机有限公司 Data collection and analysis control method and computer storage media, terminal
CN111177625A (en) * 2019-12-24 2020-05-19 深圳市优必选科技股份有限公司 Data acquisition method, data reporting method, terminal device and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114513358A (en) * 2022-02-15 2022-05-17 湖南快乐阳光互动娱乐传媒有限公司 Data reporting method and device

Similar Documents

Publication Publication Date Title
WO2021189954A1 (en) Log data processing method and apparatus, computer device, and storage medium
WO2019109518A1 (en) Data list uploading method and terminal thereof
CN103312544B (en) A kind of control terminal reports the method, apparatus and system of journal file
CN108234170A (en) The monitoring method and device of a kind of server cluster
CN110908879A (en) Method, device, terminal and storage medium for reporting buried point data
WO2021151312A1 (en) Method for determining inter-service dependency, and related apparatus
CN111459944B (en) MR data storage method, device, server and storage medium
CN114090366A (en) Method, device and system for monitoring data
CN106982140B (en) Information flow simulation method and system
CN113515425A (en) Method and device for dynamically reporting data
CN109587520B (en) Method and equipment for positioning video service fault
CN111752918A (en) Historical data interaction system and configuration method thereof
CN115086347B (en) Data synchronization method, device, electronic equipment and storage medium
CN113346973B (en) Event prompting method and device, electronic equipment and computer readable storage medium
CN114756301A (en) Log processing method, device and system
CN108805741B (en) Fusion method, device and system of power quality data
CN115114316A (en) Processing method, device, cluster and storage medium for high-concurrency data
CN108400901A (en) Test method, terminal device and the computer readable storage medium of application
CN113157475A (en) Log processing method and device, storage medium and electronic equipment
CN110768855B (en) Method and device for testing linkmzation performance
CN111813621A (en) Data processing method, device, equipment and medium based on Flume data middlebox
CN113138814A (en) Remote assistance method, device, equipment and storage medium
CN113434384A (en) Pressure testing method and device
CN113032477A (en) Long-distance data synchronization method and device based on GTID and computing equipment
CN116302711B (en) Disaster recovery method and device based on cloud platform mirror image, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20211019

RJ01 Rejection of invention patent application after publication