CN114489660B - Buried point code adding method, device and equipment - Google Patents

Buried point code adding method, device and equipment Download PDF

Info

Publication number
CN114489660B
CN114489660B CN202111584462.9A CN202111584462A CN114489660B CN 114489660 B CN114489660 B CN 114489660B CN 202111584462 A CN202111584462 A CN 202111584462A CN 114489660 B CN114489660 B CN 114489660B
Authority
CN
China
Prior art keywords
code
target
point
buried point
embedded
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
CN202111584462.9A
Other languages
Chinese (zh)
Other versions
CN114489660A (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.)
Douyin Vision Co Ltd
Original Assignee
Douyin Vision 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 Douyin Vision Co Ltd filed Critical Douyin Vision Co Ltd
Priority to CN202111584462.9A priority Critical patent/CN114489660B/en
Publication of CN114489660A publication Critical patent/CN114489660A/en
Application granted granted Critical
Publication of CN114489660B publication Critical patent/CN114489660B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/43Checking; Contextual analysis
    • G06F8/433Dependency analysis; Data or control flow analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/37Compiler construction; Parser generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/447Target code generation

Abstract

The embodiment of the application discloses a buried point code adding method, a buried point code adding device and buried point code adding equipment, wherein a buried point platform can be displayed in a platform display area of a code editor. The buried point platform comprises a buried point code template setting module for setting a buried point code template and a buried point information module for providing at least one set of buried point information. And acquiring the position of the source code to be inserted into the embedded point code in the code editing area of the code editor, and selecting target embedded point information corresponding to the position of the embedded point code to be inserted from at least one group of embedded point information. And automatically generating a target code according to the embedded point code template, the target embedded point name and the target embedded point attribute in the target embedded point information, and adding the target code to the position of the embedded point code to be inserted. And obtaining the value of the target buried point attribute added to the target code. The target code and the target buried point attribute take values to form the target buried point code, so that the adding efficiency and the accuracy of the target buried point code are improved.

Description

