CN111695064B - Buried point loading method and device - Google Patents

Buried point loading method and device Download PDF

Info

Publication number
CN111695064B
CN111695064B CN202010358491.2A CN202010358491A CN111695064B CN 111695064 B CN111695064 B CN 111695064B CN 202010358491 A CN202010358491 A CN 202010358491A CN 111695064 B CN111695064 B CN 111695064B
Authority
CN
China
Prior art keywords
target
webpage
point
system environment
buried
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.)
Active
Application number
CN202010358491.2A
Other languages
Chinese (zh)
Other versions
CN111695064A (en
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.)
Beijing Chengshi Wanglin Information Technology Co Ltd
Original Assignee
Beijing Chengshi Wanglin Information Technology 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 Beijing Chengshi Wanglin Information Technology Co Ltd filed Critical Beijing Chengshi Wanglin Information Technology Co Ltd
Priority to CN202010358491.2A priority Critical patent/CN111695064B/en
Publication of CN111695064A publication Critical patent/CN111695064A/en
Application granted granted Critical
Publication of CN111695064B publication Critical patent/CN111695064B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a buried point loading method and device. Thus, when the webpage is loaded, the terminal can selectively load the embedded point JS file based on the system environment, for example, the embedded point JS file which corresponds to the target function service and is suitable for the system environment can be loaded, and the embedded point JS file which corresponds to the target function service and is not suitable for the system environment can be not loaded, so that the number of the loaded embedded point JS files can be reduced, and further, the loading efficiency of the webpage can be improved, the system resources can be saved, and the user experience can be improved. Secondly, because the embedded point JS data is only loaded once in the webpage, system resources can be saved and the efficiency of loading the webpage can be improved. And the embedded point JS files are not scattered in the page data corresponding to each functional service, but are loaded in the global data in the page data of the webpage, and then the embedded point JS files can be uniformly maintained in the global data, so that the difficulty in maintaining the embedded point JS files is reduced.

Description

