CN111695064A - Embedded point loading method and device - Google Patents

Embedded point loading method and device Download PDF

Info

Publication number
CN111695064A
CN111695064A CN202010358491.2A CN202010358491A CN111695064A CN 111695064 A CN111695064 A CN 111695064A CN 202010358491 A CN202010358491 A CN 202010358491A CN 111695064 A CN111695064 A CN 111695064A
Authority
CN
China
Prior art keywords
webpage
target
point
system environment
buried point
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
Application number
CN202010358491.2A
Other languages
Chinese (zh)
Other versions
CN111695064B (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 Urban Network Neighbor Information Technology Co Ltd
Original Assignee
Beijing Urban Network Neighbor 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 Urban Network Neighbor Information Technology Co Ltd filed Critical Beijing Urban Network Neighbor 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

Images

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. Therefore, when the webpage is loaded, the terminal can selectively load the JS file based on the system environment, for example, the JS file which is applicable to the system environment and corresponds to the target function service can be loaded, but the JS file which is not applicable to the system environment and corresponds to the target function service can not be loaded, so that the number of the JS files can be reduced, the loading efficiency of the webpage can be improved, the system resources can be saved, and the user experience can be improved. Secondly, the JS data is only loaded once in the webpage, so that system resources can be saved and the efficiency of loading the webpage can be improved. And the embedded point JS files are not dispersed in the page data corresponding to each functional service but 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

Embedded 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 a buried point.
Background
With the development of the internet, in order to count time characteristics, information demand characteristics and the like of a user accessing a webpage so as to improve the webpage, access data of the webpage by a large number of users needs to be collected, and the access data is usually collected by using a buried point.
Wherein, statistical logic can be added in the functional service of the webpage. For example, a buried point JS file is embedded in the web page, the number of times a certain link or button is clicked can be counted based on the buried point JS file, and the like.
When a terminal accesses a webpage, the terminal can acquire page data of the webpage from a server of the webpage, and then the terminal always loads a corresponding embedded point JS file of any functional service in the webpage on each application program when rendering the page data; therefore, 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 suitable for different application programs.
However, this can result in less efficient rendering of the page, a lower user experience, and wasted system resources.
Disclosure of Invention
In order to solve the technical problem, the application shows a buried point loading method and a buried point loading device.
In a first aspect, the present application shows a method for loading a buried point, the method comprising:
under the condition of loading a webpage, determining a system environment for loading the webpage;
determining a target embedded point suitable for the system environment in a plurality of types of embedded points corresponding to target function services in the webpage;
acquiring a JS file of a buried point corresponding to the target buried point;
and loading the JS file of the buried point by the global data of the webpage, and 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 respectively.
In an optional implementation manner, 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 optional implementation manner, 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;
determining the system environment according to the application program.
In an optional implementation manner, the determining a target buried point applicable to the system environment among multiple types of buried points corresponding to the target function service in the web page includes:
and searching for the embedded point corresponding to the system environment in the corresponding relation between the system environment and the embedded point corresponding to the target service function.
In an optional implementation manner, the obtaining of the JS file corresponding to the target embedded point includes:
receiving a link which is sent by a server of a webpage and used for acquiring a JS file of a buried point;
sending an acquisition request for acquiring a JS file at a buried point corresponding to the target buried point to a server of a webpage based on the link;
and receiving a JS file corresponding to the target buried point returned by the server of the webpage according to the acquisition request.
In an optional implementation, the method further includes:
under the condition of triggering the target function service, calling a buried point parameter of the target buried point from page data of the target function service;
converting the format of the embedded point parameter into a preset format;
calling a preset uniform buried point sending function based on the buried point parameters in the preset format;
and transmitting the embedded point parameters in the preset format based on a preset uniform embedded point transmitting function.
In a second aspect, the present application illustrates a buried point loading device, the device comprising:
the first determining module is used for determining the 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 suitable for 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 a JS file of a buried point corresponding to the target buried point;
the loading module is used for loading the JS file of the embedded 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 plurality of target function services in the webpage respectively.
In an optional implementation manner, the first determining module includes:
a first acquisition unit configured to acquire a domain name used when acquiring a web page from a server of the web page;
a first determining unit, configured to determine the system environment according to the domain name.
In an optional implementation manner, 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;
a second determining unit for determining the system environment according to the application program.
In an optional implementation manner, the second determining module is specifically configured to: and searching for the embedded point corresponding to the system environment in the corresponding relation between the system environment and the embedded point corresponding to the target service function.
In an optional implementation manner, the obtaining 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 the JS file of the buried point;
a sending unit, configured to send, to a server of a web page based on the link, an acquisition request for acquiring a point-embedded JS file corresponding to the target point-embedded JS file;
and the second receiving unit is used for receiving the JS file of the buried point corresponding to the target buried point, which is returned by the server of the webpage according to the acquisition request.
In an optional implementation, the apparatus further comprises:
the first calling module is used for calling the buried point parameter of the target buried point in the page data of the target function service under the condition of triggering the target function service;
the conversion module is used for converting the format of the embedded point parameter into a preset format;
the second calling module is used for calling a preset uniform buried point sending function based on the buried point parameters in the preset format;
and the sending module is used for sending the embedded point parameters in the preset format based on a preset unified embedded point sending 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 method of buried point loading as described in the first aspect.
In a fourth aspect, the present application illustrates a non-transitory computer-readable storage medium having instructions which, when executed by a processor of an electronic device, enable the electronic device to perform the method of buried point loading as described in the first aspect.
In a fifth aspect, the present application shows a computer program product, in which instructions, when executed by a processor of an electronic device, enable the electronic device to perform the method of buried point loading according to 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 a system environment for loading the webpage; determining a target embedded point suitable for the system environment in a plurality of types of embedded points corresponding to the target function service in the webpage; acquiring a JS file of a buried point corresponding to a target buried point; and loading the JS file of the embedded point in the global data of the webpage, and respectively marking the type of the target embedded point in the page data of each target service function in a plurality of target function services in the webpage.
Therefore, when the webpage is loaded, the terminal can selectively load the JS file based on the system environment, for example, the JS file which is applicable to the system environment and corresponds to the target function service can be loaded, but the JS file which is not applicable to the system environment and corresponds to the target function service can not be loaded, so that the number of the JS files can be reduced, the loading efficiency of the webpage can be improved, the system resources can be saved, and the user experience can be improved.
Secondly, the JS data is only loaded once in the webpage, so that system resources can be saved and the efficiency of loading the webpage can be improved. And the embedded point JS files are not dispersed in the page data corresponding to each functional service but 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 the steps of a method of burdening a point of the present application;
FIG. 2 is a block diagram of a buried point loading apparatus according to 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 shown in the present application.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, the present application is described in further detail with reference to the accompanying drawings and the detailed description.
Referring to fig. 1, a flowchart illustrating steps of a buried point loading method according to the present application is shown, where the method may specifically 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 technical staff can develop a webpage and then store the webpage data of the webpage in a server of the webpage, so that a majority of users can obtain the webpage data to access the webpage.
In the present application, a user may use a web page accessed by a terminal, wherein the user may 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, also including various application programs of specific functions, which have a function of accessing the web page in addition to their specific functions, for example, a game application, and the user may use it to access the web page in addition to playing a game, and further, for example, a shopping application, and the user may use it to access the web page in addition to shopping.
In this way, for any one web page in the server of the web page, when the user needs to access the web page, the user can access the web page on the terminal based on different application programs.
However, the computer programming languages may differ among different applications, making class libraries, functions, and code architectures, among others, different among different applications.
In this way, the technician needs to store a plurality of sets of page data of the web page in the server of the web page in advance, and the content of the web page presented after the page data of the web page are rendered is the same, but the computer code in the page data is different.
Different sets of page data of the web page are used for supporting different application programs, that is, a certain set of page data of the web page can be only applied to one application program, or a certain set of page data of the web page can be only loaded and displayed by one application program.
Thus, when a user accesses the web page based on different applications on the terminal, 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 embedded point JS files of the corresponding types need to be loaded in different sets of page data of the web page respectively.
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 used when the web page is loaded, for example, if the web page data of the web page is obtained from a server of the web page based on the application a on the terminal, and then the web page is loaded on the application a based on the page data, the application a may be the system environment for loading the web page, and the like. For another example, if the terminal obtains the page data of the web page from the server of the web page based on the application B, and then loads the web page on the application B based on the page data, the application B may be a system environment or the like in which the web page is loaded.
Therefore, 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 according to the application program, for example, the application program is taken as the system environment for loading the web page, and the like.
In the application, an application program may be started on a terminal first, and then a web page is loaded based on the application program, that is, the application program is started on the terminal before the web page is loaded, for example, a part of a memory is allocated to the application program in a memory of the terminal, the application program is run in the part of the memory, and page data of the page needs to be loaded into the part of the memory, so that when the application program used when obtaining the page data of the web page from a server of the web page is obtained, the part of the memory loaded with the page data of the page may be determined in the memory of the terminal, and then the application program run in the part of the memory may be determined and is used as the application program used when obtaining the page data of the web page from the server of the web page.
Or, in another embodiment, a web page has multiple domain names, and a web page can be accessed based on multiple different domain names, e.g., a user can be based on a terminal "www.aaa.com"visit this web page, user can also be based on terminalwww.bbb.comThe web page is accessed.
Wherein, in general, access is often the result ofThe application used for the web page is different, and the domain name used for accessing the web page is different, for example, the domain name is needed for accessing the web page based on the application a on the terminal "www.aaa.com"visit this web page, use domain name when visiting this web page based on application B on the terminal stationwww.bbb.comThe web page is accessed.
Thus, the system environment is also indirectly related to the domain name used when accessing the web page. Thus, when determining the system environment for loading the web page, the domain name used when the web page is obtained from the server of the web page can be obtained; then, a system environment is determined according to the domain name, for example, the domain name is used as the system environment for loading the web page.
In step S102, determining a target embedded point suitable for the system environment among a plurality of types of embedded points corresponding to the target function service in the web page;
in the present application, a plurality of functional services, for example, a display functional service, a play functional service, a click functional service, an input functional service, etc., often exist in one web page, and each service corresponds to a buried point of a different function, etc.
For any webpage, because the webpage data of the webpage applied to different system environments are different, for any functional service in the webpage, the corresponding embedded points of the functional service applicable to different system environments are different.
Therefore, for any system environment, the embedded point corresponding to the function service applicable to the system environment can be determined in advance, then the system environment and the determined embedded point form a corresponding table entry, and the corresponding relation between the system environment and the embedded point corresponding to the function service is stored, and the same is true for each other system environment.
The above operation is also performed 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 embedded point corresponding to the system environment can be searched in the corresponding relationship between the system environment and the embedded point corresponding to the target function service, and the embedded point is used as the target embedded point suitable for the system environment. The above operation is also performed for other functional services in the web page.
In step S103, acquiring a JS file corresponding to the target embedded point;
the method includes that a plurality of embedded point JS files corresponding to a plurality of functional services in a webpage are often included in page data of the webpage acquired by a terminal from a server of the webpage based on the system environment, and the embedded point JS files corresponding to any one functional service are respectively multiple and are respectively used for supporting different system environments, that is, can be respectively applied 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 function service in the web page, then if the user triggers the function service on the web page, it is necessary to send the buried point data to the server of the web page using the corresponding buried point JS file applicable to the system environment of the target function service, and it is not necessary to send the buried point data to the server of the web page using the corresponding buried point JS file not applicable to the system environment of the target function service, and therefore, in one embodiment, when loading the web page, the terminal may selectively load the buried point JS file based on the system environment, for example, may load the corresponding buried point JS file applicable to the system environment of the target function service, and may not load the corresponding buried point JS file not applicable to the system environment of the target function service, therefore, the number of the loaded JS files can be reduced, the webpage loading efficiency can be improved, and system resources can be saved.
However, in the foregoing embodiment, the page data of the web page acquired 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 plurality of functional services in the web page, and each of the embedded point JS files corresponding to each of the functional services is multiple, so that the multiple embedded point JS files corresponding to each of the functional services consume a lot of 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 acquires 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 acquire the embedded point JS file from the server of the web page based on the system environment, for example, the terminal may acquire 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, and may not acquire 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 the 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 embodiment, after the terminal acquires the page data of the web page from the server of the web page, the server of the web page sends a link for acquiring the JS file of the embedded point to the terminal, the terminal receives the link for acquiring the JS file sent by the server of the web page, then sends an acquisition request for acquiring the JS file of the embedded point 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 among 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 acquisition request, and then sends the JS file of the embedded point corresponding to the target embedded point to the terminal, and the JS file of the embedded point corresponding to the target embedded point returned by the server of the web page receiving the terminal according to the acquisition request.
By the application, the server of the webpage can not transmit the corresponding embedded point JS file of the target function service, which is not suitable for the system environment, to the terminal, but can transmit only the corresponding embedded point JS file of the target function service, which is suitable for the system environment, to the terminal, that is, the server of the webpage can transmit only the embedded point JS file, which is not needed by the terminal based on the system environment, to the terminal without transmitting the embedded point JS file, which is needed 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 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 the embedded point data corresponding to the target function service can be sent to the server of the webpage, so that the access condition of the user to the webpage can be counted on the server of the webpage.
In an embodiment of the present application, a plurality of functional services often exist in a web page, for example, the functional services include a click functional service, an input functional service, a play functional service, and the like, in one mode, if statistics needs to be performed on accesses of some functional services by a user, it is necessary to load a JS file corresponding to each functional service in page data of the web page, where the JS file corresponding to each functional service in the page data of the web page is respectively loaded, however, sometimes, the number of functional services of the same type in the web page is large, the JS files corresponding to the functional services of the same type are often the same, and if a JS file corresponding to each functional service in a plurality of functional services of the same type is respectively loaded, the JS file corresponding to the same type is repeatedly loaded, so that more system resources are occupied, and the efficiency of loading the web page is reduced, and the JS files of the embedded points are dispersed in the page data corresponding to each functional service, which causes higher difficulty in later maintenance of the JS files of the embedded points.
Therefore, in order to save system resources, improve the efficiency of loading a web page, and reduce the difficulty of maintaining a JS file at a later stage, in another embodiment of the present application, a plurality of target function services in the web page are provided, where the plurality of target function services are function services of the same type, for example, all the function services are click function services, or all the function services are input function services.
Therefore, when loading the embedded point JS file in the web page, 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 web page, but the embedded point JS file corresponding to the target function service may be loaded in the global data in the page data of the web page, where the global data of the web page does not include the page data corresponding to each function service in the web page, and secondly, the type of the target embedded point may be marked in the page data corresponding to each target function service in the web page, so as to mark that the target embedded point is registered in the target function service, and after the target service function registered with the target embedded point is triggered, the terminal may send the embedded point data in which the target service function is triggered to the server of the web page.
In the application, under the condition of loading the webpage, determining a system environment for loading the webpage; determining a target embedded point suitable for the system environment in a plurality of types of embedded points corresponding to the target function service in the webpage; acquiring a JS file of a buried point corresponding to a target buried point; and loading the JS file of the embedded point in the global data of the webpage, and respectively marking the type of the target embedded point in the page data of each target service function in a plurality of target function services in the webpage.
Therefore, when the webpage is loaded, the terminal can selectively load the JS file based on the system environment, for example, the JS file which is applicable to the system environment and corresponds to the target function service can be loaded, but the JS file which is not applicable to the system environment and corresponds to the target function service can not be loaded, so that the number of the JS files can be reduced, the loading efficiency of the webpage can be improved, the system resources can be saved, and the user experience can be improved.
Secondly, the JS data is only loaded once in the webpage, so that system resources can be saved and the efficiency of loading the webpage can be improved. And the embedded point JS files are not dispersed in the page data corresponding to each functional service but 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, a user can access the same webpage on the terminal based on different system environments, however, for the same statistical function, the embedded point JS file embedding the embedded point of the statistical function in the page data of the webpage accessed in the different system environments is different, the sending function for sending the embedded point data collected by the embedded point JS files 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 sending functions are also different.
Therefore, when a technician develops a webpage, the technician needs to know the type of the JS file corresponding to each statistical function on an application program, the sending function corresponding to each JS file, and the format of the parameter to be configured in each sending function, so that the work difficulty of the technician is high, and further the labor cost is high.
Therefore, in order to reduce the work difficulty of technical personnel in developing the webpage and further reduce the labor cost, in another embodiment of the application, under the condition of triggering the target function service, the embedded point parameter of the target embedded point can be called from the page data of the target function service; converting the format of the embedded point parameters into a preset format; calling a preset uniform buried point sending function based on the buried point parameters in the preset format; and transmitting the embedded point parameters in the preset format based on a preset uniform embedded point transmitting function.
Through this application, will send the transmission function of the JS file of the buried point of different grade type to unify into a transmission function, the technical staff only need know a transmission function can to can reduce the work degree of difficulty, and then reduce the cost of labor.
It is noted that, for simplicity of explanation, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will appreciate that the present application is not limited by the order of acts, as some steps may, in accordance with the present application, occur in other orders and concurrently. Further, those skilled in the art will also appreciate that the embodiments described in the specification are exemplary and that no action is necessarily required in this application.
Referring to fig. 2, a block diagram of a buried point loading apparatus according to the present application is shown, where the apparatus may specifically include the following modules:
a first determining module 11, configured to determine, in a case where a web page is loaded, a system environment in which the web page is loaded;
a second determining module 12, configured to determine a target embedded point applicable to the system environment from among multiple types of embedded points corresponding to a target function service in the web page;
the acquisition module 13 is configured to acquire a JS file at a buried point corresponding to the target buried point;
the loading module 14 is configured to load the JS file of the embedded point on the global data of the web page;
and the marking module 15 is configured to mark the type of the target buried point in the page data of each target service function in the multiple target function services in the web page.
In an optional implementation manner, the first determining module includes:
a first acquisition unit configured to acquire a domain name used when acquiring a web page from a server of the web page;
a first determining unit, configured to determine the system environment according to the domain name.
In an optional implementation manner, 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;
a second determining unit for determining the system environment according to the application program.
In an optional implementation manner, the second determining module is specifically configured to: and searching for the embedded point corresponding to the system environment in the corresponding relation between the system environment and the embedded point corresponding to the target service function.
In an optional implementation manner, the obtaining 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 the JS file of the buried point;
a sending unit, configured to send, to a server of a web page based on the link, an acquisition request for acquiring a point-embedded JS file corresponding to the target point-embedded JS file;
and the second receiving unit is used for receiving the JS file of the buried point corresponding to the target buried point, which is returned by the server of the webpage according to the acquisition request.
In an optional implementation, the apparatus further comprises:
the first calling module is used for calling the buried point parameter of the target buried point in the page data of the target function service under the condition of triggering the target function service;
the conversion module is used for converting the format of the embedded point parameter into a preset format;
the second calling module is used for calling a preset uniform buried point sending function based on the buried point parameters in the preset format;
and the sending module is used for sending the embedded point parameters in the preset format based on a preset unified embedded point sending function.
In the application, under the condition of loading the webpage, determining a system environment for loading the webpage; determining a target embedded point suitable for the system environment in a plurality of types of embedded points corresponding to the target function service in the webpage; acquiring a JS file of a buried point corresponding to a target buried point; and loading the JS file of the embedded point in the global data of the webpage, and respectively marking the type of the target embedded point in the page data of each target service function in a plurality of target function services in the webpage.
Therefore, when the webpage is loaded, the terminal can selectively load the JS file based on the system environment, for example, the JS file which is applicable to the system environment and corresponds to the target function service can be loaded, but the JS file which is not applicable to the system environment and corresponds to the target function service can not be loaded, so that the number of the JS files can be reduced, the loading efficiency of the webpage can be improved, the system resources can be saved, and the user experience can be improved.
Secondly, the JS data is only loaded once in the webpage, so that system resources can be saved and the efficiency of loading the webpage can be improved. And the embedded point JS files are not dispersed in the page data corresponding to each functional service but 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 embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
Fig. 3 is a block diagram of an electronic device 800 shown in the present application. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 3, 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 components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction 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 operation 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 non-volatile 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 disks.
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 supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.
The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and a user. 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 an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the device 800 is in an operating 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 a focal length and optical zoom capability.
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 further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also 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 keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the electronic device 800. For example, the sensor assembly 814 may detect an open/closed state of the device 800, the relative positioning of components, such as a display and keypad of the electronic device 800, the sensor assembly 814 may also detect a change in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, orientation or acceleration/deceleration of the electronic device 800, and a change in the temperature of the electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object 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 gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 may access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G, or 5G), or a combination thereof. In an exemplary embodiment, the communication component 816 receives broadcast signals or broadcast operation information from an external broadcast management system via a broadcast channel. In an 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, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 820 of the electronic device 800 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Fig. 4 is a block diagram of an electronic device 1900 shown in the present application. For example, the electronic device 1900 may be provided as a server.
Referring to fig. 4, electronic device 1900 includes a processing component 1922 further including one or more processors and memory resources, represented by memory 1932, for storing instructions, e.g., applications, executable by processing component 1922. The application programs stored in memory 1932 may include one or more modules that each correspond to a set of instructions. Further, the processing component 1922 is configured to execute instructions to perform the above-described method.
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.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, 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 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 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 buried load terminal 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 sink loading terminal to cause a series of operational steps to be performed on the computer or other programmable sink loading terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable sink loading terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the 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. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or 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 an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The above detailed description is given to a buried point loading method and apparatus provided by the present application, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the above embodiment is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (14)