Buried point code adding method, device and equipment
Technical Field
The application relates to the technical field of data processing, in particular to a buried point code adding method, a buried point code adding device and buried point code adding equipment.
Background
In general, a buried point is set in a web page of a browser or an application program of a mobile terminal, so that behavior data of a user can be collected, and the behavior of the user can be analyzed.
In the conventional manner, a buried point scheme is designed and reviewed according to buried point requirements based on a buried point platform. After the embedded point scheme is passed, embedded point code developer performs embedded point development through embedded point information in the embedded point scheme, namely, generating embedded point codes according to the embedded point information and adding the embedded point codes in source codes of browser webpages or source codes of application programs.
However, in the current buried point development process, a buried point code developer needs to switch back and forth between a code editor and a buried point platform, repeatedly check buried point information on the buried point platform, and manually edit the buried point code in the code editor in combination with the checked buried point information. This results in inefficient addition of buried codes, and is error-prone and of low reliability.
Disclosure of Invention
In view of this, the embodiments of the present application provide a method, an apparatus, and a device for adding embedded point codes, which can improve the efficiency of adding embedded point codes and improve the reliability of adding embedded point codes.
In order to solve the above problems, the technical solution provided in the embodiments of the present application is as follows:
In a first aspect, an embodiment of the present application provides a method for adding a buried point code, where the method includes:
responding to a preset triggering operation of a code editor, and displaying a buried point platform in a platform display area of the code editor; the embedded point platform comprises an embedded point code template setting module and an embedded point information module; the embedded point code template setting module is used for setting an embedded point code template; the buried point information module is used for providing at least one group of buried point information; the buried point information comprises a buried point name, a buried point attribute type and a buried point attribute value range;
acquiring a position of a point code to be inserted in a source code; the source code is displayed in a code editing area of the code editor;
acquiring target buried point information corresponding to the position of the buried point code to be inserted, which is selected from at least one group of the buried point information;
generating a target code according to the buried point code template, a target buried point name and a target buried point attribute in the target buried point information, and adding the target code to the position of the buried point code to be inserted;
acquiring a target buried point attribute value added into the target code; the value of the target buried point attribute accords with the type of the target buried point attribute; and the target code and the target buried point attribute value form a target buried point code.
In a second aspect, an embodiment of the present application provides a buried point code adding apparatus, where the apparatus includes:
the first display unit is used for responding to the preset triggering operation of the code editor and displaying the embedded point platform in the platform display area of the code editor; the embedded point platform comprises an embedded point code template setting module and an embedded point information module; the embedded point code template setting module is used for setting an embedded point code template; the buried point information module is used for providing at least one group of buried point information; the buried point information comprises a buried point name, a buried point attribute type and a buried point attribute value range;
the first acquisition unit is used for acquiring the position of the buried point code to be inserted in the source code; the source code is displayed in a code editing area of the code editor;
the second acquisition unit is used for acquiring target buried point information corresponding to the position of the buried point code to be inserted, which is selected from at least one group of the buried point information;
an adding unit, configured to generate a target code according to the embedded point code template and a target embedded point name and a target embedded point attribute in the target embedded point information, and add the target code to the to-be-inserted embedded point code position;
A third obtaining unit, configured to obtain a target buried point attribute value added to the target code; the value of the target buried point attribute accords with the type of the target buried point attribute; and the target code and the target buried point attribute value form a target buried point code.
In a third aspect, an embodiment of the present application provides an electronic device, including:
one or more processors;
a storage device having one or more programs stored thereon,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the embedded point code addition method of the first aspect.
In a fourth aspect, embodiments of the present application provide a computer readable medium having a computer program stored thereon, where the program when executed by a processor implements the embedded point code addition method of the first aspect.
From this, the embodiment of the application has the following beneficial effects:
the embodiment of the application provides a method, a device and equipment for adding embedded point codes, which respond to preset triggering operation of a code editor and display embedded point platforms in platform display areas of the code editor. The embedded point platform comprises an embedded point code template setting module and an embedded point information module. The embedded point code template setting module is used for setting an embedded point code template, and the embedded point information module is used for providing at least one group of embedded point information, wherein the embedded point information comprises an embedded point name, an embedded point attribute type and an embedded point attribute value range. The code editing area of the code editor displays the active code and obtains the position of the buried point code to be inserted in the source code. Further, target embedded point information corresponding to the position of the embedded point code to be inserted, which is selected from at least one group of embedded point information provided by the embedded point information module, is obtained, a target code is automatically generated according to the target embedded point name and the target embedded point attribute in the target embedded point information, and the embedded point code template, and the target code is added to the position of the embedded point code to be inserted. And further, acquiring the target buried point attribute value added to the target code, wherein the target buried point attribute value accords with the target buried point attribute type. The target code and the target embedded point attribute value form a complete target embedded point code. In this manner, the embedded point platform may be exposed in the code editor such that embedded point code developers do not need to switch back and forth between the code editor and the embedded point platform. In addition, after the target embedded point information is determined, a target code is automatically generated according to the embedded point code template and the target embedded point name and the target embedded point attribute in the target embedded point information and automatically added to the position of the embedded point code to be inserted. The embedded point code developer does not need to manually edit and add the target embedded point name and the target embedded point attribute in the code editor, only needs to manually add the embedded point attribute value in the automatically generated target code, and can improve the adding efficiency of the embedded point code. And because the name of the target buried point and the attribute of the target buried point are not manually input, the accuracy of the buried point code is improved to a certain extent, and the added buried point code has high reliability.
Drawings
Fig. 1 is a schematic diagram of an exemplary application scenario provided in an embodiment of the present application;
FIG. 2 is a flowchart of a method for adding embedded point codes according to an embodiment of the present application;
fig. 3 is a schematic diagram of a buried point code template setting module according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a buried point platform according to an embodiment of the present disclosure;
fig. 5 is a schematic diagram of a buried point platform display page according to an embodiment of the present application;
fig. 6 is a schematic diagram of another embedded point platform display page according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a buried point code adding device according to an embodiment of the present application;
fig. 8 is a schematic diagram of a basic structure of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the above objects, features and advantages of the present application more comprehensible, embodiments accompanied with figures and detailed description are described in further detail below.
In order to facilitate understanding and explanation of the technical solutions provided by the embodiments of the present application, the background art of the present application will be described first.
In the big data age, the user's behavior can be analyzed by collecting user behavior data, for example, collecting the click rate of the user on some goods over a period of time, and analyzing the user's preference of goods over the period of time using the collected click rate. In practical applications, behavior data of a user is collected by setting buried points in a browser or an application program of a mobile terminal. The embedded point is set to be added into source codes of browsers or source codes of application programs of mobile terminals.
Typically, the buried point flow includes buried point design, project review, buried point development, buried point verification, and buried point online. The buried point design is to design a buried point scheme on a buried point platform. The embedded point scheme is designed for detecting events in the running process of the browser or the application program, judging and capturing the events needing to be concerned when the events happen, and collecting corresponding data. For example, in the buried point scheme, a user is set to click a certain commodity as an event requiring attention. The scheme review is that the embedded point scheme designer and the embedded point developer review the embedded point scheme content.
After the embedded point scheme is passed, embedded point development is carried out by embedded point developers through embedded point information in the embedded point scheme, namely, embedded point codes are generated according to the embedded point information, and the embedded point codes are added into source codes of browser webpages or source codes of application programs. And the buried point verification is to verify a buried point scheme in a buried point platform by a tester and give a verification report. And after the verification of the embedded point scheme is passed, the embedded point scheme which is passed by the embedded point platform on-line verification is adopted. At present, in the process of embedded point development, embedded point developers need to switch back and forth between a code editor and an embedded point platform, repeatedly check embedded point information on the embedded point platform, and manually edit embedded point codes in the code editor according to the embedded point information. This results in inefficient addition of buried codes and low reliability.
Based on the foregoing, embodiments of the present application provide a method, an apparatus, and a device for adding a buried point code, where a buried point platform is displayed in a platform display area of a code editor in response to a preset trigger operation on the code editor. The embedded point platform comprises an embedded point code template setting module and an embedded point information module. The embedded point code template setting module is used for setting an embedded point code template, and the embedded point information module is used for providing at least one group of embedded point information, wherein the embedded point information comprises an embedded point name, an embedded point attribute type and an embedded point attribute value range. The code editing area of the code editor displays the active code and obtains the position of the buried point code to be inserted in the source code. Further, target embedded point information corresponding to the position of the embedded point code to be inserted, which is selected from at least one group of embedded point information provided by the embedded point information module, is obtained, a target code is automatically generated according to the target embedded point name and the target embedded point attribute in the target embedded point information, and the embedded point code template, and the target code is added to the position of the embedded point code to be inserted. And further, acquiring the target buried point attribute value added to the target code, wherein the target buried point attribute value accords with the target buried point attribute type. The target code and the target embedded point attribute value form a complete target embedded point code. In this manner, the embedded point platform may be exposed in the code editor such that embedded point code developers do not need to switch back and forth between the code editor and the embedded point platform. In addition, after the target embedded point information is determined, a target code is automatically generated according to the embedded point code template and the target embedded point name and the target embedded point attribute in the target embedded point information and automatically added to the position of the embedded point code to be inserted. The embedded point code developer does not need to manually edit and add the target embedded point name and the target embedded point attribute in the code editor, only needs to manually add the embedded point attribute value in the automatically generated target code, and can improve the adding efficiency of the embedded point code. And because the name of the target buried point and the attribute of the target buried point are not manually input, the accuracy of the buried point code is improved to a certain extent, and the added buried point code has high reliability.
In order to facilitate understanding of the method for implementing searching provided in the embodiment of the present application, the following description is made in connection with the scenario example shown in fig. 1. Referring to fig. 1, the diagram is a schematic diagram of an exemplary application scenario provided in an embodiment of the present application.
As shown in fig. 1, in response to a preset trigger operation to the code editor 1, the buried point platform is opened in the code editor 1 and is presented in the platform display area 101. The code editor 1 further comprises a code editing area 102. The code editing area 102 of the code editor 1 exposes active code, for example, the code editing area 102 shown in fig. 1 exposes the source code named "Untitled1" that has been opened.
The buried point platform displayed in the platform display area 101 includes a buried point code template setting module and a buried point information module. The embedded point code template setting module is used for setting an embedded point code template, and the embedded point information module is used for providing at least one group of embedded point information. The buried point information comprises a buried point name, a buried point attribute type and a buried point attribute value range.
And acquiring the position of the to-be-inserted buried point code in the source code displayed in the code editing area 102, and acquiring target buried point information corresponding to the position of the to-be-inserted buried point code selected from at least one group of buried point information. And generating a target code according to the buried point code template and the target buried point name and the target buried point attribute in the acquired target buried point information, and finally adding the target code to the position of the buried point code to be inserted. It will be appreciated that the process of generating the object code is automatically performed after the object point information is obtained. Further, the target embedded point attribute added to the target code is obtained. The value of the target buried point attribute accords with the type of the target buried point attribute. The target code and the target embedded point attribute take values to form the target embedded point code, so that the adding process of the target embedded point code is realized.
In the drawings of the present application, "x" on the right side of "Untitled1" and "x" on the right side of "buried point platform" indicate that the source code "Untitled1" and the displayed buried point platform can be closed.
Those skilled in the art will appreciate that the frame diagram shown in fig. 1 is but one example in which embodiments of the present application may be implemented. The scope of applicability of the embodiments of the application is not limited in any way by the framework.
In order to facilitate understanding of the present application, a description is given below of a method for adding embedded point codes according to an embodiment of the present application with reference to the accompanying drawings.
Referring to fig. 2, the flowchart of a method for adding a buried point code according to an embodiment of the present application is shown in fig. 2, where the method may include S201 to S204:
s201: responding to a preset triggering operation of the code editor, and displaying a buried point platform in a platform display area of the code editor; the embedded point platform comprises an embedded point code template setting module and an embedded point information module; the embedded point code template setting module is used for setting an embedded point code template; the buried point information module is used for providing at least one group of buried point information; the buried point information comprises a buried point name, a buried point attribute type and a buried point attribute value range.
In the embodiment of the application, the code editor is specifically a source code editor. As an alternative example, the code editor is Visual Studio Code, abbreviated as VS code, which is a cross-platform source code editor that writes web pages and cloud applications. Typically, a code editor includes a code editing area for exposing and editing source code. As another alternative example, the code editor is a gilub Atom source code editor or other source code editor.
When the embedded point code developer performs preset triggering operation on the code editor, the embedded point platform is displayed in a platform display area of the code editor in response to the preset triggering operation on the code editor. As an optional example, the preset triggering operation is to trigger the embedded point platform control in the code editor, so that a new window is opened in response to the triggering operation of the embedded point platform control, the area where the new window is displayed is the platform display area, and the embedded point platform is displayed in the platform display area of the code editor. As another alternative example, the preset trigger operation is an open operation of the code editor. When the code editor is opened, a new window is opened, and the area for displaying the new window is a platform display area, so that the embedded point platform can be displayed in the platform display area of the code editor.
The embedded point platform comprises an embedded point code template setting module and an embedded point information module. The embedded point information module is used for providing at least one group of embedded point information. The buried point information is information in the buried point scheme, and is used for representing the buried point scheme. The buried point information comprises a buried point name, a buried point attribute type and a buried point attribute value range. In addition, in order to clearly understand the roles of the buried points and the buried point attributes, the buried point information may further include a buried point description and a buried point attribute description. It should be noted that the buried point name is a name of a buried point scheme, and the buried point description is used to describe functions that can be implemented by the buried point scheme. For example, a buried point is named "expand_child_node_list" and a buried point is described as "click node expands its child nodes".
In addition, the buried point attribute description is used to explain the role of the buried point attribute. The embedded point attribute is embodied in a code field, corresponding to a key in a key-value pair. The concrete expression form of the buried point attribute value is the value of the code field, which is equivalent to the value in the key value pair. The buried point attribute type is used for limiting the type of the buried point attribute value. The buried point attribute value range is used for limiting the buried point attribute value, and the buried point attribute value can only be selected from the buried point attribute value range. For example, the buried point attribute is "page", the buried point attribute is described as "current page", the buried point attribute type is "string", and the buried point attribute has a value range of "general_search", "search_result", and "w_song_detail". Note that some buried point attributes do not limit the type of values of the buried point attributes. If the buried point information does not show the range of the buried point attribute value, the range of the buried point attribute value is not limited.
The embedded point code template setting module is used for setting the embedded point code template. The buried point code template is provided with a buried point name variable and a buried point attribute variable. After the buried point information is determined, the buried point name and the buried point attribute in the buried point information are respectively inserted into the buried point name variable and the buried point attribute variable of the buried point code template, so that partial buried point codes can be generated.
The buried point code template setting module is described with reference to the accompanying drawings. Referring to fig. 3, fig. 3 is a schematic diagram of a buried point code template setting module according to an embodiment of the present application. And triggering an opening control of the embedded point code template setting module in the embedded point platform, and opening an embedded point code template display page of the embedded point code template setting module in the embedded point platform, wherein the embedded point code template display page is displayed in a platform display area. Namely, after triggering the opening control of the embedded point code template setting module, the page currently displayed in the platform display area jumps to the embedded point code template display page. As an alternative example, the open control of the embedded code template setting module is an embedded code template setting module open button provided in the toolbar of the embedded platform, which is typically displayed as an icon in the toolbar.
The embedded point code module display page is provided with an embedded point code template editing area 103, and the embedded point code template can be edited in the embedded point code template editing area 103, so that the embedded point code template can be flexibly changed according to the requirements of embedded point code developers, and the requirements of different embedded point code developers can be met. And a reset control and a save control are also arranged in the embedded point code module display page. Triggering the reset control, the embedded point code template in the embedded point code template editing area 103 is emptied, and the embedded point code developer is required to reset. The save control is triggered, the embedded point code template in the embedded point code template editing area 103 is stored, and can be changed continuously later.
In one possible implementation manner, the embodiment of the present application provides a specific implementation manner of the embedded point platform in response to a preset trigger operation of the code editor, and the specific implementation manner is shown in a platform display area of the code editor, specifically please refer to the following A1-A2.
S202: acquiring a position of a point code to be inserted in a source code; the code editing area of the code editor exposes the active code.
The buried point code developer determines the source code into which the buried point code needs to be inserted according to the buried point scheme. In specific implementation, a buried point code developer opens a source code into which a buried point code needs to be inserted in a code editor according to a buried point scheme, and the source code is displayed in a code editing area of the code editor in response to an operation of opening the source code.
Further, when the code editing area of the code editor displays the active code, the embedded point code developer determines a specific position where the embedded point code needs to be inserted in the source code, namely, a position where the embedded point code is to be inserted according to the embedded point scheme. When the embedded point code developer positions the mouse cursor at the position of the embedded point code to be inserted, responding to the cursor positioning operation, and acquiring the position of the embedded point code to be inserted in the source code.
S203: and acquiring target buried point information corresponding to the position of the code to be inserted into the buried point selected from at least one group of buried point information.
After the position of the code to be inserted into the buried point is obtained, the target buried point information corresponding to the position of the code to be inserted into the buried point is required to be obtained. And then, generating a target embedded point code by combining the target embedded point information corresponding to the position of the embedded point code to be inserted and the embedded point code template, and finally adding the target embedded point code to the position of the embedded point code to be inserted.
In specific implementation, a buried point code developer selects target buried point information from at least one group of buried point information, and responds to the selection operation of the buried point code developer on the target buried point information, the target buried point information corresponding to the position of the buried point code to be inserted, which is selected from the at least one group of buried point information, is obtained.
In some possible implementations, two specific embodiments of obtaining target embedded point information corresponding to a position of a code to be inserted, which is selected from at least one set of embedded point information in S203 are provided in the embodiments of the present application, and refer to the following.
S204: and generating a target code according to the buried point code template and the target buried point name and the target buried point attribute in the target buried point information, and adding the target code to the position of the buried point code to be inserted.
After target embedded point information corresponding to the position of the embedded point code to be inserted is obtained, the embedded point code template, the target embedded point name and the target embedded point attribute in the target embedded point information are combined to automatically generate a target code, and then the target code is automatically added to the position of the embedded point code to be inserted. In the specific implementation, the target embedded point name and the target embedded point attribute in the target embedded point information are respectively inserted into the embedded point name variable and the embedded point attribute variable of the embedded point code template, so that the target code can be automatically generated, and the target code is the partial embedded point code.
It will be appreciated that the process of generating the target buried point code from the target buried point information and the buried point code template is automatically performed after the target buried point information is acquired. Because the name of the target embedded point and the attribute of the target embedded point are not manually input by an embedded point code developer, the accuracy of the embedded point code is improved to a certain extent, and the added embedded point code has high reliability. In one possible implementation manner, the embodiment of the present application provides a specific implementation manner of generating a target embedded point code according to the target embedded point information and the embedded point code template, and adding the target embedded point code to a position where the embedded point code is to be inserted, which is specifically referred to below as B1-B3.
S205: acquiring a target buried point attribute value added into a target code; the value of the target buried point attribute accords with the type of the target buried point attribute; the target code and the target embedded point attribute value form the target embedded point code.
Because the generated target code is a partial buried point code, the target buried point attribute value is required to be added in the target code, after the target code is generated, the target buried point attribute value is required to be selected by a buried point code developer according to the target buried point attribute value range in the target buried point information, and the target buried point attribute value is manually edited and added in the automatically generated partial buried point code so as to generate the complete target buried point code. That is, after the embedded point code developer manually edits the target embedded point attribute value, the target code and the target embedded point attribute value form the target embedded point code, and the whole target embedded point code adding process is completed.
It can be understood that when any value range is not specified in the value range of the target embedded point attribute in the target embedded point information, the embedded point code developer can select the value of the target embedded point attribute by himself, and only the selected value of the target embedded point attribute is required to satisfy the type of the target embedded point attribute and the corresponding development environment.
It should be noted that, a type prompt selection area may also be set in the embedded point code module, where the embedded point code developer may select whether to perform type prompt. If the target code is selected, responding to the selection operation of the type prompt, and generating the target code to further comprise definition of the target buried point attribute type and the target buried point attribute value on the programming language level. The definition is automatically generated type definition, so that a buried point code developer can conveniently check whether the manually edited target buried point attribute value is correct.
Based on the content of S201-S205, the embodiment of the present application provides a method for adding embedded point codes, which is used for displaying embedded point platforms in a platform display area of a code editor in response to a preset trigger operation on the code editor. The embedded point platform comprises an embedded point code template setting module and an embedded point information module. The embedded point code template setting module is used for setting an embedded point code template, and the embedded point information module is used for providing at least one group of embedded point information, wherein the embedded point information comprises an embedded point name, an embedded point attribute type and an embedded point attribute value range. The code editing area of the code editor displays the active code and obtains the position of the buried point code to be inserted in the source code. Further, target embedded point information corresponding to the position of the embedded point code to be inserted, which is selected from at least one group of embedded point information provided by the embedded point information module, is obtained, a target code is automatically generated according to the target embedded point name and the target embedded point attribute in the target embedded point information, and the embedded point code template, and the target code is added to the position of the embedded point code to be inserted. And further, acquiring the target buried point attribute value added to the target code, wherein the target buried point attribute value accords with the target buried point attribute type. The target code and the target embedded point attribute value form a complete target embedded point code. In this manner, the embedded point platform may be exposed in the code editor such that embedded point code developers do not need to switch back and forth between the code editor and the embedded point platform. In addition, after the target embedded point information is determined, a target code is automatically generated according to the embedded point code template and the target embedded point name and the target embedded point attribute in the target embedded point information and automatically added to the position of the embedded point code to be inserted. The embedded point code developer does not need to manually edit and add the target embedded point name and the target embedded point attribute in the code editor, only needs to manually add the embedded point attribute value in the automatically generated target code, and can improve the adding efficiency of the embedded point code. And because the name of the target buried point and the attribute of the target buried point are not manually input, the accuracy of the buried point code is improved to a certain extent, and the added buried point code has high reliability.
In the embodiment of the application, the embedded point platform can be displayed in the platform display area of the code editor, so that embedded point code developers do not need to switch back and forth between the code editor and the embedded point platform, and further the efficiency of the embedded point code developers in developing embedded point codes and adding embedded point codes is improved.
In one possible implementation manner, in response to a preset trigger operation on the code editor, the embodiment of the present application provides S201, in which a specific implementation manner of the embedded point platform is displayed in the platform display area of the code editor, including:
a1: responding to a preset triggering operation of the code editor, and opening a page display control in the code editor; the page display control is rendered with an HTML page, an inline frame tag is embedded in the HTML page, and the embedded point platform is embedded into the page display control through the inline frame tag of the HTML page.
In one possible implementation, a page display control is provided in the code editor, an HTML page is rendered on the page display control, and an inline frame tag is embedded on the HTML page. Because the inline frame tag creates an inline frame, the inline frame is set as a buried platform. Thus, embedding the embedded point platform into the page display control can be realized. It should be noted that, the page display control is used for displaying a web page, and in this embodiment, the page display control is used for displaying a buried point platform embedded in an HTML page.
As an alternative example, when the code editor is VScode, the page display control employs VScode WebView. The VScode WebView can be considered as a plug-in to the VScode. Based on the VScode Webview, a fully customizable, complex user interface supporting native file operations may be created in the VScode. For example, an HTML page is created in the VS code. As an alternative example, the inline frame tag embedded on an HTML page is the Iframe tag of the HTML page.
Referring to fig. 4, fig. 4 is a schematic diagram of a buried point platform according to an embodiment of the present application. In conjunction with fig. 4 and the implementation of the foregoing buried platform in the VS code, it can be known that in response to a preset trigger operation on the VS code, the VS code Webview is opened in a Window of the VS code (i.e., VS code Window). The VScode Webview is rendered with an HTML page, an Iframe tag is embedded in the HTML page, and an inline frame set based on the Iframe tag is a buried point platform.
A2: and displaying the embedded point platform in a platform display area of the code editor based on the page display control.
Because the embedded point platform is embedded in the page display control, the embedded point platform can be displayed in the platform display area of the code editor based on the page display control. For example, opening the VScode Webview in the VScode can reveal embedded buried point platforms in the platform display area of the VScode.
Based on the content of A1-A2, in one possible implementation manner, the embodiment of the application provides a specific implementation manner of generating a target embedded point code according to the target embedded point information and the embedded point code template in S204, and adding the target embedded point code to a position to be inserted into the embedded point code, including:
b1: and sending the target embedded point code to the HTML page.
When the embedded point platform is embedded in the code editor through the page display control rendered with the HTML page and the inline frame tag arranged on the HTML page, after generating the target embedded point code according to the target embedded point information and the embedded point code template, the target embedded point code is sent to the HTML page through the embedded point platform.
For example, referring to FIG. 4, when the code editor is VScode, the page display control is VScode WebView, and the inline frame tag is an Iframe tag, the target embedded code is sent to the HTML page through the embedded platform.
B2: and sending the target embedded point code to a page display control based on the HTML page.
And after the HTML page receives the target embedded point code, the target embedded point code is sent to the page display control. For example, when the page display control is VScode Webview, after the HTML page receives the target embedded point code, the target embedded point code is sent to the VScode Webview.
B3: and adding the target embedded point code to the position of the embedded point code to be inserted based on the page display control.
In the implementation, after the page display control receives the target embedded point code, the target embedded point code is added to the position where the embedded point code is to be inserted. For example, when the page display control is VS code Webview, after receiving the target embedded point code, the VS code Webview adds the target embedded point code to the position of the embedded point code to be inserted.
Based on the knowledge of B1-B3, in the embodiment of the present application, by embedding the embedded point platform into the page display control, when the page display control is opened in the code editor, the embedded point platform can be displayed in the platform display area of the code editor. Thus, the embedded point code developer does not need to switch back and forth between the code editor and the embedded point platform to edit the embedded point code, and the embedded point code generation efficiency can be improved.
In an embodiment of the present application, the buried point information module is configured to provide at least one set of buried point information. Referring to fig. 5, fig. 5 is a schematic diagram of a buried point platform display page according to an embodiment of the present application. For ease of understanding, in connection with fig. 5, an embodiment of how the buried point information module provides at least one set of buried point information is provided. Specifically, after obtaining the position of the point code to be inserted in the source code (i.e. S202), before obtaining the target point information corresponding to the position of the point code to be inserted selected from at least one set of point information (i.e. S203), the point code adding method provided in the embodiment of the present application further includes:
And responding to the triggering operation of the opening control of the embedded point information module, and displaying at least one embedded point information operation area in the embedded point information module on the embedded point platform. One buried point information operation area is used for providing one group of buried point information, and different buried point information operation areas are used for providing different buried point information. As an alternative example, the open control of the embedded point information module is an embedded point information module open button provided in a toolbar of the embedded point platform, typically displayed as an icon in the toolbar.
As shown in fig. 5, 3 buried point information operation areas, for example, a buried point information operation area 104, in the buried point information module are shown on the buried point platform. Each buried point information operation area is presented with a buried point name and a buried point description. Each buried point information operation area is provided with an insertion code control and a buried point attribute control.
The embedded point attribute control is used for providing embedded point attributes, embedded point attribute types and embedded point attribute value ranges. Specifically, a buried point code developer triggers a buried point attribute control, and opens a buried point attribute display page in response to triggering operation of the buried point attribute control. Each buried point attribute of the buried point, the buried point attribute type corresponding to the buried point attribute and the buried point attribute value range can be checked on the buried point attribute display page. In addition, in order to clearly understand the role of the buried point attribute, a description of the buried point attribute is also shown on the buried point attribute page. It is understood that the buried point name, the buried point attribute type, and the buried point attribute value range constitute buried point information.
In addition, when the embedded point code developer triggers the inserted code control, the embedded point code can be automatically generated by combining the embedded point code template and the embedded point information provided by the embedded point information operation area where the inserted code control is located in response to the triggering operation of the inserted code control, and the generated embedded point code is automatically inserted into a preselected position in the source code.
As an alternative example, a buried point code developer may determine a source code into which a buried point code needs to be inserted and a location in the source code to be inserted from a buried point description of a buried point scheme.
Based on the foregoing, in one possible implementation manner, the embodiment of the present application provides a specific implementation manner of obtaining, in S203, target embedded point information corresponding to a position of a code to be inserted, where the target embedded point information is selected from at least one set of embedded point information, where the specific implementation manner includes:
determining a target embedded point information operation area in the at least one embedded point information operation area in response to a trigger operation of a target inserted code control in the at least one inserted code control; the target embedded point information operation area is the embedded point information operation area where the target inserted code control is located;
and acquiring target buried point information corresponding to the code position of the buried point to be inserted according to the target buried point name displayed in the target buried point information operation area and the target buried point attribute, the target buried point attribute type and the target buried point attribute value range provided by the target buried point attribute control in the target buried point information operation area.
That is, after the embedded point code developer triggers the target insertion code control, the embedded point information provided by the target embedded point information operation area where the target insertion code control is located is the target embedded point information. And responding to the triggering operation of the target insertion code control, and acquiring target embedded point information consisting of the target embedded point name, the target embedded point attribute type and the target embedded point attribute value range. The target embedded point information is embedded point information corresponding to the position of the embedded point code to be inserted.
And then, based on the generated target embedded point information, the target embedded point code can be automatically generated by combining the embedded point code template, and the generated target embedded point code is automatically added to the position of the embedded point code to be inserted in the source code.
Based on the specific implementation of how the embedded point information module shown in fig. 5 provides at least one set of embedded point information in the embodiment of the present application, the embedded point code developer may automatically generate the target embedded point code by triggering the target embedded point code, responding to the triggering operation of the embedded point code developer on the target embedded point code, and automatically adding the target embedded point code to the to-be-inserted embedded point code position of the source code. Thus, the embedded point code developer does not need to manually edit the embedded point code in the code editor, the adding efficiency of the embedded point code can be improved, and the reliability is high.
In addition, referring to fig. 6, fig. 6 is a schematic diagram of another embedded point platform display page according to an embodiment of the present application. In connection with fig. 6, an embodiment of the present application further provides a specific implementation of how the buried point information module provides at least one set of buried point information. Specifically, after obtaining the position of the point code to be inserted in the source code (i.e. S202), before obtaining the target point information corresponding to the position of the point code to be inserted selected from at least one set of point information (i.e. S203), the point code adding method provided in the embodiment of the present application further includes:
and responding to the triggering operation of the opening control of the embedded point information module, and displaying at least one embedded point information operation area and one inserted code control on the embedded point platform. One buried point information operation area is used for providing one group of buried point information, and different buried point information operation areas are used for providing different buried point information. As an alternative example, the open control of the embedded point information module is an embedded point information module open button provided in a toolbar of the embedded point platform, typically displayed as an icon in the toolbar.
As shown in fig. 6, 3 buried point information operation areas, for example, a buried point information operation area 105, in the buried point information module are shown on the buried point platform. Each buried point information operation area is presented with a buried point name and a buried point description. In the buried point information operation areas shown in fig. 6, each buried point information operation area is provided with one buried point attribute control. The related description of the embedded point attribute control may refer to the technical details of the embedded point attribute control in fig. 5, which are not described herein.
In addition, when the embedded point code developer selects the embedded point information operation area and then triggers the inserted code control, the embedded point code is automatically generated by combining the embedded point information provided by the embedded point code template and the selected embedded point information operation area in response to the selected operation of the embedded point information operation area and the triggering operation of the inserted code control, and the generated embedded point code is automatically inserted into a preselected position in the source code.
Based on the foregoing, in one possible implementation manner, another embodiment of obtaining, in S203, target embedded point information corresponding to a position of a code to be inserted, which is selected from at least one set of embedded point information, includes:
the method for acquiring the target embedded point information corresponding to the position of the embedded point code to be inserted, which is selected from at least one group of embedded point information, comprises the following steps:
determining a target buried point information operation area in response to a trigger operation to the target buried point information operation area in the at least one buried point information operation area;
and responding to the triggering operation of the inserted code control, and acquiring target embedded point information corresponding to the position of the code to be inserted according to the target embedded point name displayed in the target embedded point information operation area and the target embedded point attribute, the target embedded point attribute type and the target embedded point attribute value range provided by the target embedded point attribute control in the target embedded point information operation area.
That is, after the buried point code developer triggers the target buried point information operation region of the at least one buried point information operation region, the target buried point information operation region is determined in response to the trigger operation of the buried point code developer. Further, the embedded point code developer triggers the inserted code control, and the target embedded point information corresponding to the position of the embedded point code to be inserted is obtained according to the target embedded point name, the target embedded point attribute type and the target embedded point attribute value range in response to the triggering operation of the inserted code control.
The embedded point code template is provided with embedded point name variables and embedded point attribute variables. Because the target embedded point information comprises the target embedded point name, the target embedded point attribute type and the target embedded point attribute value range, after the target embedded point information is determined, the target embedded point code can be automatically generated by combining the embedded point code template, and the generated target embedded point code is automatically added to the position of the embedded point code to be inserted in the source code.
Based on the specific implementation of how the embedded point information module shown in fig. 6 provides at least one set of embedded point information in the embodiment of the present application, the embedded point code developer may automatically generate the target embedded point code by triggering the target embedded point information operation area and inserting the embedded point code control, and automatically add the target embedded point code to the to-be-inserted embedded point code position of the source code in response to the triggering operation of the target embedded point information operation area and inserting the embedded point code control. Thus, the embedded point code developer does not need to manually edit the embedded point code in the code editor, the adding efficiency of the embedded point code can be improved, and the reliability is high.
Based on the method for adding the embedded point code provided by the embodiment of the method, the embodiment of the application also provides an embedded point code adding device, and the embedded point code adding device will be described below with reference to the accompanying drawings.
Referring to fig. 7, the structure of a buried point code adding device according to an embodiment of the present application is shown. As shown in fig. 7, the embedded point code adding device includes:
a first display unit 701, configured to respond to a preset trigger operation on a code editor, and display a buried point platform in a platform display area of the code editor; the embedded point platform comprises an embedded point code template setting module and an embedded point information module; the embedded point code template setting module is used for setting an embedded point code template; the buried point information module is used for providing at least one group of buried point information; the buried point information comprises a buried point name, a buried point attribute type and a buried point attribute value range;
a first obtaining unit 702, configured to obtain a position of a point code to be inserted in a source code; the source code is displayed in a code editing area of the code editor;
a second obtaining unit 703, configured to obtain target embedded point information corresponding to the to-be-inserted embedded point code position selected from at least one set of the embedded point information;
An adding unit 704, configured to generate an object code according to the object point name and the object point attribute in the object point information, and the object code template, and add the object code to the position of the object code to be inserted;
a third obtaining unit 705, configured to obtain a target buried point attribute value added to the target code; the value of the target buried point attribute accords with the type of the target buried point attribute; and the target code and the target buried point attribute value form a target buried point code.
In one possible implementation, the apparatus further includes:
the second display unit is used for responding to the triggering operation of the opening control of the embedded point information module and displaying at least one embedded point information operation area in the embedded point information module on the embedded point platform before the target embedded point information corresponding to the embedded point code position to be inserted selected from at least one group of the embedded point information is obtained after the embedded point code position to be inserted in the source code is obtained; the embedded point information operation area is provided with an insertion code control and an embedded point attribute control, and an embedded point name is displayed; the buried point attribute control is used for providing buried point attributes, buried point attribute types and buried point attribute value ranges.
In one possible implementation manner, the second obtaining unit 703 includes:
a first determining subunit, configured to determine a target embedded point information operation area in at least one embedded point information operation area in response to a trigger operation on a target inserted code control in at least one of the inserted code controls; the target embedded point information operation area is the embedded point information operation area where the target inserted code control is located;
the first obtaining subunit is configured to obtain, according to the target embedded point name displayed in the target embedded point information operation area and the target embedded point attribute, the target embedded point attribute type and the target embedded point attribute value range provided by the target embedded point attribute control in the target embedded point information operation area, target embedded point information corresponding to the to-be-inserted embedded point code position.
In one possible implementation, the apparatus further includes:
the third display unit is used for responding to the triggering operation of the opening control of the embedded point information module to display at least one embedded point information operation area and one inserted code control on the embedded point platform before the target embedded point information corresponding to the embedded point code position to be inserted selected from at least one group of embedded point information is obtained after the embedded point code position to be inserted in the source code is obtained; the buried point information operation area is provided with a buried point attribute control and displays a buried point name; the buried point attribute control is used for providing buried point attributes, buried point attribute types and buried point attribute value ranges.
In one possible implementation manner, the second obtaining unit 703 includes:
a second determination subunit configured to determine a target buried point information operation area in response to a trigger operation to the target buried point information operation area in at least one of the buried point information operation areas;
the second obtaining subunit is configured to respond to a triggering operation on the inserted code control, and obtain, according to the target embedded point name displayed in the target embedded point information operation area and the target embedded point attribute, the target embedded point attribute type and the target embedded point attribute value range provided by the target embedded point attribute control in the target embedded point information operation area, target embedded point information corresponding to the code position to be inserted.
In one possible implementation manner, the first display unit 701 includes:
an opening subunit, configured to respond to a preset trigger operation on a code editor, and open a page display control in the code editor; the page display control is rendered with an HTML page, an inline frame tag is embedded in the HTML page, and the embedded point platform is embedded into the page display control through the inline frame tag of the HTML page;
And the display subunit is used for displaying the embedded point platform in the platform display area of the code editor based on the page display control.
In one possible implementation manner, the adding unit 704 includes:
the first sending subunit is used for sending the target embedded point code to the HTML page;
the second sending subunit is used for sending the target embedded point code to the page display control based on the HTML page;
and the adding subunit is used for adding the target embedded point code to the position of the embedded point code to be inserted based on the page display control.
Based on the embedded point code adding method provided by the embodiment of the method, the application also provides electronic equipment, which comprises the following steps: one or more processors; and a storage device having one or more programs stored thereon, which when executed by the one or more processors, cause the one or more processors to implement the embedded point code addition method according to any one of the above embodiments.
Referring now to fig. 8, a schematic diagram of an electronic device 800 suitable for use in implementing embodiments of the present application is shown. The terminal devices in the embodiments of the present application may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (Personal Digital Assistant, personal digital assistants), PADs (portable android device, tablet computers), PMPs (Portable Media Player, portable multimedia players), vehicle-mounted terminals (e.g., car navigation terminals), and the like, and fixed terminals such as digital TVs (televisions), desktop computers, and the like. The electronic device shown in fig. 8 is only an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present application.
As shown in fig. 8, the electronic device 800 may include a processing means (e.g., a central processor, a graphics processor, etc.) 801, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 802 or a program loaded from a storage means 806 into a Random Access Memory (RAM) 803. In the RAM803, various programs and data required for the operation of the electronic device 800 are also stored. The processing device 801, the ROM 802, and the RAM803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to the bus 804.
In general, the following devices may be connected to the I/O interface 805: input devices 806 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 807 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, etc.; storage 806 including, for example, magnetic tape, hard disk, etc.; communication means 809. The communication means 809 may allow the electronic device 800 to communicate wirelessly or by wire with other devices to exchange data. While fig. 8 shows an electronic device 800 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present application, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via communication device 809, or installed from storage device 806, or installed from ROM 802. When being executed by the processing device 801, performs the above-described functions defined in the methods of the embodiments of the present application.
The electronic device provided in the embodiment of the present application and the embedded point code adding method provided in the foregoing embodiment belong to the same inventive concept, and technical details not described in detail in the present embodiment may be referred to the foregoing embodiment, and the present embodiment has the same beneficial effects as the foregoing embodiment.
Based on the foregoing method embodiment, the present application provides a computer readable medium, on which a computer program is stored, where the program when executed by a processor implements the foregoing method for adding a buried point code according to any one of the foregoing embodiments.
It should be noted that the computer readable medium described in the present application may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present application, however, a computer-readable signal medium may include a data signal that propagates in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to perform the embedded point code addition method.
Computer program code for carrying out operations of the present application may be written in one or more programming languages, including, but not limited to, an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present application may be implemented by software, or may be implemented by hardware. The name of the unit/module is not limited to the unit itself in some cases, and, for example, the voice data acquisition module may also be described as a "data acquisition module".
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this application, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the present application, there is provided a buried point code adding method, the method including:
responding to a preset triggering operation of a code editor, and displaying a buried point platform in a platform display area of the code editor; the embedded point platform comprises an embedded point code template setting module and an embedded point information module; the embedded point code template setting module is used for setting an embedded point code template; the buried point information module is used for providing at least one group of buried point information; the buried point information comprises a buried point name, a buried point attribute type and a buried point attribute value range;
acquiring a position of a point code to be inserted in a source code; the source code is displayed in a code editing area of the code editor;
acquiring target buried point information corresponding to the position of the buried point code to be inserted, which is selected from at least one group of the buried point information;
generating a target code according to the buried point code template, a target buried point name and a target buried point attribute in the target buried point information, and adding the target code to the position of the buried point code to be inserted;
acquiring a target buried point attribute value added into the target code; the value of the target buried point attribute accords with the type of the target buried point attribute; and the target code and the target buried point attribute value form a target buried point code.
According to one or more embodiments of the present application, there is provided a method for adding a buried point code [ example two ], after the obtaining a to-be-inserted buried point code position in a source code, before the obtaining target buried point information corresponding to the to-be-inserted buried point code position selected from at least one set of the buried point information, the method further including:
responding to triggering operation of an opening control of the embedded point information module, and displaying at least one embedded point information operation area in the embedded point information module on the embedded point platform; the embedded point information operation area is provided with an insertion code control and an embedded point attribute control, and an embedded point name is displayed; the buried point attribute control is used for providing buried point attributes, buried point attribute types and buried point attribute value ranges.
According to one or more embodiments of the present application, there is provided a method for adding a buried point code, where the obtaining target buried point information corresponding to the to-be-inserted buried point code position selected from at least one set of the buried point information includes:
determining a target embedded point information operation area in at least one embedded point information operation area in response to a trigger operation of a target inserted code control in at least one inserted code control; the target embedded point information operation area is the embedded point information operation area where the target inserted code control is located;
And acquiring the target buried point information corresponding to the position of the code to be inserted in the buried point according to the target buried point name displayed in the target buried point information operation area and the target buried point attribute, the target buried point attribute type and the target buried point attribute value range provided by the target buried point attribute control in the target buried point information operation area.
According to one or more embodiments of the present application, there is provided a method for adding a buried point code [ example four ], after the obtaining a to-be-inserted buried point code position in a source code, before the obtaining target buried point information corresponding to the to-be-inserted buried point code position selected from at least one set of the buried point information, the method further including:
responding to the triggering operation of the opening control of the embedded point information module, and displaying at least one embedded point information operation area and an inserted code control on the embedded point platform; the buried point information operation area is provided with a buried point attribute control and displays a buried point name; the buried point attribute control is used for providing buried point attributes, buried point attribute types and buried point attribute value ranges.
According to one or more embodiments of the present application, there is provided a method for adding a buried point code, which includes:
Determining a target buried point information operation area in response to a trigger operation to the target buried point information operation area in at least one buried point information operation area;
and responding to the triggering operation of the inserted code control, and acquiring target buried point information corresponding to the code position to be inserted according to the target buried point name displayed in the target buried point information operation area and the target buried point attribute, the target buried point attribute type and the target buried point attribute value range provided by the target buried point attribute control in the target buried point information operation area.
According to one or more embodiments of the present application, there is provided a method for adding a buried point code, wherein the displaying, in response to a preset trigger operation on a code editor, the buried point platform in a platform display area of the code editor includes:
responding to preset triggering operation of a code editor, and opening a page display control in the code editor; the page display control is rendered with an HTML page, an inline frame tag is embedded in the HTML page, and the embedded point platform is embedded into the page display control through the inline frame tag of the HTML page;
And displaying the embedded point platform in a platform display area of the code editor based on the page display control.
According to one or more embodiments of the present application, there is provided a buried point code adding method of adding the target buried point code to the to-be-inserted buried point code location, including:
sending the target embedded point code to the HTML page;
based on the HTML page, sending the target embedded point code to the page display control;
and adding the target embedded point code to the position of the embedded point code to be inserted based on the page display control.
According to one or more embodiments of the present application, there is provided a buried point code adding apparatus, including:
the first display unit is used for responding to the preset triggering operation of the code editor and displaying the embedded point platform in the platform display area of the code editor; the embedded point platform comprises an embedded point code template setting module and an embedded point information module; the embedded point code template setting module is used for setting an embedded point code template; the buried point information module is used for providing at least one group of buried point information; the buried point information comprises a buried point name, a buried point attribute type and a buried point attribute value range;
The first acquisition unit is used for acquiring the position of the buried point code to be inserted in the source code; the source code is displayed in a code editing area of the code editor;
the second acquisition unit is used for acquiring target buried point information corresponding to the position of the buried point code to be inserted, which is selected from at least one group of the buried point information;
an adding unit, configured to generate a target code according to the embedded point code template and a target embedded point name and a target embedded point attribute in the target embedded point information, and add the target code to the to-be-inserted embedded point code position;
a third obtaining unit, configured to obtain a target buried point attribute value added to the target code; the value of the target buried point attribute accords with the type of the target buried point attribute; and the target code and the target buried point attribute value form a target buried point code.
According to one or more embodiments of the present application, there is provided a buried point code adding apparatus [ example nine ], the apparatus further comprising:
the second display unit is used for responding to the triggering operation of the opening control of the embedded point information module and displaying at least one embedded point information operation area in the embedded point information module on the embedded point platform before the target embedded point information corresponding to the embedded point code position to be inserted selected from at least one group of the embedded point information is obtained after the embedded point code position to be inserted in the source code is obtained; the embedded point information operation area is provided with an insertion code control and an embedded point attribute control, and an embedded point name is displayed; the buried point attribute control is used for providing buried point attributes, buried point attribute types and buried point attribute value ranges.
According to one or more embodiments of the present application, there is provided a buried point code adding apparatus, the second obtaining unit including:
a first determining subunit, configured to determine a target embedded point information operation area in at least one embedded point information operation area in response to a trigger operation on a target inserted code control in at least one of the inserted code controls; the target embedded point information operation area is the embedded point information operation area where the target inserted code control is located;
the first obtaining subunit is configured to obtain, according to the target embedded point name displayed in the target embedded point information operation area and the target embedded point attribute, the target embedded point attribute type and the target embedded point attribute value range provided by the target embedded point attribute control in the target embedded point information operation area, target embedded point information corresponding to the to-be-inserted embedded point code position.
According to one or more embodiments of the present application, there is provided a buried point code adding apparatus [ example eleven ], the apparatus further comprising:
the third display unit is used for responding to the triggering operation of the opening control of the embedded point information module to display at least one embedded point information operation area and one inserted code control on the embedded point platform before the target embedded point information corresponding to the embedded point code position to be inserted selected from at least one group of embedded point information is obtained after the embedded point code position to be inserted in the source code is obtained; the buried point information operation area is provided with a buried point attribute control and displays a buried point name; the buried point attribute control is used for providing buried point attributes, buried point attribute types and buried point attribute value ranges.
According to one or more embodiments of the present application, there is provided a buried point code adding apparatus [ example twelve ], the second obtaining unit including:
a second determination subunit configured to determine a target buried point information operation area in response to a trigger operation to the target buried point information operation area in at least one of the buried point information operation areas;
the second obtaining subunit is configured to respond to a triggering operation on the inserted code control, and obtain, according to the target embedded point name displayed in the target embedded point information operation area and the target embedded point attribute, the target embedded point attribute type and the target embedded point attribute value range provided by the target embedded point attribute control in the target embedded point information operation area, target embedded point information corresponding to the code position to be inserted.
According to one or more embodiments of the present application, there is provided a buried point code adding apparatus [ example thirteenth ], the first display unit including:
an opening subunit, configured to respond to a preset trigger operation on a code editor, and open a page display control in the code editor; the page display control is rendered with an HTML page, an inline frame tag is embedded in the HTML page, and the embedded point platform is embedded into the page display control through the inline frame tag of the HTML page;
And the display subunit is used for displaying the embedded point platform in the platform display area of the code editor based on the page display control.
According to one or more embodiments of the present application, there is provided a buried point code adding apparatus, the adding unit including:
the first sending subunit is used for sending the target embedded point code to the HTML page;
the second sending subunit is used for sending the target embedded point code to the page display control based on the HTML page;
and the adding subunit is used for adding the target embedded point code to the position of the embedded point code to be inserted based on the page display control.
According to one or more embodiments of the present application, there is provided an electronic device, comprising: one or more processors; and a storage device having one or more programs stored thereon, which when executed by the one or more processors, cause the one or more processors to implement the embedded point code addition method according to any one of the above embodiments.
According to one or more embodiments of the present application, there is provided a computer readable medium having a computer program stored thereon, wherein the program when executed by a processor implements a buried point code adding method as described in any of the embodiments above.
It should be noted that, in the present description, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different manner from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other. For the system or device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and the relevant points refer to the description of the method section.
It should be understood that in this application, "at least one" means one or more, and "a plurality" means two or more. "and/or" for describing the association relationship of the association object, the representation may have three relationships, for example, "a and/or B" may represent: only a, only B and both a and B are present, wherein a, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one of" or the like means any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (one) of a, b or c may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural.
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 apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A buried point code adding method, the method comprising:
responding to a preset triggering operation of a code editor, and displaying a buried point platform in a platform display area of the code editor; the embedded point platform comprises an embedded point code template setting module and an embedded point information module; the embedded point code template setting module is used for setting an embedded point code template; the buried point information module is used for providing at least one group of buried point information; the buried point information comprises a buried point name, a buried point attribute type and a buried point attribute value range; the buried point code template is provided with a buried point name variable and a buried point attribute variable;
Acquiring a position of a point code to be inserted in a source code; the source code is displayed in a code editing area of the code editor;
acquiring target buried point information corresponding to the position of the buried point code to be inserted, which is selected from at least one group of the buried point information;
generating a target code according to the buried point code template, a target buried point name and a target buried point attribute in the target buried point information, and adding the target code to the position of the buried point code to be inserted; the generating the object code according to the object point code template, the object point name and the object point attribute in the object point information comprises: inserting the target buried point name and the target buried point attribute in the target buried point information into the buried point name variable and the buried point attribute variable of the buried point code template respectively to generate a target code;
acquiring a target buried point attribute value added into the target code; the value of the target buried point attribute accords with the type of the target buried point attribute; and the target code and the target buried point attribute value form a target buried point code.
2. The method according to claim 1, wherein after the obtaining the position of the to-be-inserted buried point code in the source code, before the obtaining the target buried point information corresponding to the position of the to-be-inserted buried point code selected from at least one set of the buried point information, the method further comprises:
Responding to triggering operation of an opening control of the embedded point information module, and displaying at least one embedded point information operation area in the embedded point information module on the embedded point platform; the embedded point information operation area is provided with an insertion code control and an embedded point attribute control, and an embedded point name is displayed; the buried point attribute control is used for providing buried point attributes, buried point attribute types and buried point attribute value ranges.
3. The method according to claim 2, wherein the obtaining target embedded point information corresponding to the to-be-inserted embedded point code position selected from at least one set of the embedded point information includes:
determining a target embedded point information operation area in at least one embedded point information operation area in response to a trigger operation of a target inserted code control in at least one inserted code control; the target embedded point information operation area is the embedded point information operation area where the target inserted code control is located;
and acquiring the target buried point information corresponding to the position of the code to be inserted in the buried point according to the target buried point name displayed in the target buried point information operation area and the target buried point attribute, the target buried point attribute type and the target buried point attribute value range provided by the target buried point attribute control in the target buried point information operation area.
4. The method according to claim 1, wherein after the obtaining the position of the to-be-inserted buried point code in the source code, before the obtaining the target buried point information corresponding to the position of the to-be-inserted buried point code selected from at least one set of the buried point information, the method further comprises:
responding to the triggering operation of the opening control of the embedded point information module, and displaying at least one embedded point information operation area and an inserted code control on the embedded point platform; the buried point information operation area is provided with a buried point attribute control and displays a buried point name; the buried point attribute control is used for providing buried point attributes, buried point attribute types and buried point attribute value ranges.
5. The method of claim 4, wherein the obtaining target embedded point information corresponding to the to-be-inserted embedded point code location selected from at least one set of the embedded point information comprises:
determining a target buried point information operation area in response to a trigger operation to the target buried point information operation area in at least one buried point information operation area;
and responding to the triggering operation of the inserted code control, and acquiring target buried point information corresponding to the code position to be inserted according to the target buried point name displayed in the target buried point information operation area and the target buried point attribute, the target buried point attribute type and the target buried point attribute value range provided by the target buried point attribute control in the target buried point information operation area.
6. The method of claim 1, wherein the exposing the embedded point platform in a platform display area of the code editor in response to a preset trigger operation of the code editor comprises:
responding to preset triggering operation of a code editor, and opening a page display control in the code editor; the page display control is rendered with an HTML page, an inline frame tag is embedded in the HTML page, and the embedded point platform is embedded into the page display control through the inline frame tag of the HTML page;
and displaying the embedded point platform in a platform display area of the code editor based on the page display control.
7. The method of claim 6, wherein the adding the target embedded point code to the embedded point code location to be inserted comprises:
sending the target embedded point code to the HTML page;
based on the HTML page, sending the target embedded point code to the page display control;
and adding the target embedded point code to the position of the embedded point code to be inserted based on the page display control.
8. A buried point code adding apparatus, characterized in that the apparatus comprises:
The first display unit is used for responding to the preset triggering operation of the code editor and displaying the embedded point platform in the platform display area of the code editor; the embedded point platform comprises an embedded point code template setting module and an embedded point information module; the embedded point code template setting module is used for setting an embedded point code template; the buried point information module is used for providing at least one group of buried point information; the buried point information comprises a buried point name, a buried point attribute type and a buried point attribute value range; the buried point code template is provided with a buried point name variable and a buried point attribute variable;
the first acquisition unit is used for acquiring the position of the buried point code to be inserted in the source code; the source code is displayed in a code editing area of the code editor;
the second acquisition unit is used for acquiring target buried point information corresponding to the position of the buried point code to be inserted, which is selected from at least one group of the buried point information;
an adding unit, configured to generate a target code according to the embedded point code template and a target embedded point name and a target embedded point attribute in the target embedded point information, and add the target code to the to-be-inserted embedded point code position; the generating the object code according to the object point code template, the object point name and the object point attribute in the object point information comprises: inserting the target buried point name and the target buried point attribute in the target buried point information into the buried point name variable and the buried point attribute variable of the buried point code template respectively to generate a target code;
A third obtaining unit, configured to obtain a target buried point attribute value added to the target code; the value of the target buried point attribute accords with the type of the target buried point attribute; and the target code and the target buried point attribute value form a target buried point code.
9. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the embedded point code addition method of any of claims 1-7.
10. A computer readable medium, characterized in that a computer program is stored thereon, wherein the program, when executed by a processor, implements the embedded code addition method according to any of claims 1-7.
CN202111584462.9A 2021-12-22 2021-12-22 Buried point code adding method, device and equipment Active CN114489660B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111584462.9A CN114489660B (en) 2021-12-22 2021-12-22 Buried point code adding method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111584462.9A CN114489660B (en) 2021-12-22 2021-12-22 Buried point code adding method, device and equipment