Buried point loading method and device
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for loading buried points.
Background
With the development of the internet, in order to count the time feature and information demand feature of the user accessing the web page and improve the web page, the access data of the vast user to the web page needs to be collected, and the access data is generally collected by using buried points.
Wherein, the statistical logic can be added in the function business of the webpage. For example, embedded point JS files are embedded in the web page, and the number of times a link or button is clicked can be counted based on the embedded point JS files.
When a terminal accesses a webpage, the terminal can acquire page data of the webpage from a server of the webpage, and then in the process of rendering the page data, the terminal always loads embedded point JS files corresponding to any one function service in the webpage on each application program; thus, a plurality of embedded point JS files with the same statistical function are loaded for each functional service, wherein the embedded point JS files with the same statistical function are respectively applicable to different application programs.
However, this results in a less efficient rendering of pages, a less user experience, and wasted system resources.
Disclosure of Invention
In order to solve the technical problems, the application discloses a buried point loading method and a buried point loading device.
In a first aspect, the present application shows a buried point loading method, the method comprising:
under the condition of loading a webpage, determining a system environment for loading the webpage;
determining a target buried point applicable to the system environment from a plurality of types of buried points corresponding to the target functional service in the webpage;
acquiring a buried point JS file corresponding to the target buried point;
loading the JS file of the buried point in the global data of the webpage, and respectively marking the type of the target buried point in the page data of each target service function in a plurality of target function services in the webpage.
In an alternative implementation, the determining a system environment for loading the web page includes:
acquiring a domain name used when acquiring a webpage from a server of the webpage;
and determining the system environment according to the domain name.
In an alternative implementation, the determining a system environment for loading the web page includes:
acquiring an application program used when acquiring a webpage from a server of the webpage;
and determining the system environment according to the application program.
In an optional implementation manner, the determining, among the multiple types of buried points corresponding to the target function service in the web page, a target buried point applicable to the system environment includes:
And searching the buried point corresponding to the system environment in the corresponding relation between the system environment and the buried point corresponding to the target service function.
In an optional implementation manner, the obtaining the embedded point JS file corresponding to the target embedded point includes:
a link which is sent by a server of a receiving webpage and used for acquiring a buried point JS file;
sending an acquisition request for acquiring the embedded point JS file corresponding to the target embedded point to a server of the webpage based on the link;
and receiving the embedded point JS file corresponding to the target embedded point returned by the server of the webpage according to the acquisition request.
In an alternative implementation, the method further includes:
under the condition of triggering the target function service, invoking the embedded point parameter of the target embedded point in page data of the target function service;
converting the format of the buried point parameters into a preset format;
calling a preset unified buried point sending function based on buried point parameters in a preset format;
and transmitting buried point parameters in a preset format based on a preset unified buried point transmitting function.
In a second aspect, the present application is directed to a buried point loading apparatus, comprising:
The first determining module is used for determining a system environment for loading the webpage under the condition of loading the webpage;
the second determining module is used for determining a target buried point applicable to the system environment in a plurality of types of buried points corresponding to the target function service in the webpage;
the acquisition module is used for acquiring the embedded point JS file corresponding to the target embedded point;
the loading module is used for loading the JS file of the buried point on the global data of the webpage;
and the marking module is used for marking the type of the target buried point in the page data of each target service function in the multiple target function services in the webpage respectively.
In an alternative implementation, the first determining module includes:
a first obtaining unit configured to obtain a domain name used when obtaining a web page from a server of the web page;
and the first determining unit is used for determining the system environment according to the domain name.
In an alternative implementation, the first determining module includes:
a second acquisition unit configured to acquire an application program used when acquiring a web page from a server of the web page;
and the second determining unit is used for determining the system environment according to the application program.
In an alternative implementation, the second determining module is specifically configured to: and searching the buried point corresponding to the system environment in the corresponding relation between the system environment and the buried point corresponding to the target service function.
In an alternative implementation, the acquiring module includes:
the first receiving unit is used for receiving a link which is sent by a server of a webpage and used for acquiring a buried point JS file;
the sending unit is used for sending an acquisition request for acquiring the embedded point JS file corresponding to the target embedded point to a server of the webpage based on the link;
and the second receiving unit is used for receiving the embedded point JS file corresponding to the target embedded point returned by the server of the webpage according to the acquisition request.
In an alternative implementation, the apparatus further includes:
the first calling module is used for calling the embedding point parameters of the target embedding point in the page data of the target function service under the condition that the target function service is triggered;
the conversion module is used for converting the format of the buried point parameters into a preset format;
the second calling module is used for calling a preset unified buried point sending function based on the buried point parameters in the preset format;
And the transmitting module is used for transmitting the buried point parameters in the preset format based on the preset unified buried point transmitting function.
In a third aspect, the present application shows an electronic device comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the buried point loading method as described in the first aspect.
In a fourth aspect, the application features a non-transitory computer readable storage medium that, when executed by a processor of an electronic device, enables the electronic device to perform a buried point loading method as described in the first aspect.
In a fifth aspect, the application shows a computer program product, which when executed by a processor of an electronic device, causes the electronic device to perform the buried point loading method as described in the first aspect.
The technical scheme provided by the application can comprise the following beneficial effects:
in the application, under the condition of loading the webpage, determining the system environment for loading the webpage; determining a target buried point applicable to the system environment from a plurality of buried points corresponding to the target function service in the webpage; acquiring a buried point JS file corresponding to a target buried point; loading the JS file of the buried point in the global data of the webpage, and respectively marking the type of the target buried point in the page data of each target service function in a plurality of target function services in the webpage.
Thus, when the webpage is loaded, the terminal can selectively load the embedded point JS file based on the system environment, for example, the embedded point JS file which corresponds to the target function service and is suitable for the system environment can be loaded, and the embedded point JS file which corresponds to the target function service and is not suitable for the system environment can be not loaded, so that the number of the loaded embedded point JS files can be reduced, and further, the loading efficiency of the webpage can be improved, the system resources can be saved, and the user experience can be improved.
Secondly, because the embedded point JS data is only loaded once in the webpage, system resources can be saved and the efficiency of loading the webpage can be improved. And the embedded point JS files are not scattered in the page data corresponding to each functional service, but are loaded in the global data in the page data of the webpage, and then the embedded point JS files can be uniformly maintained in the global data, so that the difficulty in maintaining the embedded point JS files is reduced.
Drawings
FIG. 1 is a flow chart of steps of a buried point loading method of the present application;
FIG. 2 is a block diagram of a buried point loading apparatus of the present application;
FIG. 3 is a block diagram of an electronic device shown in the present application;
fig. 4 is a block diagram of an electronic device in accordance with the present application.
Detailed Description
In order that the above-recited objects, features and advantages of the present application will become more readily apparent, a more particular description of the application will be rendered by reference to the appended drawings and appended detailed description.
Referring to fig. 1, a step flow diagram of a buried point loading method of the present application is shown, and the method specifically may include the following steps:
in step S101, in the case of loading a web page, determining a system environment in which the web page is loaded;
in the application, a technician can develop a webpage and then store the webpage data of the webpage in a server of the webpage so as to enable a large number of users to acquire the webpage data to access the webpage.
In the present application, a user can use a web page accessed by a terminal, wherein the user can install an application on the terminal and then access the web page based on the application, the application including a browser and the like, and of course, various specific-function applications having a function of accessing the web page in addition to its specific function, for example, a game application, the user can use it to access the web page in addition to playing a game, and further, for example, a shopping application, the user can use it to access the web page in addition to shopping.
Thus, for any one of the web pages in the web page servers, when the user needs to access the web page, the user can access the web page based on different application programs on the terminal.
However, the computer programming language may be different in different applications, thereby making the class libraries, functions, code architecture, etc. different in different applications.
In this way, the technician needs to store in advance a plurality of sets of page data of the web page in the server of the web page, and the contents of the web page presented after the page data of the plurality of sets of web page are respectively rendered are the same, but the computer codes in the page data are different.
The different sets of page data of the web page are used for supporting different application programs, namely, one set of page data of the web page can only be applied to one application program, or, one set of page data of the web page can only be loaded and displayed by one application program.
Thus, when a user accesses the web page on the terminal based on different applications, the server of the web page needs to return different sets of page data of the web page to the terminal.
However, if the embedded point JS file needs to be loaded in the page data of the web page, the corresponding type of embedded point JS file needs to be loaded in the page data of different sets of the web page.
Therefore, in the present application, in the case of loading a web page, the system environment in which the web page is loaded is determined, and then step S102 is performed.
In one embodiment of the present application, the system environment may be determined according to an application program used when loading a web page, for example, assuming that page data of the web page is obtained from a server of the web page based on the application program a on a terminal, and then the web page is loaded on the application program a based on the page data, the application program a may be the system environment for loading the web page, or the like. For another example, assuming that the page data of the web page is acquired from the server of the web page based on the application program B on the terminal, and then the web page is loaded on the application program B based on the page data, the application program B may be a system environment or the like for loading the web page.
Accordingly, when determining the system environment for loading the web page, an application program used when acquiring page data of the web page from a server of the web page may be acquired, and then the system environment for loading the web page may be determined from the application program, for example, the application program may be used as the system environment for loading the web page, or the like.
In the present application, an application may be started on a terminal first, and then a web page may be loaded based on the application, that is, the application may have been started on the terminal before the web page is loaded, for example, a portion of memory is allocated for the application in the memory of the terminal, the application is run in the portion of memory, and the page data of the page needs to be loaded into the portion of memory, so that when the application used when acquiring the page data of the web page from the server of the web page is acquired, the portion of memory loaded with the page data of the page may be determined in the memory of the terminal, and then the application running in the portion of memory may be determined as the application used when acquiring the page data of the web page from the server of the web page.
Alternatively, in another embodiment, a web page may have multiple domain names, a web page may be accessed based on multiple different domain names, e.g., a user may be based on "on a terminal"www.aaa.com"access the web page, the user can also be based on the terminalwww.bbb.comTo access the web page.
In general, the domain name used when accessing the web page is different due to the difference of the application program used when accessing the web page, for example, the domain name "is needed when accessing the web page based on the application program A on the terminal"www.aaa.com"access the web page, domain name is needed to be used when accessing the web page based on application program B on the terminalwww.bbb.comTo access the web page.
Thus, the system environment is indirectly also related to the domain name used when accessing the web page. In this way, when determining the system environment in which the web page is loaded, the domain name used when acquiring the web page from the server of the web page can be acquired; a system environment is then determined from the domain name, e.g., as the system environment in which the web page is loaded, etc.
In step S102, determining a target buried point applicable to the system environment from a plurality of types of buried points corresponding to the target function service in the web page;
In the present application, there are often a plurality of function services in one web page, for example, a display function service, a play function service, a click function service, an input function service, and the like, each of which corresponds to a buried point of a different function, and the like.
For any one webpage, since the page data of the webpage applied to different system environments is different, the corresponding buried point of any one functional service in the webpage is different for the functional service applicable to different system environments.
Thus, for any one system environment, the buried point corresponding to the function service applicable to the system environment can be determined in advance, then the system environment and the determined buried point are formed into a corresponding table entry, and the corresponding relation between the system environment and the buried point corresponding to the function service is stored, so that the same is true for each other system environment.
The above operations are performed as well for each of the other functional services in the web page.
Therefore, in this step, for the target function service in the web page, the buried point corresponding to the system environment may be found in the corresponding relationship between the system environment and the buried point corresponding to the target function service, and may be used as the target buried point applicable to the system environment. The above operations are also performed for other functional services in the web page.
In step S103, a buried point JS file corresponding to the target buried point is acquired;
the terminal often includes embedded point JS files corresponding to a plurality of functional services in the web page, where the embedded point JS files corresponding to any one of the functional services are respectively multiple and are respectively used to support different system environments, that is, respectively applicable to different system environments.
However, in the present application, in order to improve the efficiency of loading a web page and save system resources, when loading the web page, for any one of the function services in the web page, if the user triggers the function service on the web page, then the embedded point data needs to be sent to the server of the web page by using the embedded point JS file corresponding to the target function service and suitable for the system environment, and the embedded point data does not need to be sent to the server of the web page by using the embedded point JS file corresponding to the target function service and unsuitable for the system environment.
However, in the foregoing embodiment, the page data of the web page obtained by the terminal from the server of the web page based on the system environment often includes the embedded point JS files corresponding to the multiple functional services in the web page, where the embedded point JS files corresponding to each functional service are multiple, so that the multiple embedded point JS files corresponding to each functional service consume more network resources in the process of transmitting from the server of the web page to the terminal.
Therefore, in order to save network resources, in another embodiment of the present application, when the terminal obtains the embedded point JS file corresponding to the target function service from the server of the web page based on the system environment, the terminal may selectively obtain the embedded point JS file from the server of the web page based on the system environment, for example, the terminal may obtain only the embedded point JS file corresponding to the target function service and applicable to the system environment from the server of the web page, but not obtain the embedded point JS file corresponding to the target function service and not applicable to the system environment from the server of the web page, thereby reducing the number of embedded point JS files that need to be transmitted from the server of the web page to the terminal, and thus saving network resources.
Specifically, in one mode of the present application, after the terminal obtains the page data of the web page from the server of the web page, the server of the web page sends a link for obtaining the embedded point JS file to the terminal, then the terminal receives the link for obtaining the embedded point JS file sent by the server of the web page, then sends an obtaining request for obtaining the embedded point JS file corresponding to the target embedded point to the server of the web page based on the link, the target embedded point is an embedded point applicable to the system environment in a plurality of types of embedded points corresponding to the target function service in the web page, the server of the web page receives the obtaining request, then sends the embedded point JS file corresponding to the target embedded point to the terminal, and the server of the web page receives the embedded point JS file corresponding to the target embedded point returned by the server of the web page according to the obtaining request.
By the application, the server of the webpage can not transmit the corresponding embedded point JS file which is not suitable for the system environment and is of the target function business to the terminal, but only transmit the corresponding embedded point JS file which is suitable for the system environment and is of the target function business to the terminal, namely, the server of the webpage can not transmit the embedded point JS file which is not required to be used by the terminal based on the system environment to the terminal, but only transmit the embedded point JS file which is required to be used by the terminal based on the system environment to the terminal, thereby saving network resources,
In step S104, the JS file of the buried point is loaded in the global data of the web page, and the type of the target buried point is respectively marked in the page data of each target service function of the plurality of target function services in the web page.
After the target function service is triggered, the sending parameter in the embedded point JS file is changed from false to true, and then embedded point data corresponding to the target function service can be sent to the server of the webpage so as to count the access condition of the user to the webpage on the server of the webpage.
In one embodiment of the present application, a plurality of function services, for example, a click function service, an input function service, a play function service, and the like, are often present in a web page, in one manner, if statistics is required for a user to access certain function services, respective corresponding embedded point JS files are required to be loaded in page data corresponding to the function services in the page data of the web page, however, sometimes the number of function services of the same type included in the web page is greater, the embedded point JS files corresponding to the function services of the same type are often the same, if the embedded point JS files are loaded in page data corresponding to each of the function services of the same type, the same embedded point JS files are repeatedly loaded, so that more system resources are occupied, the efficiency of loading the web page is reduced, and the embedded point JS files are scattered in page data corresponding to each function service, resulting in greater difficulty in post-maintenance of the embedded point JS files.
Therefore, in order to save system resources, improve the efficiency of loading the web page, and reduce the difficulty of maintaining the embedded point JS file later, in another embodiment of the present application, the target function services in the web page are multiple, where the multiple target function services are the same type of function service, for example, are all click function services, or are all input function services, and so on.
Thus, when the embedded point JS file is loaded in the webpage, the embedded point JS file corresponding to the target function service may not be loaded in the page data corresponding to each target function service in the page data of the webpage, but the embedded point JS file corresponding to the target service function may be loaded in the global data in the page data of the webpage, where the global data of the webpage does not include the page data corresponding to each function service in the webpage, and then, the type of the target embedded point may be marked in the page data corresponding to each target function service in the webpage, so as to mark that the target function service is registered with the target embedded point, and after the target service function registered with the target embedded point is triggered, the terminal may send the embedded point data with the target service function triggered to the server of the webpage.
In the application, under the condition of loading the webpage, determining the system environment for loading the webpage; determining a target buried point applicable to the system environment from a plurality of buried points corresponding to the target function service in the webpage; acquiring a buried point JS file corresponding to a target buried point; loading the JS file of the buried point in the global data of the webpage, and respectively marking the type of the target buried point in the page data of each target service function in a plurality of target function services in the webpage.
Thus, when the webpage is loaded, the terminal can selectively load the embedded point JS file based on the system environment, for example, the embedded point JS file which corresponds to the target function service and is suitable for the system environment can be loaded, and the embedded point JS file which corresponds to the target function service and is not suitable for the system environment can be not loaded, so that the number of the loaded embedded point JS files can be reduced, and further, the loading efficiency of the webpage can be improved, the system resources can be saved, and the user experience can be improved.
Secondly, because the embedded point JS data is only loaded once in the webpage, system resources can be saved and the efficiency of loading the webpage can be improved. And the embedded point JS files are not scattered in the page data corresponding to each functional service, but are loaded in the global data in the page data of the webpage, and then the embedded point JS files can be uniformly maintained in the global data, so that the difficulty in maintaining the embedded point JS files is reduced.
In one mode, the user can access the same webpage based on different system environments on the terminal, however, for the same statistical function, the embedded point JS file of the embedded point embedded with the statistical function is different in the webpage data based on the webpage accessed in different system environments, the transmission function of the embedded point data acquired by transmitting the embedded point JS file based on different types of embedded points to the server of the webpage is also different, and the formats of parameters to be configured in different transmission functions are also different.
Therefore, when a technician develops a webpage, the technician needs to know the type of the embedded point JS file corresponding to each statistical function on the application program, the transmission function corresponding to each embedded point JS file, and the format of parameters to be configured in each transmission function, so that the working difficulty of the technician is high, and the labor cost is high.
Therefore, in order to reduce the working difficulty of technicians when developing web pages and further reduce the labor cost, in another embodiment of the present application, the embedded point parameters of the target embedded points may be fetched from the page data of the target function service under the condition of triggering the target function service; converting the format of the buried point parameters into a preset format; calling a preset unified buried point sending function based on buried point parameters in a preset format; and transmitting buried point parameters in a preset format based on a preset unified buried point transmitting function.
According to the application, the transmission functions of the embedded point JS files for transmitting the embedded points of different types are unified into one transmission function, and a technician only needs to know one transmission function, so that the working difficulty can be reduced, and the labor cost is further reduced.
It should be noted that, for simplicity of explanation, the method embodiments are shown as a series of acts, but it should be understood by those skilled in the art that the present application is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the application. Further, those skilled in the art will appreciate that the embodiments described in the specification are all alternative embodiments and that the actions involved are not necessarily required for the present application.
Referring to fig. 2, there is shown a block diagram of a buried point loading apparatus of the present application, which may include the following modules:
a first determining module 11, configured to determine, in a case of loading a web page, a system environment for loading the web page;
a second determining module 12, configured to determine, among a plurality of types of buried points corresponding to a target function service in the web page, a target buried point applicable to the system environment;
An obtaining module 13, configured to obtain a buried point JS file corresponding to the target buried point;
the loading module 14 is configured to load the JS file of the buried point on the global data of the web page;
and the marking module 15 is used for marking the type of the target embedded point in the page data of each target service function in the multiple target function services in the webpage respectively.
In an alternative implementation, the first determining module includes:
a first obtaining unit configured to obtain a domain name used when obtaining a web page from a server of the web page;
and the first determining unit is used for determining the system environment according to the domain name.
In an alternative implementation, the first determining module includes:
a second acquisition unit configured to acquire an application program used when acquiring a web page from a server of the web page;
and the second determining unit is used for determining the system environment according to the application program.
In an alternative implementation, the second determining module is specifically configured to: and searching the buried point corresponding to the system environment in the corresponding relation between the system environment and the buried point corresponding to the target service function.
In an alternative implementation, the acquiring module includes:
the first receiving unit is used for receiving a link which is sent by a server of a webpage and used for acquiring a buried point JS file;
the sending unit is used for sending an acquisition request for acquiring the embedded point JS file corresponding to the target embedded point to a server of the webpage based on the link;
and the second receiving unit is used for receiving the embedded point JS file corresponding to the target embedded point returned by the server of the webpage according to the acquisition request.
In an alternative implementation, the apparatus further includes:
the first calling module is used for calling the embedding point parameters of the target embedding point in the page data of the target function service under the condition that the target function service is triggered;
the conversion module is used for converting the format of the buried point parameters into a preset format;
the second calling module is used for calling a preset unified buried point sending function based on the buried point parameters in the preset format;
and the transmitting module is used for transmitting the buried point parameters in the preset format based on the preset unified buried point transmitting function.
In the application, under the condition of loading the webpage, determining the system environment for loading the webpage; determining a target buried point applicable to the system environment from a plurality of buried points corresponding to the target function service in the webpage; acquiring a buried point JS file corresponding to a target buried point; loading the JS file of the buried point in the global data of the webpage, and respectively marking the type of the target buried point in the page data of each target service function in a plurality of target function services in the webpage.
Thus, when the webpage is loaded, the terminal can selectively load the embedded point JS file based on the system environment, for example, the embedded point JS file which corresponds to the target function service and is suitable for the system environment can be loaded, and the embedded point JS file which corresponds to the target function service and is not suitable for the system environment can be not loaded, so that the number of the loaded embedded point JS files can be reduced, and further, the loading efficiency of the webpage can be improved, the system resources can be saved, and the user experience can be improved.
Secondly, because the embedded point JS data is only loaded once in the webpage, system resources can be saved and the efficiency of loading the webpage can be improved. And the embedded point JS files are not scattered in the page data corresponding to each functional service, but are loaded in the global data in the page data of the webpage, and then the embedded point JS files can be uniformly maintained in the global data, so that the difficulty in maintaining the embedded point JS files is reduced.
For the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points.
Fig. 3 is a block diagram of an electronic device 800 in accordance with the present application. For example, electronic device 800 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, exercise device, personal digital assistant, or the like.
Referring to fig. 3, the electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814, and a communication component 816.
The processing component 802 generally controls overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interactions between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, images, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The power supply component 806 provides power to the various components of the electronic device 800. The power components 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the electronic device 800.
The multimedia component 808 includes a screen between the electronic device 800 and the user that provides an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and/or a rear camera. The front camera and/or the rear camera may receive external multimedia data when the device 800 is in an operational mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 further includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be a keyboard, click wheel, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 814 includes one or more sensors for providing status assessment of various aspects of the electronic device 800. For example, the sensor assembly 814 may detect an on/off state of the device 800, a relative positioning of the components, such as a display and keypad of the electronic device 800, the sensor assembly 814 may also detect a change in position of the electronic device 800 or a component of the electronic device 800, the presence or absence of a user's contact with the electronic device 800, an orientation or acceleration/deceleration of the electronic device 800, and a change in temperature of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate communication between the electronic device 800 and other devices, either wired or wireless. The electronic device 800 may access a wireless network based on a communication standard, such as WiFi, an operator network (e.g., 2G, 3G, 4G, or 5G), or a combination thereof. In one exemplary embodiment, the communication component 816 receives broadcast signals or broadcast operation information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic elements for executing the methods described above.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, such as memory 804 including instructions executable by processor 820 of electronic device 800 to perform the above-described method. For example, the non-transitory computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
Fig. 4 is a block diagram of an electronic device 1900 in accordance with the present application. For example, electronic device 1900 may be provided as a server.
Referring to FIG. 4, electronic device 1900 includes a processing component 1922 that further includes one or more processors and memory resources represented by memory 1932 for storing instructions, such as application programs, that can be executed by processing component 1922. The application programs stored in memory 1932 may include one or more modules each corresponding to a set of instructions. Further, processing component 1922 is configured to execute instructions to perform the methods described above.
The electronic device 1900 may also include a power component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input/output (I/O) interface 1958. The electronic device 1900 may operate based on an operating system stored in memory 1932, such as Windows Server, mac OS XTM, unixTM, linuxTM, freeBSDTM, or the like.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described by differences from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other.
It will be apparent to those skilled in the art that embodiments of the present application may be provided as a method, apparatus, 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 present application is described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations 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 embedded point loading terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable embedded point loading terminal device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable point-of-use loading terminal device to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable land-based loading terminal device to cause a series of operational steps to be performed on the computer or other programmable terminal device to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal device provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the application.
Finally, it is further noted that relational terms such as first and second, and the like are 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. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal 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 terminal. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or terminal device comprising the element.
The foregoing describes in detail a method and apparatus for loading embedded points, and specific examples are applied to illustrate the principles and embodiments of the present application, and the above examples are only used to help understand the method and core ideas of the present application; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (14)