1. A method of buried point loading, the method comprising:
under the condition of loading a webpage, determining a system environment for loading the webpage;
determining a target embedded point suitable for the system environment in a plurality of types of embedded points corresponding to target function services in the webpage;
acquiring a JS file of a buried point corresponding to the target buried point;
and loading the JS file of the buried point by the global data of the webpage, and 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 respectively.
2. The method of claim 1, wherein determining a system environment in which to load the web page 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 determining a system environment in which to load the web page comprises:
acquiring an application program used when acquiring a webpage from a server of the webpage;
determining the system environment according to the application program.
4. The method of claim 1, wherein determining a target embedding point applicable to the system environment among a plurality of types of embedding points corresponding to the target function service in the web page comprises:
and searching for the embedded point corresponding to the system environment in the corresponding relation between the system environment and the embedded point corresponding to the target service function.
5. The method according to claim 1, wherein the obtaining of the JS file at the corresponding buried point of the target buried point comprises:
receiving a link which is sent by a server of a webpage and used for acquiring a JS file of a buried point;
sending an acquisition request for acquiring a JS file at a buried point corresponding to the target buried point to a server of a webpage based on the link;
and receiving a JS file corresponding to the target buried point returned by the server of the webpage according to the acquisition request.
6. The method of claim 1, further comprising:
under the condition of triggering the target function service, calling a buried point parameter of the target buried point from page data of the target function service;
converting the format of the embedded point parameter into a preset format;
calling a preset uniform buried point sending function based on the buried point parameters in the preset format;
and transmitting the embedded point parameters in the preset format based on a preset uniform embedded point transmitting function.
7. A point-of-burial loading device, the device comprising:
the first determining module is used for determining the 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 suitable for 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 a JS file of a buried point corresponding to the target buried point;
the loading module is used for loading the JS file of the embedded 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 plurality of target function services in the webpage respectively.
8. The apparatus of claim 7, wherein the first determining module comprises:
a first acquisition unit configured to acquire a domain name used when acquiring a web page from a server of the web page;
a first determining unit, configured to determine 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;
a second determining unit 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 for the embedded point corresponding to the system environment in the corresponding relation between the system environment and the embedded point corresponding to the target service function.
11. The apparatus of claim 7, wherein the obtaining 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 the JS file of the buried point;
a sending unit, configured to send, to a server of a web page based on the link, an acquisition request for acquiring a point-embedded JS file corresponding to the target point-embedded JS file;
and the second receiving unit is used for receiving the JS file of the buried point corresponding to the target buried point, which is returned by the server of the webpage according to the acquisition request.
12. The apparatus of claim 7, further comprising:
the first calling module is used for calling the buried point parameter of the target buried point in the page data of the target function service under the condition of triggering the target function service;
the conversion module is used for converting the format of the embedded point parameter into a preset format;
the second calling module is used for calling a preset uniform buried point sending function based on the buried point parameters in the preset format;
and the sending module is used for sending the embedded point parameters in the preset format based on a preset unified embedded point sending function.
13. An electronic device, characterized in that the electronic device comprises:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the method of buried point loading of any one of claims 1-6.
14. A non-transitory computer readable storage medium having instructions therein which, when executed by a processor of an electronic device, enable the electronic device to perform the method of landed loading 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 true CN111695064A (en) 2020-09-22
CN111695064B 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)