Publications (2)

Publication Number Publication Date
CN114489660A CN114489660A (en) 2022-05-13
CN114489660B true CN114489660B (en) 2024-03-08

Family

ID=81493918

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111584462.9A Active CN114489660B (en) 2021-12-22 2021-12-22 Buried point code adding method, device and equipment

Country Status (1)

Country Link
CN (1) CN114489660B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20150099141A (en) * 2014-02-21 2015-08-31 주식회사 넥스다임 A method for providing an application developing environment
CN107295050A (en) * 2016-04-01 2017-10-24 阿里巴巴集团控股有限公司 Front end user behavioral statisticses method and device
CN109933317A (en) * 2018-12-24 2019-06-25 阿里巴巴集团控股有限公司 Bury point methods, device, server and readable storage medium storing program for executing
CN112799927A (en) * 2021-01-28 2021-05-14 中国工商银行股份有限公司 Operation behavior information acquisition method and device for front-end user
CN113268695A (en) * 2021-05-31 2021-08-17 平安国际智慧城市科技股份有限公司 Data embedding point processing method and device and related equipment
CN113485689A (en) * 2021-07-02 2021-10-08 北京达佳互联信息技术有限公司 Buried point processing method and device
CN113568621A (en) * 2021-07-30 2021-10-29 北京达佳互联信息技术有限公司 Data processing method and device for page embedded point

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20150099141A (en) * 2014-02-21 2015-08-31 주식회사 넥스다임 A method for providing an application developing environment
CN107295050A (en) * 2016-04-01 2017-10-24 阿里巴巴集团控股有限公司 Front end user behavioral statisticses method and device
CN109933317A (en) * 2018-12-24 2019-06-25 阿里巴巴集团控股有限公司 Bury point methods, device, server and readable storage medium storing program for executing
CN112799927A (en) * 2021-01-28 2021-05-14 中国工商银行股份有限公司 Operation behavior information acquisition method and device for front-end user
CN113268695A (en) * 2021-05-31 2021-08-17 平安国际智慧城市科技股份有限公司 Data embedding point processing method and device and related equipment
CN113485689A (en) * 2021-07-02 2021-10-08 北京达佳互联信息技术有限公司 Buried point processing method and device
CN113568621A (en) * 2021-07-30 2021-10-29 北京达佳互联信息技术有限公司 Data processing method and device for page embedded point