1. A buried point loading method, the method comprising:
under the condition of loading a webpage, determining a system environment for loading the webpage;
selectively determining target buried points applicable to the system environment from a plurality of types of buried points corresponding to target function services in the webpage, wherein the plurality of types of buried points corresponding to the target function services comprise target buried points applicable to the system environment and target buried points unsuitable for the system environment;
acquiring a buried point JS file corresponding to the target buried point;
loading the JS file of the buried point in the global data of the webpage, and respectively marking the type of the target buried point in the page data of each target service function in a plurality of target function services in the webpage.
2. The method of claim 1, wherein the determining the system environment in which the web page is loaded comprises:
acquiring a domain name used when acquiring a webpage from a server of the webpage;
and determining the system environment according to the domain name.
3. The method of claim 1, wherein the determining the system environment in which the web page is loaded comprises:
Acquiring an application program used when acquiring a webpage from a server of the webpage;
and determining the system environment according to the application program.
4. The method according to claim 1, wherein the determining, among the plurality of types of buried points corresponding to the target function service in the web page, a target buried point applicable to the system environment includes:
and searching the buried point corresponding to the system environment in the corresponding relation between the system environment and the buried point corresponding to the target service function.
5. The method according to claim 1, wherein the obtaining the embedded point JS file corresponding to the target embedded point includes:
a link which is sent by a server of a receiving webpage and used for acquiring a buried point JS file;
sending an acquisition request for acquiring the embedded point JS file corresponding to the target embedded point to a server of the webpage based on the link;
and receiving the embedded point JS file corresponding to the target embedded point returned by the server of the webpage according to the acquisition request.
6. The method according to claim 1, wherein the method further comprises:
under the condition of triggering the target function service, invoking the embedded point parameter of the target embedded point in page data of the target function service;
Converting the format of the buried point parameters into a preset format;
calling a preset unified buried point sending function based on buried point parameters in a preset format;
and transmitting buried point parameters in a preset format based on a preset unified buried point transmitting function.
7. A buried point loading apparatus, said apparatus comprising:
the first determining module is used for determining a system environment for loading the webpage under the condition of loading the webpage;
the second determining module is used for selectively determining target embedded points applicable to the system environment from a plurality of types of embedded points corresponding to target function services in the webpage, wherein the plurality of types of embedded points corresponding to the target function services comprise target embedded points applicable to the system environment and target embedded points not applicable to the system environment;
the acquisition module is used for acquiring the embedded point JS file corresponding to the target embedded point;
the loading module is used for loading the JS file of the buried point on the global data of the webpage;
and the marking module is used for marking the type of the target buried point in the page data of each target service function in the multiple target function services in the webpage respectively.
8. The apparatus of claim 7, wherein the first determining module comprises:
A first obtaining unit configured to obtain a domain name used when obtaining a web page from a server of the web page;
and the first determining unit is used for determining the system environment according to the domain name.
9. The apparatus of claim 7, wherein the first determining module comprises:
a second acquisition unit configured to acquire an application program used when acquiring a web page from a server of the web page;
and the second determining unit is used for determining the system environment according to the application program.
10. The apparatus of claim 7, wherein the second determining module is specifically configured to: and searching the buried point corresponding to the system environment in the corresponding relation between the system environment and the buried point corresponding to the target service function.
11. The apparatus of claim 7, wherein the acquisition module comprises:
the first receiving unit is used for receiving a link which is sent by a server of a webpage and used for acquiring a buried point JS file;
the sending unit is used for sending an acquisition request for acquiring the embedded point JS file corresponding to the target embedded point to a server of the webpage based on the link;
and the second receiving unit is used for receiving the embedded point JS file corresponding to the target embedded point returned by the server of the webpage according to the acquisition request.
12. The apparatus of claim 7, wherein the apparatus further comprises:
the first calling module is used for calling the embedding point parameters of the target embedding point in the page data of the target function service under the condition that the target function service is triggered;
the conversion module is used for converting the format of the buried point parameters into a preset format;
the second calling module is used for calling a preset unified buried point sending function based on the buried point parameters in the preset format;
and the transmitting module is used for transmitting the buried point parameters in the preset format based on the preset unified buried point transmitting function.
13. An electronic device, the electronic device comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the buried point loading method as recited in any of claims 1-6.
14. A non-transitory computer readable storage medium, which when executed by a processor of an electronic device, causes the electronic device to perform the buried point loading method of any of claims 1-6.
CN202010358491.2A 2020-04-29 2020-04-29 Buried point loading method and device Active CN111695064B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010358491.2A CN111695064B (en) 2020-04-29 2020-04-29 Buried point loading method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010358491.2A CN111695064B (en) 2020-04-29 2020-04-29 Buried point loading method and device

Publications (2)

Publication Number Publication Date
CN111695064A CN111695064A (en) 2020-09-22
CN111695064B true CN111695064B (en) 2023-08-18

Family

ID=72476816

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010358491.2A Active CN111695064B (en) 2020-04-29 2020-04-29 Buried point loading method and device

Country Status (1)

Country Link
CN (1) CN111695064B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112181770A (en) * 2020-09-28 2021-01-05 北京达佳互联信息技术有限公司 Method, device and system for setting buried object
CN113568621A (en) * 2021-07-30 2021-10-29 北京达佳互联信息技术有限公司 Data processing method and device for page embedded point

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103412890A (en) * 2013-07-19 2013-11-27 北京亿赞普网络技术有限公司 Webpage loading method and device
CN106571949A (en) * 2016-09-23 2017-04-19 北京五八信息技术有限公司 Event tracking point processing method and apparatus
CN106611047A (en) * 2016-12-16 2017-05-03 天脉聚源(北京)传媒科技有限公司 Webpage loading method and apparatus
CN107295050A (en) * 2016-04-01 2017-10-24 阿里巴巴集团控股有限公司 Front end user behavioral statisticses method and device
CN107704615A (en) * 2017-10-24 2018-02-16 北京有字库网络科技有限公司 Webpage font display methods and system based on Chinese font subset
CN108132814A (en) * 2017-12-22 2018-06-08 平安养老保险股份有限公司 Page loading method, device, computer equipment and the storage medium of application program
WO2018121501A1 (en) * 2016-12-29 2018-07-05 北京国双科技有限公司 Method and apparatus for monitoring network visitor behavior
CN109582353A (en) * 2017-09-26 2019-04-05 北京国双科技有限公司 The method and device of embedding data acquisition code
CN109831478A (en) * 2018-12-19 2019-05-31 天翼电子商务有限公司 Rule-based and model distributed processing intelligent decision system and method in real time
CN110059282A (en) * 2019-04-23 2019-07-26 北京奇艺世纪科技有限公司 A kind of acquisition methods and system of interactive class data
CN110196953A (en) * 2019-05-30 2019-09-03 北京腾云天下科技有限公司 A kind of application buries point methods, device, calculates equipment and system
CN110457035A (en) * 2019-07-23 2019-11-15 厦门美柚信息科技有限公司 A kind of setting method, system, equipment and its storage medium of displaying information
CN110781437A (en) * 2019-10-28 2020-02-11 北京字节跳动网络技术有限公司 Method and device for acquiring webpage image loading duration and electronic equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102693280B (en) * 2012-04-28 2014-08-13 广州市动景计算机科技有限公司 Webpage browsing method, WebApp framework, method and device for executing JavaScript, and mobile terminal
US10582001B2 (en) * 2015-08-11 2020-03-03 Oracle International Corporation Asynchronous pre-caching of synchronously loaded resources

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103412890A (en) * 2013-07-19 2013-11-27 北京亿赞普网络技术有限公司 Webpage loading method and device
CN107295050A (en) * 2016-04-01 2017-10-24 阿里巴巴集团控股有限公司 Front end user behavioral statisticses method and device
CN106571949A (en) * 2016-09-23 2017-04-19 北京五八信息技术有限公司 Event tracking point processing method and apparatus
CN106611047A (en) * 2016-12-16 2017-05-03 天脉聚源(北京)传媒科技有限公司 Webpage loading method and apparatus
WO2018121501A1 (en) * 2016-12-29 2018-07-05 北京国双科技有限公司 Method and apparatus for monitoring network visitor behavior
CN109582353A (en) * 2017-09-26 2019-04-05 北京国双科技有限公司 The method and device of embedding data acquisition code
CN107704615A (en) * 2017-10-24 2018-02-16 北京有字库网络科技有限公司 Webpage font display methods and system based on Chinese font subset
CN108132814A (en) * 2017-12-22 2018-06-08 平安养老保险股份有限公司 Page loading method, device, computer equipment and the storage medium of application program
CN109831478A (en) * 2018-12-19 2019-05-31 天翼电子商务有限公司 Rule-based and model distributed processing intelligent decision system and method in real time
CN110059282A (en) * 2019-04-23 2019-07-26 北京奇艺世纪科技有限公司 A kind of acquisition methods and system of interactive class data
CN110196953A (en) * 2019-05-30 2019-09-03 北京腾云天下科技有限公司 A kind of application buries point methods, device, calculates equipment and system
CN110457035A (en) * 2019-07-23 2019-11-15 厦门美柚信息科技有限公司 A kind of setting method, system, equipment and its storage medium of displaying information
CN110781437A (en) * 2019-10-28 2020-02-11 北京字节跳动网络技术有限公司 Method and device for acquiring webpage image loading duration and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"网页加载时JavaScript代码效率提高机制探讨";庞双玉;《数字技术与应用》;全文 *

Also Published As

Publication number Publication date
CN111695064A (en) 2020-09-22

Similar Documents

Publication Publication Date Title
CN107329743B (en) Application page display method and device and storage medium
CN106569800B (en) Front-end interface generation method and device
CN107203398B (en) Application distribution method and device
JP6062608B2 (en) Web page access method, apparatus, server, terminal, program, and recording medium
CN107193606B (en) Application distribution method and device
CN106201734B (en) File sharing method and device
CN107193441B (en) Desktop pendant previewing method and device
CN107220059B (en) Application interface display method and device
CN106547547B (en) data acquisition method and device
CN110928543A (en) Page processing method and device and storage medium
CN111695064B (en) Buried point loading method and device
CN106095405B (en) Icon updating method and device
CN107463372B (en) Data-driven page updating method and device
CN107402767B (en) Method and device for displaying push message
CN106708967B (en) Page display method and device
CN111159615A (en) Webpage processing method and device
CN104951522B (en) Method and device for searching
CN111079040B (en) Resource sniffing method, device, terminal, server and storage medium
CN112862349B (en) Data processing method, device and equipment based on ABS service data
CN110457084B (en) Loading method and device
CN112486617B (en) Ciphertext data processing architecture, method, apparatus and machine readable medium
CN111241134B (en) Data processing method and device
CN113407879B (en) Data reporting method, device and readable medium
CN110989987B (en) Portal webpage generation method and device, client, server and storage medium
CN111597106A (en) Point burying management method and device

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