Cited By (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 (15)

* 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
US20150074513A1 (en) * 2012-04-28 2015-03-12 Guangzhou Ucweb Computer Technology Co., Ltd. Webpage Browsing Method, Webapp Framework, Method and Device for Executing Javascript and Mobile Terminal
US20170048319A1 (en) * 2015-08-11 2017-02-16 Oracle International Corporation Asynchronous pre-caching of synchronously loaded resources
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

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150074513A1 (en) * 2012-04-28 2015-03-12 Guangzhou Ucweb Computer Technology Co., Ltd. Webpage Browsing Method, Webapp Framework, Method and Device for Executing Javascript and Mobile Terminal
CN103412890A (en) * 2013-07-19 2013-11-27 北京亿赞普网络技术有限公司 Webpage loading method and device
US20170048319A1 (en) * 2015-08-11 2017-02-16 Oracle International Corporation Asynchronous pre-caching of synchronously loaded resources
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 (2)

* Cited by examiner, † Cited by third party
Title
Y. ZHU等: ""Exploiting Webpage Characteristics for Energy-Efficient Mobile Web Browsing"", 《2021 2ND INTERNATIONAL CONFERENCE ON ELECTRONICS, COMMUNICATIONS AND INFORMATION TECHNOLOGY (CECIT)》 *
庞双玉: ""网页加载时JavaScript代码效率提高机制探讨"", 《数字技术与应用》 *

Cited By (3)

* 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
CN112181770B (en) * 2020-09-28 2024-07-12 北京达佳互联信息技术有限公司 Buried point object setting method, device and system
CN113568621A (en) * 2021-07-30 2021-10-29 北京达佳互联信息技术有限公司 Data processing method and device for page embedded point

Also Published As

Publication number Publication date
CN111695064B (en) 2023-08-18

Similar Documents

Publication Publication Date Title
CN107329743B (en) Application page display method and device and storage medium
US20180121040A1 (en) Method and device for managing notification messages
CN107203398B (en) Application distribution method and device
CN107193606B (en) Application distribution method and device
CN106201734B (en) File sharing method and device
CN106547547B (en) data acquisition method and device
CN107220059B (en) Application interface display method and device
CN107193441B (en) Desktop pendant previewing method and device
US20160019046A1 (en) Light app offline updating method, device and terminal
CN107402767B (en) Method and device for displaying push message
CN107463372B (en) Data-driven page updating method and device
CN111695064B (en) Buried point loading method and device
CN104050236B (en) Web site contents update reminding method, server and client side
CN106708967B (en) Page display method and device
CN104951522B (en) Method and device for searching
CN111079040B (en) Resource sniffing method, device, terminal, server and storage medium
CN111241134B (en) Data processing method and device
CN106506808B (en) Method and device for prompting communication message
CN110989987A (en) Portal webpage generation method, portal webpage generation device, client, server and storage medium
CN114025317B (en) Method, device, server, terminal and storage medium for spreading multimedia resources
CN110457084B (en) Loading method and device
CN112862349B (en) Data processing method, device and equipment based on ABS service data
CN110995767B (en) Request processing method and device
CN107257384B (en) Service state monitoring method and device
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