Also Published As

Publication number Publication date
CN114489660A (en) 2022-05-13

Similar Documents

Publication Publication Date Title
CN111274760B (en) Rich text data processing method and device, electronic equipment and computer storage medium
JP2021103506A (en) Method and device for generating information
CN110780874B (en) Method and device for generating information
CN111796820B (en) Method and device for constructing front-end page based on integrated assembly and electronic equipment
CN112684968A (en) Page display method and device, electronic equipment and computer readable medium
CN111857720B (en) User interface state information generation method and device, electronic equipment and medium
Zibula et al. Cross-platform development using HTML5, jQuery mobile, and phonegap: realizing a smart meter application
CN111597107A (en) Information output method and device and electronic equipment
CN110618811B (en) Information presentation method and device
CN111752644A (en) Interface simulation method, device, equipment and storage medium
CN114489660B (en) Buried point code adding method, device and equipment
CN110717126A (en) Page browsing method and device, electronic equipment and computer readable storage medium
CN110554892A (en) Information acquisition method and device
CN111309323B (en) Parameter initialization method and device and electronic equipment
CN113282285A (en) Code compiling method and device, electronic equipment and storage medium
CN113535037A (en) Interactive display method and device for command line terminal, computer readable medium and equipment
CN113672317A (en) Method and device for rendering title page
CN113094286B (en) Page test method and device, storage medium and electronic equipment
CN115328811B (en) Program statement testing method and device for industrial control network simulation and electronic equipment
CN111104626B (en) Information storage method and device
CN117435180A (en) Page component adding method and device
CN111694833B (en) Data processing method, device, electronic equipment and computer readable storage medium
CN116521152A (en) Method, device and equipment for implementing code editor
CN114428823A (en) Data linkage method, device, equipment and medium based on multidimensional variable expression
CN110618812A (en) Information presentation 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
CB02 Change of applicant information

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: Douyin Vision Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant before: Tiktok vision (Beijing) Co.,Ltd.

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: Tiktok vision (Beijing) Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant