CN112579430A - Processing method and device for collected codes - Google Patents
Processing method and device for collected codes Download PDFInfo
- Publication number
- CN112579430A CN112579430A CN201910944645.3A CN201910944645A CN112579430A CN 112579430 A CN112579430 A CN 112579430A CN 201910944645 A CN201910944645 A CN 201910944645A CN 112579430 A CN112579430 A CN 112579430A
- Authority
- CN
- China
- Prior art keywords
- initial application
- acquisition
- code
- page module
- determining
- 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.)
- Granted
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 27
- 230000006399 behavior Effects 0.000 claims abstract description 64
- 238000000034 method Methods 0.000 claims abstract description 47
- 238000012544 monitoring process Methods 0.000 claims abstract description 9
- 238000012545 processing Methods 0.000 claims description 31
- 238000001514 detection method Methods 0.000 claims description 5
- 238000004891 communication Methods 0.000 claims description 3
- 238000005457 optimization Methods 0.000 abstract description 6
- 238000010586 diagram Methods 0.000 description 9
- 230000000694 effects Effects 0.000 description 9
- 238000011161 development Methods 0.000 description 7
- 238000004590 computer program Methods 0.000 description 6
- 230000008569 process Effects 0.000 description 6
- 238000004458 analytical method Methods 0.000 description 4
- 238000012795 verification Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000004880 explosion Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The application discloses a processing method and device for collecting codes. The method comprises the following steps: determining configuration information, wherein the configuration information at least comprises: the method comprises the steps that a page module corresponding to a behavior to be monitored and a preset acquisition rule corresponding to the behavior to be monitored are obtained; determining an acquisition code corresponding to the preset acquisition rule, and loading the acquisition code in a page module; after the acquisition code is loaded to the page module, monitoring behaviors to be monitored of the page module, and acquiring user data generated by the behaviors to be monitored. By the method and the device, the problems that in the related art, when a developer performs application optimization, a collection method of user behavior data is too redundant and lacks flexibility are solved.
Description
Technical Field
The application relates to the field of page data acquisition, in particular to a method and a device for processing acquired codes.
Background
In the internet era of information explosion, each application program can generate various massive data, and as a developer of the application program, how to find valuable data in the massive data is convenient for optimizing the application, so that the method becomes a primary target of the developer.
The data acquisition and analysis of developers are not required to be carried out by compiling specific acquisition and analysis codes or using mature products on the market, and the codes compiled by the developers usually have specific application scenes and are not universal; the collected analysis codes developed by other developers are too universal and lack some customized functions, and the two modes are deeply coupled with business logic, so that the development process is complicated, later upgrading and optimization are not facilitated, and the flexibility is not enough.
In addition, if a developer performs data acquisition on different events to obtain user behavior data, different acquisition analysis codes need to be inserted into the events in a one-to-one correspondence.
Aiming at the problems that the acquisition method of user behavior data is too redundant and lacks flexibility when a developer performs application optimization in the related technology, an effective solution is not provided at present.
Disclosure of Invention
The application provides a processing method and device for collected codes, and aims to solve the problems that in the related art, when a developer optimizes applications, a collection method for user behavior data is too redundant and lacks flexibility.
According to one aspect of the application, a processing method for collecting codes is provided. The method comprises the following steps: determining configuration information, wherein the configuration information at least comprises: the method comprises the steps that a page module corresponding to a behavior to be monitored and a preset acquisition rule corresponding to the behavior to be monitored are obtained; determining an acquisition code corresponding to the preset acquisition rule, and loading the acquisition code in the page module; and after the acquisition code is loaded to the page module, monitoring the behavior to be monitored of the page module, and acquiring user data generated by the behavior to be monitored.
Optionally, determining the configuration information includes: acquiring and displaying a plurality of preset page modules; receiving first instruction information, and determining a target page module in the plurality of preset acquisition rules according to the first instruction information; acquiring and displaying a plurality of preset acquisition rules; and receiving second instruction information, and determining at least one preset acquisition rule in the plurality of preset acquisition rules according to the second instruction information.
Optionally, the configuration information further includes at least one of: an initial application where the page module is located, a developer identification of the initial application.
Optionally, after the collecting code is loaded into the page module, the method further includes: registering the initial application of the page module in the acquisition code; and initializing the acquisition code.
Optionally, registering the initial application where the page module is located in the collection code includes: acquiring a data port of the initial application; and registering the initial application in the acquisition code according to the data port, wherein the acquisition code which is successfully registered acquires user data from the initial application according to the data port.
Optionally, in a case that the configuration information includes an initial application where the page module is located, the initializing the acquisition code includes: and determining a target application corresponding to the acquisition code and an initial application of the page module, and judging whether the initial application and the target application are consistent.
Optionally, in a case that the target application and the initial application are consistent, it is determined that the initialization of the acquisition code is completed; performing initialization processing on the acquisition code under the condition that the configuration information includes a developer identifier of the initial application, including: identifying a developer identification contained in the collected code, wherein the developer identification contained in the collected code is determined by the developer identification of the initial application contained in the configuration information; verifying whether the initial application approves the developer identification contained in the acquisition code; and determining that the initialization of the acquisition code is completed if the initial application approves the developer identification.
Optionally, in a case that the configuration information includes an initial application where the page module is located and a developer identifier of the initial application, the initializing the acquisition code includes: determining a target application corresponding to the acquisition code and an initial application of the page module, and judging whether the initial application and the target application are consistent; and identifying a developer identification contained in the collected code, wherein the developer identification contained in the collected code is determined by the developer identification of the initial application contained in the configuration information; verifying whether the initial application approves the developer identification contained in the acquisition code; and determining that the initialization of the acquisition code is completed under the condition that the initial application is consistent with the target application and the developer identification is approved by the initial application.
According to another aspect of the present application, a processing apparatus for acquiring a code is provided. The device includes: a determining unit, configured to determine configuration information, where the configuration information at least includes: the method comprises the steps that a page module corresponding to a behavior to be monitored and a preset acquisition rule corresponding to the behavior to be monitored are obtained; the loading unit is used for determining an acquisition code corresponding to the preset acquisition rule and loading the acquisition code in the page module; and the detection unit is used for monitoring the behavior to be monitored of the page module after the acquisition code is loaded to the page module, and acquiring user data generated by the behavior to be monitored.
Optionally, the determining unit includes: the first acquisition module is used for acquiring and displaying a plurality of preset page modules; the first determining module is used for receiving first instruction information and determining a target page module in the plurality of preset acquisition rules according to the first instruction information; the second acquisition module is used for acquiring and displaying a plurality of preset acquisition rules; and the second determining module is used for receiving second instruction information and determining at least one preset acquisition rule in the plurality of preset acquisition rules according to the second instruction information.
Optionally, the configuration information further includes at least one of: an initial application where the page module is located, a developer identification of the initial application.
Optionally, the apparatus further comprises: the registration unit is used for registering the initial application of the page module in the acquisition code after the acquisition code is loaded into the page module; and the initialization unit is used for carrying out initialization processing on the acquisition code.
Optionally, the registration unit includes: an obtaining subunit, configured to obtain a data port of the initial application; and the registration subunit is used for registering the initial application in the acquisition code according to the data port, wherein the acquisition code which is successfully registered acquires user data from the initial application according to the data port.
Optionally, in a case that the configuration information includes an initial application where the page module is located, the initializing unit includes: the first determining subunit is used for determining a target application corresponding to the acquisition code and an initial application of the page module; the judging subunit is used for judging whether the initial application and the target application are consistent; and the second determining subunit is used for determining that the initialization of the acquisition code is completed under the condition that the target application is consistent with the initial application.
Optionally, in a case that the configuration information includes a developer identifier of the initial application, the initializing unit includes: the identification subunit is used for identifying a developer identifier contained in the collected code, wherein the developer identifier contained in the collected code is determined by the developer identifier of the initial application contained in the configuration information; the verification subunit is used for verifying whether the initial application approves the developer identification contained in the acquisition code; a third determining subunit, configured to determine that initialization of the acquisition code is completed if the initial application approves the developer identifier.
Optionally, in a case that the configuration information includes an initial application where the page module is located and a developer identifier of the initial application, the initializing unit includes: the first determining subunit is used for determining a target application corresponding to the acquisition code and an initial application of the page module; the judging subunit is used for judging whether the initial application and the target application are consistent; the identification subunit is used for identifying a developer identifier contained in the collected code, wherein the developer identifier contained in the collected code is determined by the developer identifier of the initial application contained in the configuration information; the verification subunit is used for verifying whether the initial application approves the developer identification contained in the acquisition code; and the fourth determining subunit is used for determining that the initialization of the acquisition code is completed under the condition that the initial application and the target application are consistent and the developer identification is approved by the initial application.
According to another aspect of the present application, there is provided a storage medium including a stored program, wherein the program executes the processing method of acquiring a code described in any one of the above.
According to another aspect of the present application, there is provided an apparatus comprising at least one processor, and at least one memory connected to the processor, a bus; the processor and the memory complete mutual communication through a bus; the processor is used for calling the program instructions in the memory so as to execute any one of the processing methods for acquiring the codes.
Through the application, the following steps are adopted: determining configuration information, wherein the configuration information at least comprises: the method comprises the steps that a page module corresponding to a behavior to be monitored and a preset acquisition rule corresponding to the behavior to be monitored are obtained; determining an acquisition code corresponding to the preset acquisition rule, and loading the acquisition code in the page module; after the acquisition code is loaded to the page module, the behavior to be monitored of the page module is monitored, and the user data generated by the behavior to be monitored is acquired, so that the problems that in the related art, when a developer performs application optimization, the acquisition method of the user behavior data is too redundant and lacks flexibility are solved.
That is, by presetting the configuration acquisition rule, and acquiring the page module and the acquisition rule determined by the user, the acquisition code corresponding to the acquisition rule is automatically loaded in the page module, so that the acquisition code detects the behavior to be monitored of the page module, and the user data generated by the behavior to be monitored is acquired. The technical effect of automatically deploying the collected codes on the designated pages in a configurable mode is achieved, and the problem that development work is complicated due to the fact that the designated codes are added on a plurality of designated pages one by one in a manual mode is solved.
At the moment, if the designated page is upgraded and optimized, the technical effect of replacing the old acquisition code with the new acquisition code can be realized by the processing method of the acquisition code; in addition, the processing method for acquiring the codes also achieves the technical effect that the codes are not immersed in business logic during development, so that the page acquisition mode is more free and flexible.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the application and, together with the description, serve to explain the application and are not intended to limit the application. In the drawings:
FIG. 1 is a flow chart of a processing method for collecting codes according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a processing device for acquiring codes according to an embodiment of the present application; and
fig. 3 is a schematic diagram of a processing device for acquiring codes according to an embodiment of the present application.
Detailed Description
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all 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 application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an embodiment of the application, a processing method for collecting codes is provided.
Fig. 1 is a flowchart of a processing method of acquiring a code according to an embodiment of the present application. As shown in fig. 1, the method comprises the steps of:
step S102, determining configuration information, wherein the configuration information at least comprises: the monitoring system comprises a page module corresponding to a behavior to be monitored and a preset acquisition rule corresponding to the behavior to be monitored.
Optionally, the behavior to be detected may be: and opening the appointed page by the user, sharing the appointed page by the user, and enabling the time for the user to browse the appointed page to exceed a preset threshold value.
Optionally, the page module corresponding to the behavior to be detected may be: specified page/specified web page.
Optionally, the preset collection rule may be: and when the behavior to be monitored occurs, collecting user data of a specified user.
For example: when a user opens a specified page, collecting user data of the opener; when a user shares a designated page, collecting user data of a sharer and/or a sharee; and when the time for the user to browse the specified page exceeds a preset threshold value, acquiring user data of the browser.
In one optional example, determining the configuration information comprises: acquiring and displaying a plurality of preset page modules; and receiving first instruction information, and determining a target page module in the plurality of preset acquisition rules according to the first instruction information.
For example, the following steps are carried out: there is a processing system, wherein the processing system applies the processing method for acquiring the code provided by the embodiment of the application. Specifically, the processing system is provided with a server and at least one front end, wherein the server provides a query interface URL of configuration information. When the user triggers the query interface URL of the configuration information through the front end, the server side feeds back a plurality of page modules configured in advance to the front end and displays the page modules on the front end. At this time, the user selects one target page module from the plurality of page modules displayed at the front end and returns the selected target page module to the server.
In one optional example, determining the configuration information comprises: and acquiring third instruction information, wherein the third instruction information is used for describing a page module of the configuration information, and determining the page module of the configuration information according to the third instruction information.
For example, the following steps are carried out: there is a processing system, wherein the processing system applies the processing method for acquiring the code provided by the embodiment of the application. Specifically, the processing system is provided with a server and at least one front end, wherein a user can input page information through the front end, and the page information can be a webpage address. The front end feeds the page information back to the server after receiving the page information input by the user, and the server determines the page module in the configuration information according to the page information.
In one optional example, determining the configuration information comprises: acquiring and displaying a plurality of preset acquisition rules; and receiving second instruction information, and determining at least one preset acquisition rule in the plurality of preset acquisition rules according to the second instruction information.
For example, the following steps are carried out: there is a processing system, wherein the processing system applies the processing method for acquiring the code provided by the embodiment of the application. Specifically, the processing system is provided with a server and at least one front end, wherein the server provides a query interface URL of configuration information. When the user triggers the query interface URL of the configuration information through the front end, the server side feeds back a plurality of preset acquisition rules configured in advance to the front end and displays the rules on the front end. At this time, the user selects at least one preset acquisition rule from the plurality of preset acquisition rules displayed at the front end, and returns the selected at least one preset acquisition rule to the server.
It should be noted that: the at least one front end provided by the processing system may correspond to at least one user, i.e., different users may be configured with different front ends.
It should be noted that: in order to avoid that the determined preset collection rule cannot be applied to the determined page module, in an optional example, determining the configuration information includes: determining a page module corresponding to a behavior to be monitored, and then determining a preset acquisition rule corresponding to the behavior to be monitored according to the determined page module.
For example, the following steps are carried out: the page A can only be configured with a preset acquisition rule a, a preset acquisition rule B and a preset acquisition rule c, and the page B can only be configured with a preset acquisition rule c and a preset acquisition rule d. At this time, when the user determines that the page module is the page a, the preset acquisition rule displayed for the user is further: the method comprises the steps that a preset collection rule a, a preset collection rule b and a preset collection rule c (the preset collection rule d is not included), and at the moment, a user selects at least one preset collection rule from the preset collection rule a, the preset collection rule b and the preset collection rule c as the content of configuration information.
Furthermore, the configuration information further comprises at least one of: an initial application where the page module is located, a developer identification of the initial application.
Preferably, the configuration information further includes an initial application where the page module is located; or, the configuration information further includes an initial application where the page module is located and a developer identification of the initial application.
In an optional example, in a case that the initial application satisfies a preset condition, the configuration information further includes a developer identifier of the initial application; and under the condition that the initial application does not meet the preset condition, the configuration information does not contain the developer identification of the initial application.
If the initial application needs to allow the acquisition of codes to acquire user data under the condition of authenticating the identifier of a developer, determining that the initial application meets a preset condition; if the initial application does not need to be under the condition of authenticating the identification of a developer, the collected codes are allowed to acquire user data, and the initial application is determined not to meet the preset condition.
And step S104, determining the acquisition code corresponding to the preset acquisition rule, and loading the acquisition code in the page module.
It should be noted that: the preset acquisition rule and the acquisition code are generated in advance, and the acquisition code is generated corresponding to the preset acquisition rule. That is, after the server determines the preset acquisition rule, the acquisition code corresponding to the preset acquisition rule is extracted from the database, and the acquisition code is loaded in the page module.
In an optional example, after the acquisition code is loaded into the page module, the method further comprises: registering the initial application of the page module in the acquisition code; and carrying out initialization processing on the acquisition code.
Optionally, registering the initial application where the page module is located in the collection code includes: acquiring a data port of the initial application; and registering the initial application in the acquisition code according to the data port, wherein the acquisition code which is successfully registered acquires user data from the initial application according to the data port.
For example, the following steps are carried out: the method comprises the steps of firstly obtaining a data port of the WeChat platform, and registering the WeChat platform in an acquisition code according to the data port so that the acquisition code can obtain user data in the WeChat platform through the data port.
Optionally, in a case that the configuration information includes an initial application where the page module is located, the initializing the acquisition code includes: determining a target application corresponding to the acquisition code and an initial application of the page module, and judging whether the initial application and the target application are consistent; under the condition that the target application is consistent with the initial application, determining that the initialization of the acquisition code is completed;
that is, not all the collected codes may be applied to any application platform, and in order to avoid the initial application of the page module loaded by the collected codes, the collected codes are an application platform to which the collected codes cannot be applied, therefore, after the collected codes are loaded to the page module, whether the target application loaded by the collected codes is consistent with the initial application of the page module is verified again, and the collected codes are determined to be initialized when the target application is consistent with the initial application.
Optionally, in a case that the configuration information includes a developer identifier of the initial application, performing initialization processing on the acquisition code, including: identifying a developer identification contained in the collected code, wherein the developer identification contained in the collected code is determined by the developer identification of the initial application contained in the configuration information; verifying whether the initial application approves the developer identification contained in the acquisition code; and determining that the initialization of the acquisition code is completed if the initial application approves the developer identification.
It should be noted that: after some application platforms need to authenticate ID information, the acquisition codes can be allowed to acquire user data from the application platforms; for example, a user may register a developer ID from the wechat platform, which may allow the successfully registered developer ID to obtain user data from the wechat platform. Therefore, in order to ensure that the acquisition code can successfully acquire the user data from the initial platform, after the acquisition code is loaded to the page module, it is necessary to verify whether the initial application approves the developer identifier included in the acquisition code, and determine that the initialization of the acquisition code is completed when the initial application approves the developer identifier.
It should be noted that: if the initial application where the page module is located does not need to authenticate ID information, the collected code can obtain user data, and the developer identification contained in the collected code does not need to be identified, and whether the initial application approves the developer identification contained in the collected code does not need to be verified.
Optionally, in a case that the configuration information includes an initial application where the page module is located and a developer identifier of the initial application, the initializing the acquisition code includes: determining a target application corresponding to the acquisition code and an initial application of the page module, and judging whether the initial application and the target application are consistent; and identifying a developer identification contained in the collected code, wherein the developer identification contained in the collected code is determined by the developer identification of the initial application contained in the configuration information; verifying whether the initial application approves the developer identification contained in the acquisition code; and determining that the initialization of the acquisition code is completed under the condition that the initial application is consistent with the target application and the developer identification is approved by the initial application.
Step S106, after the acquisition code is loaded to the page module, monitoring the behavior to be monitored of the page module, and acquiring user data generated by the behavior to be monitored.
That is, after the acquisition code is loaded to the page module, the acquisition code is used to monitor the behavior to be monitored of the page module, and when the behavior to be monitored is triggered, the corresponding user data is acquired.
The processing method for acquiring the code provided by the embodiment of the application determines the configuration information, wherein the configuration information at least comprises the following steps: the method comprises the steps that a page module corresponding to a behavior to be monitored and a preset acquisition rule corresponding to the behavior to be monitored are obtained; determining an acquisition code corresponding to the preset acquisition rule, and loading the acquisition code in the page module; after the acquisition code is loaded to the page module, the behavior to be monitored of the page module is monitored, and the user data generated by the behavior to be monitored is acquired, so that the problems that in the related art, when a developer performs application optimization, the acquisition method of the user behavior data is too redundant and lacks flexibility are solved.
That is, by presetting the configuration acquisition rule, and acquiring the page module and the acquisition rule determined by the user, the acquisition code corresponding to the acquisition rule is automatically loaded in the page module, so that the acquisition code detects the behavior to be monitored of the page module, and the user data generated by the behavior to be monitored is acquired. The technical effect of automatically deploying the collected codes on the designated pages in a configurable mode is achieved, and the problem that development work is complicated due to the fact that the designated codes are added on a plurality of designated pages one by one in a manual mode is solved.
At the moment, if the designated page is upgraded and optimized, the technical effect of replacing the old acquisition code with the new acquisition code can be realized by the processing method of the acquisition code; in addition, the processing method for acquiring the codes also achieves the technical effect that the codes are not immersed in business logic during development, so that the page acquisition mode is more free and flexible.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
The embodiment of the present application further provides a processing apparatus for acquiring a code, and it should be noted that the processing apparatus for acquiring a code of the embodiment of the present application may be used to execute the processing method for acquiring a code provided in the embodiment of the present application. The following describes a processing apparatus for acquiring a code according to an embodiment of the present application.
Fig. 2 is a schematic diagram of a processing device for acquiring codes according to an embodiment of the present application. As shown in fig. 2, the apparatus includes: a determination unit 21, a loading unit 22 and a detection unit 23.
A determining unit 21, configured to determine configuration information, where the configuration information at least includes: the monitoring system comprises a page module corresponding to a behavior to be monitored and a preset acquisition rule corresponding to the behavior to be monitored.
And the loading unit 22 is configured to determine an acquisition code corresponding to the preset acquisition rule, and load the acquisition code in the page module.
The detection unit 23 is configured to monitor a behavior to be monitored of the page module after the acquisition code is loaded to the page module, and acquire user data generated by the behavior to be monitored.
Optionally, the determining unit 21 includes: the first acquisition module is used for acquiring and displaying a plurality of preset page modules; the first determining module is used for receiving first instruction information and determining a target page module in the plurality of preset acquisition rules according to the first instruction information; the second acquisition module is used for acquiring and displaying a plurality of preset acquisition rules; and the second determining module is used for receiving second instruction information and determining at least one preset acquisition rule in the plurality of preset acquisition rules according to the second instruction information.
Optionally, the configuration information further includes at least one of: an initial application where the page module is located, a developer identification of the initial application.
Optionally, the apparatus further comprises: the registration unit is used for registering the initial application of the page module in the acquisition code after the acquisition code is loaded into the page module; and the initialization unit is used for carrying out initialization processing on the acquisition code.
Optionally, the registration unit includes: an obtaining subunit, configured to obtain a data port of the initial application; and the registration subunit is used for registering the initial application in the acquisition code according to the data port, wherein the acquisition code which is successfully registered acquires user data from the initial application according to the data port.
Optionally, in a case that the configuration information includes an initial application where the page module is located, the initializing unit includes: the first determining subunit is used for determining a target application corresponding to the acquisition code and an initial application of the page module; the judging subunit is used for judging whether the initial application and the target application are consistent; and the second determining subunit is used for determining that the initialization of the acquisition code is completed under the condition that the target application is consistent with the initial application.
Optionally, in a case that the configuration information includes a developer identifier of the initial application, the initializing unit includes: the identification subunit is used for identifying a developer identifier contained in the collected code, wherein the developer identifier contained in the collected code is determined by the developer identifier of the initial application contained in the configuration information; the verification subunit is used for verifying whether the initial application approves the developer identification contained in the acquisition code; a third determining subunit, configured to determine that initialization of the acquisition code is completed if the initial application approves the developer identifier.
Optionally, in a case that the configuration information includes an initial application where the page module is located and a developer identifier of the initial application, the initializing unit includes: the first determining subunit is used for determining a target application corresponding to the acquisition code and an initial application of the page module; the judging subunit is used for judging whether the initial application and the target application are consistent; the identification subunit is used for identifying a developer identifier contained in the collected code, wherein the developer identifier contained in the collected code is determined by the developer identifier of the initial application contained in the configuration information; the verification subunit is used for verifying whether the initial application approves the developer identification contained in the acquisition code; and the fourth determining subunit is used for determining that the initialization of the acquisition code is completed under the condition that the initial application and the target application are consistent and the developer identification is approved by the initial application.
The processing apparatus for acquiring a code provided in the embodiment of the present application determines configuration information through the determining unit 21, where the configuration information at least includes: the method comprises the steps that a page module corresponding to a behavior to be monitored and a preset acquisition rule corresponding to the behavior to be monitored are obtained; the loading unit 22 determines an acquisition code corresponding to the preset acquisition rule, and loads the acquisition code in the page module; after the acquisition code is loaded to the page module, the detection unit 23 monitors the behavior to be monitored of the page module, and acquires the user data generated by the behavior to be monitored, so that the problem that the acquisition method of the user behavior data is too redundant and lacks flexibility when a developer performs application optimization in the related art is solved.
That is, by presetting the configuration acquisition rule, and acquiring the page module and the acquisition rule determined by the user, the acquisition code corresponding to the acquisition rule is automatically loaded in the page module, so that the acquisition code detects the behavior to be monitored of the page module, and the user data generated by the behavior to be monitored is acquired. The technical effect of automatically deploying the collected codes on the designated pages in a configurable mode is achieved, and the problem that development work is complicated due to the fact that the designated codes are added on a plurality of designated pages one by one in a manual mode is solved.
At the moment, if the designated page is upgraded and optimized, the technical effect of replacing the old acquisition code with the new acquisition code can be realized by the processing method of the acquisition code; in addition, the processing method for acquiring the codes also achieves the technical effect that the codes are not immersed in business logic during development, so that the page acquisition mode is more free and flexible.
The processing device for acquiring codes comprises a processor and a memory, wherein the determining unit 21, the loading unit 22, the detecting unit 23 and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more, and the technical purpose of deploying the acquisition code on a specified page automatically in a configurable mode by adjusting the kernel parameters.
An embodiment of the present invention provides a storage medium, on which a program is stored, and the program implements a processing method of the acquisition code when executed by a processor.
The embodiment of the invention provides a processor, which is used for running a program, wherein the processing method for acquiring codes is executed when the program runs.
As shown in fig. 3, an embodiment of the present invention provides an apparatus 70, where the apparatus 70 includes at least one processor 701, and at least one memory 702 and a bus 703 connected to the processor 701; the processor 701 and the memory 702 complete mutual communication through a bus 703; the processor 701 is configured to call the program instructions in the memory 702 to execute the above processing method for acquiring the code. The device 70 herein may be a server, a PC, a PAD, a cell phone, etc.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device: determining configuration information, wherein the configuration information at least comprises: the method comprises the steps that a page module corresponding to a behavior to be monitored and a preset acquisition rule corresponding to the behavior to be monitored are obtained; determining an acquisition code corresponding to the preset acquisition rule, and loading the acquisition code in the page module; and after the acquisition code is loaded to the page module, monitoring the behavior to be monitored of the page module, and acquiring user data generated by the behavior to be monitored.
Optionally, determining the configuration information includes: acquiring and displaying a plurality of preset page modules; receiving first instruction information, and determining a target page module in the plurality of preset acquisition rules according to the first instruction information; acquiring and displaying a plurality of preset acquisition rules; and receiving second instruction information, and determining at least one preset acquisition rule in the plurality of preset acquisition rules according to the second instruction information.
Optionally, the configuration information further includes at least one of: an initial application where the page module is located, a developer identification of the initial application.
Optionally, after the collecting code is loaded into the page module, the method further includes: registering the initial application of the page module in the acquisition code; and initializing the acquisition code.
Optionally, registering the initial application where the page module is located in the collection code includes: acquiring a data port of the initial application; and registering the initial application in the acquisition code according to the data port, wherein the acquisition code which is successfully registered acquires user data from the initial application according to the data port.
Optionally, in a case that the configuration information includes an initial application where the page module is located, the initializing the acquisition code includes: and determining a target application corresponding to the acquisition code and an initial application of the page module, and judging whether the initial application and the target application are consistent.
Optionally, in a case that the target application and the initial application are consistent, it is determined that the initialization of the acquisition code is completed; performing initialization processing on the acquisition code under the condition that the configuration information includes a developer identifier of the initial application, including: identifying a developer identification contained in the collected code, wherein the developer identification contained in the collected code is determined by the developer identification of the initial application contained in the configuration information; verifying whether the initial application approves the developer identification contained in the acquisition code; and determining that the initialization of the acquisition code is completed if the initial application approves the developer identification.
Optionally, in a case that the configuration information includes an initial application where the page module is located and a developer identifier of the initial application, the initializing the acquisition code includes: determining a target application corresponding to the acquisition code and an initial application of the page module, and judging whether the initial application and the target application are consistent; and identifying a developer identification contained in the collected code, wherein the developer identification contained in the collected code is determined by the developer identification of the initial application contained in the configuration information; verifying whether the initial application approves the developer identification contained in the acquisition code; and determining that the initialization of the acquisition code is completed under the condition that the initial application is consistent with the target application and the developer identification is approved by the initial application.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a device includes one or more processors (CPUs), memory, and a bus. The device may also include input/output interfaces, network interfaces, and the like.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip. The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that 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 the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims (10)
1. A processing method for collecting codes is characterized by comprising the following steps:
determining configuration information, wherein the configuration information at least comprises: the method comprises the steps that a page module corresponding to a behavior to be monitored and a preset acquisition rule corresponding to the behavior to be monitored are obtained;
determining an acquisition code corresponding to the preset acquisition rule, and loading the acquisition code in the page module;
and after the acquisition code is loaded to the page module, monitoring the behavior to be monitored of the page module, and acquiring user data generated by the behavior to be monitored.
2. The method of claim 1, wherein determining configuration information comprises:
acquiring and displaying a plurality of preset page modules; receiving first instruction information, and determining a target page module in the preset acquisition rules according to the first instruction information;
acquiring and displaying a plurality of preset acquisition rules; and receiving second instruction information, and determining at least one preset acquisition rule in the plurality of preset acquisition rules according to the second instruction information.
3. The method of claim 1, wherein the configuration information further comprises at least one of: an initial application where the page module is located, a developer identification of the initial application.
4. The method of claim 3, wherein after the acquisition code is loaded into the page module, the method further comprises:
registering the initial application of the page module in the acquisition code; and
and initializing the acquisition code.
5. The method of claim 4, wherein registering the initial application in which the page module is located in the acquisition code comprises:
acquiring a data port of the initial application;
and registering the initial application in the acquisition code according to the data port, wherein the acquisition code which is successfully registered acquires user data from the initial application according to the data port.
6. The method of claim 4,
when the configuration information includes an initial application where the page module is located, the initializing the acquisition code includes: determining a target application corresponding to the acquisition code and an initial application of the page module, and judging whether the initial application and the target application are consistent; under the condition that the target application is consistent with the initial application, determining that the initialization of the acquisition code is completed;
performing initialization processing on the acquisition code under the condition that the configuration information includes a developer identifier of the initial application, including: identifying a developer identification contained in the collected code, wherein the developer identification contained in the collected code is determined by the developer identification of the initial application contained in the configuration information; verifying whether the initial application approves the developer identification contained in the acquisition code; and determining that the initialization of the acquisition code is completed if the initial application approves the developer identification;
under the condition that the configuration information comprises an initial application where the page module is located and a developer identifier of the initial application, initializing the acquisition code, including: determining a target application corresponding to the acquisition code and an initial application of the page module, and judging whether the initial application and the target application are consistent; and identifying a developer identification contained in the collected code, wherein the developer identification contained in the collected code is determined by the developer identification of the initial application contained in the configuration information; verifying whether the initial application approves the developer identification contained in the acquisition code; and determining that the initialization of the acquisition code is completed under the condition that the initial application is consistent with the target application and the developer identification is approved by the initial application.
7. A processing apparatus for collecting code, comprising:
a determining unit, configured to determine configuration information, where the configuration information at least includes: the method comprises the steps that a page module corresponding to a behavior to be monitored and a preset acquisition rule corresponding to the behavior to be monitored are obtained;
the loading unit is used for determining an acquisition code corresponding to the preset acquisition rule and loading the acquisition code in the page module;
and the detection unit is used for monitoring the behavior to be monitored of the page module after the acquisition code is loaded to the page module, and acquiring user data generated by the behavior to be monitored.
8. The apparatus of claim 7, wherein the configuration information further comprises at least one of: an initial application where the page module is located, a developer identification of the initial application.
9. A storage medium characterized by comprising a stored program, wherein the program executes the processing method of acquiring a code according to any one of claims 1 to 6.
10. An apparatus comprising at least one processor, and at least one memory connected to the processor, a bus; the processor and the memory complete mutual communication through a bus; the processor is used for calling the program instructions in the memory to execute the processing method for acquiring the codes in any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910944645.3A CN112579430B (en) | 2019-09-30 | 2019-09-30 | Processing method and device for acquisition codes |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910944645.3A CN112579430B (en) | 2019-09-30 | 2019-09-30 | Processing method and device for acquisition codes |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112579430A true CN112579430A (en) | 2021-03-30 |
CN112579430B CN112579430B (en) | 2024-07-26 |
Family
ID=75116845
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910944645.3A Active CN112579430B (en) | 2019-09-30 | 2019-09-30 | Processing method and device for acquisition codes |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112579430B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1949259A (en) * | 2006-01-28 | 2007-04-18 | 商助科技(北京)有限公司 | Method for point contacting information of collecting web page by embedding code in web page |
KR100993936B1 (en) * | 2009-09-22 | 2010-11-11 | 주식회사 두리온 | System for verifying legitimate program user and method thereof |
CN105740137A (en) * | 2014-12-08 | 2016-07-06 | 阿里巴巴集团控股有限公司 | Bucket test method, device and system, and method and device for providing configuration information |
CN106294614A (en) * | 2016-08-01 | 2017-01-04 | 华为技术有限公司 | Method and apparatus for access service |
CN109446457A (en) * | 2018-09-25 | 2019-03-08 | 平安普惠企业管理有限公司 | Update method, terminal device and the medium of page data |
CN110287436A (en) * | 2019-05-21 | 2019-09-27 | 深圳壹账通智能科技有限公司 | Detect page load time method, apparatus, equipment and storage medium |
-
2019
- 2019-09-30 CN CN201910944645.3A patent/CN112579430B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1949259A (en) * | 2006-01-28 | 2007-04-18 | 商助科技(北京)有限公司 | Method for point contacting information of collecting web page by embedding code in web page |
KR100993936B1 (en) * | 2009-09-22 | 2010-11-11 | 주식회사 두리온 | System for verifying legitimate program user and method thereof |
CN105740137A (en) * | 2014-12-08 | 2016-07-06 | 阿里巴巴集团控股有限公司 | Bucket test method, device and system, and method and device for providing configuration information |
CN106294614A (en) * | 2016-08-01 | 2017-01-04 | 华为技术有限公司 | Method and apparatus for access service |
CN109446457A (en) * | 2018-09-25 | 2019-03-08 | 平安普惠企业管理有限公司 | Update method, terminal device and the medium of page data |
CN110287436A (en) * | 2019-05-21 | 2019-09-27 | 深圳壹账通智能科技有限公司 | Detect page load time method, apparatus, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN112579430B (en) | 2024-07-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107193750B (en) | Script recording method and device | |
US20160378989A1 (en) | Apparatus and method for monitoring android platform-based application | |
CN105283849A (en) | Parallel tracing for performance and detail | |
US9665465B1 (en) | Automated determination of application permissions | |
CN105122230A (en) | Tracing as a service | |
CN105607986A (en) | Acquisition method and device of user behavior log data | |
CN109598526B (en) | Method and device for analyzing media contribution | |
JP2017514218A (en) | Running third-party applications | |
CN110213234B (en) | Application program file developer identification method, device, equipment and storage medium | |
CN107370804B (en) | Software application processing method and device | |
CN108804399B (en) | Form verification method and device | |
CN109783341A (en) | Regression testing method and device | |
CN109446753A (en) | Detect method, apparatus, computer equipment and the storage medium of pirate application program | |
CN110688168A (en) | Method, device and equipment for improving starting speed of application program and storage medium | |
CN107798064A (en) | Page processing method, electronic equipment and computer-readable recording medium | |
CN111597557A (en) | Malicious application detection method, system, device, equipment and storage medium | |
CN108647139B (en) | System test method, device, storage medium and electronic device | |
CN112579430B (en) | Processing method and device for acquisition codes | |
CN105162799A (en) | Method for checking whether client is legal mobile terminal or not and server | |
CN113902458A (en) | Malicious user identification method and device and computer equipment | |
CN114282940A (en) | Method and apparatus for intention recognition, storage medium, and electronic device | |
CN111338946A (en) | Android simulator detection method and device | |
CN110874238A (en) | Online service updating method and device | |
CN114490241B (en) | Chip monitoring method, system, storage medium and device | |
CN116150542B (en) | Dynamic page generation method and device 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |