Method and system for configuring data burying points based on program service management framework
By mounting data buried function based on the program business management framework in game development and using independent configuration file management, the problem of frequent code modification in data buried points in the existing technology is solved, improving efficiency and reducing error rate.
Patent Information
- Application Number
- CN202310953368.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-01
- Publication Date
- 2025-02-14
AI Technical Summary
In game development, the existing technology requires frequent modification of code in game business logic to implement data burial points, which leads to time-consuming and prone to errors and code conflicts.
Adopt the data buried point method based on the program business management framework, and use independent data buried point configuration files to manage it by mounting the data buried point function to UI button click events, network communication functions, business logic events and interface status changes. .
This reduces bugs and business logic coupling problems caused by the need to modify the code of data buried points, improves the efficiency of data buried points and reduces the error rate.
Smart Images

Figure CN119440492A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of game development, and in particular to a method and system for configuring data embedding points based on a program business management framework. Background Art
[0002] In game development, game operations need to monitor players' operating habits, player loss nodes, popular gameplay, etc., and need to place tracking points in each operating process in the game and upload the tracking point data to the data management background. Game operations can then analyze the desired data based on these background data. Usually, the game's data tracking points call the data tracking point function in the game business logic to upload the data to the management background. In this way, if the game business logic changes or the tracking point location needs to be modified, the program script code needs to be modified. Because conflicts are often submitted and adjustments are made according to business changes, it is time-consuming and prone to errors.
[0003] Tracking is a way of data collection, which involves implanting code in the page and location corresponding to each event of user behavior, and reporting statistical data through the SDK collection tool. The data tracking function is used to submit tracking data to the backend. Most of the defined functions are connected to the SDK and call the data tracking line in the SDK. Summary of the invention
[0004] To overcome the above-mentioned problems, the purpose of the present invention is to provide a method for configuring data embedding based on a program business management framework. By configuring data embedding based on the program business management framework, there is no need to couple a large amount of game business code, so there is no need to re-or modify the embedding due to changes in the game business. Moreover, because the program business management framework is relatively fixed, it can reduce the bugs caused by the need to modify the code for data embedding or the impact on the business code.
[0005] The present invention is implemented by the following scheme: a method for configuring data embedding based on a program business management framework, the method comprising the following steps: step 1, mounting a data embedding function for all UI button click events of the game, the data embedding function recording the name of the UI interface where the UI button is located and the parameters of the name of the UI button;
[0006] Step 2: Add a data tracking function before the game network communication function is requested and after the communication is successfully called back by the server. The data tracking function records the network communication interface name and the request and callback parameters.
[0007] Step 3: Mount the game business logic event with a data embedding function, which records the script name where the business logic event is located, the business logic event name, and the event parameters;
[0008] Step 4: Mount the data embedding function by opening and closing the function in the interface of the underlying general function of the UI interface, and the data embedding function records the parameters of the UI interface name and the switch type; the data embedding function is mounted based on the underlying business management framework of each network communication interface;
[0009] Step 5: Create a data tracking configuration file in the game project and configure the places where data tracking is required; the data tracking configuration file includes: tracking type and tracking parameters;
[0010] Step 6. When the data embedding function mounted in steps 1 to 4 is triggered, determine whether the data embedding configuration file contains the corresponding embedding type and corresponding embedding parameters. If so, trigger the corresponding data embedding function, and pass the corresponding parameters into the data embedding function to upload the data to the management background.
[0011] Furthermore, the step 1 is specifically as follows: mount a click event monitoring script on all the UI buttons of the game, and the click event monitoring script is mounted on the UI button. Clicking the UI button in the game will trigger the corresponding data embedding function of the click event monitoring script, and the data embedding function records the name of the UI interface where the UI button is located and the name parameters of the UI button.
[0012] Furthermore, the step 3 is specifically as follows: for the business logic event of the game, when mounting the logic function, determine whether the business logic event is currently empty. If it is empty, mount the data embedding function separately. The data embedding function records the script name where the business logic event is located, the business logic event name and the parameters of the event; if it is not empty, do not perform the mounting operation.
[0013] Furthermore, the step 5 is specifically as follows: creating a data tracking configuration file in the game project, the configuration file uses an Excel table, and setting fields in the Excel table, the fields including tracking types and tracking parameters, the tracking types are the four types of UI button click events in steps 1 to 4, game network communication functions, game business logic events, and interface opening and closing functions of the underlying general functions of the UI interface, and the tracking parameters are the parameters of the records corresponding to steps 1 to 4.
[0014] The present invention also provides a data burying point system configured based on a program business management framework, the system comprising: a button click event mounting data burying point module, a game network communication interface mounting data burying point module, a business logic event mounting data burying point module, an interface status mounting data burying point module, a data burying point configuration module, and a data burying point function triggering module;
[0015] The button click event data embedding module: embeds all the UI button click events of the game into a data embedding function, and the data embedding function records the parameters of the UI interface name where the UI button is located and the name of the UI button;
[0016] The game network communication interface mounts a data embedding module: a data embedding function is added before the game network communication function is requested and after the communication is successfully called back by the server, and the data embedding function records the network communication interface name and the request and callback parameters;
[0017] The business logic event mounting data embedding module: mounts the game business logic event with a data embedding function, which records the script name where the business logic event is located, the business logic event name, and the parameters of the event;
[0018] The interface status mounting data embedding module: the interface opening and closing functions of the underlying general functions of the UI interface mount the data embedding function, which records the parameters of the UI interface name and switch type; the data embedding function is mounted based on the underlying business management framework of each network communication interface;
[0019] The data embedding configuration module: creates a data embedding configuration file in the game project and configures the places where data embedding is required; the data embedding configuration file includes: embedding type and embedding parameters;
[0020] The data burying point function triggering module: when the button click event mounting data burying point module, the game network communication interface mounting data burying point module, the business logic event mounting data burying point module, and the interface status mounting data burying point module are triggered, it is determined whether the data burying point configuration file contains the corresponding burying point type and the corresponding burying point parameters. If so, the corresponding data burying point function is triggered, and the corresponding parameters are passed into the data burying point function to upload the data to the management background.
[0021] Furthermore, the button click event mounting data embedding module is specifically: mounting the click event monitoring script on all the UI buttons of the game, and the click event monitoring script is mounted on the UI button. Clicking the UI button in the game will trigger the corresponding data embedding function of the click event monitoring script. The data embedding function records the name of the UI interface where the UI button is located and the name parameters of the UI button.
[0022] Furthermore, the business logic event mounting data embedding module is specifically as follows: for the business logic event of the game, when mounting the logic function, it is determined whether the business logic event is currently empty. If it is empty, another data embedding function is mounted. The data embedding function records the script name where the business logic event is located, the business logic event name and the parameters of the event; if it is not empty, no mounting operation is performed.
[0023] Furthermore, the data embedding configuration module is specifically as follows: a data embedding configuration file is created in the game project, and the configuration file uses an Excel table. By setting fields in the Excel table, the fields include embedding types and embedding parameters. The embedding types are the four types of UI button click events, game network communication functions, game business logic events, and interface opening and closing functions of the underlying general functions of the UI interface in the data embedding module mounted by button click events, the data embedding module mounted by the game network communication interface, the data embedding module mounted by the business logic event, and the interface status embedding module. The embedding parameters are the parameters of the records corresponding to the data embedding module mounted by the button click event, the data embedding module mounted by the game network communication interface, the data embedding module mounted by the business logic event, and the interface status embedding module.
[0024] The beneficial effects of the present invention are as follows: adding data embedding functions line by line in the business logic requires frequent script modification, which can easily cause script conflicts, and requires changing the embedding position simultaneously with the script business logic change, requiring manpower to resolve the coupling of data embedding and business logic; the present invention embeds data based on configuration files and a general business management framework, and does not require modifying the data embedding position according to the editing of the game business logic, and additions, deletions, modifications and inquiries are all based on independent data embedding configuration files, which improves the efficiency of data embedding and reduces the problem of errors occurring during data embedding. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 It is a schematic flow chart of the method of the present invention.
[0026] Figure 2 It is a system framework principle diagram of the present invention. DETAILED DESCRIPTION
[0027] The present invention will be further described below in conjunction with the accompanying drawings.
[0028] See also Figure 1 As shown, a data embedding method based on a program business management framework is provided in the present invention, and the method comprises the following steps: Step 1, mounting a data embedding function on all UI button click events of the game, and the data embedding function records the parameters of the UI interface name where the UI button is located and the name of the UI button;
[0029] Step 2: Add a data tracking function before the game network communication function is requested and after the communication is successfully called back by the server. The data tracking function records the network communication interface name and the request and callback parameters.
[0030] Step 3: Mount the game business logic event with a data embedding function, which records the script name where the business logic event is located, the business logic event name, and the event parameters;
[0031] Step 4: Mount the data embedding function by opening and closing the function in the interface of the underlying general function of the UI interface, and the data embedding function records the parameters of the UI interface name and the switch type; the data embedding function is mounted based on the underlying business management framework of each network communication interface;
[0032] Step 5: Create a data tracking configuration file in the game project and configure the places where data tracking is required; the data tracking configuration file includes: tracking type and tracking parameters;
[0033] Step 6. When the data embedding function mounted in steps 1 to 4 is triggered, determine whether the data embedding configuration file contains the corresponding embedding type and corresponding embedding parameters. If so, trigger the corresponding data embedding function, and pass the corresponding parameters into the data embedding function to upload the data to the management background.
[0034] The present invention will be further described below in conjunction with a specific embodiment:
[0035] The present invention discloses a method for configuring data embedding points based on a program business management framework. The method comprises: step 1, mounting a data embedding point function for a game UI button click event;
[0036] Step 2: The game's network communication interface mounts the data embedding function;
[0037] Step 3: Game business logic event data embedding function;
[0038] Step 4: Open and close the game interface and load the data embedding function;
[0039] Step 5. Create a tracking configuration file in the game project and configure the places where data tracking is required;
[0040] Step 6: When the data tracking function from step 1 to step 4 is triggered, the configuration file in step 5 is compared. If there is a corresponding configuration, the data tracking upload is triggered.
[0041] The specific implementation process of the present invention is as follows:
[0042] 1. Mount a universal click event monitoring script on all UI buttons of the game. This script is mounted on the UI button. Clicking the UI button in the game will trigger the corresponding function of the script. This data embedding function records the parameters of the UI interface name where the UI button is located and the name of the UI button;
[0043] 2. Add a data tracking function before the game network communication function request and after the communication is successfully called back by the server. The data tracking function records the network communication interface name and the request and callback parameters.
[0044] 3. When mounting the logic function for the game's business logic event, determine whether the business logic event is currently empty. If it is empty, mount another data embedding function, which records the script name where the business logic event is located, the business logic event name, and the event parameters; if it is not empty, do not perform the mounting operation.
[0045] 4. The data embedding function is mounted on the interface opening and closing function of the underlying general function of the UI interface. The data embedding function records the UI interface name and switch type;
[0046] 5. Create a data tracking configuration file in the game project. The configuration file uses an Excel table. By setting fields in the Excel table, the fields include tracking types and tracking parameters. The tracking types are the four types of UI button click events in steps 1 to 4, game network communication functions, game business logic events, and interface opening and closing functions of the underlying general functions of the UI interface. The tracking parameters are the parameters of the records corresponding to steps 1 to 4.
[0047] Examples of various types of game data tracking points are shown in Table 1 below:
[0048]
[0049]
[0050]
[0051] Table 1
[0052] Custom event tracking point (required)
[0053] string category = "Update"; / / event category
[0054] string eventCode = "1001"; / / event code
[0055] string eventName = "Update Task"; / / Event name
[0056] string extra = "{}"; / / Extended information, json format
[0057] / / Game custom buried event
[0058] NDSuperSDK_Bindings.GetInstance().CustomEvent(category,eventCode,eventName,extra);
[0059] Customize event tracking, pass in event classification, event code, event name, expand tracking information according to game requirements, and call a third-party tracking function to upload tracking information examples.
[0060] Standard event tracking point (required)
[0061] string roleId = "1";
[0062] string roleName = "Role Name";
[0063] string roleLevel = "50";
[0064] string roleVipLevel = "2";
[0065] string zoneId = "1";
[0066] string zoneName = "Zone Name";
[0067] string serverId = "1";
[0068] string serverName = "Server Name";
[0069] string eventType="MSG_ID_ENTER_GAME";
[0070] / / SDK standard event tracking point, please refer to the access document for other events
[0071] NDSuperSDK_Bindings.GetInstance().TrackEvent(eventType,GetRoleJsonData(roleId,roleName,roleLevel,roleVipLevel,zoneId,zoneName,serverId,serverName,roleCreateTime));
[0072] Standard event tracking, input event type, event information, and call the third-party standard tracking line to upload the standard tracking information example.
[0073] 6. When the data tracking function mounted in steps 1 to 4 is triggered, determine whether the data tracking configuration file in step 5 contains the corresponding tracking type and corresponding tracking parameter configuration. If it does, trigger the general tracking function and pass the corresponding parameters to the general tracking function.
[0074] The program-based business management framework of the present invention refers to a program-based business framework. For example, the game network framework has a business bottom-level management framework for managing these communication interfaces at each interface that communicates with the server. Currently, commonly used data embedding points are based on the embedding points of each communication interface of the upper layer. In the prior art, the embedding point information is generally compiled using configuration files and editor panels, and then the embedding point code or script is automatically added to each communication interface of the upper layer. However, the final embedding point code or script is still added to each communication interface or business logic of the business upper layer. The embedding point of the present invention is mounted in the business bottom-level management framework based on each network communication interface, because each network communication interface ultimately executes the basic communication function (base class function) in the business bottom-level management framework, which is relatively stable in the business management framework, avoiding the loss of the original embedding point data or the need to modify the problem. Similarly, the game interface also has a business management class. If the business code or script embedding points for opening and closing each interface are unstable and prone to errors due to modifications, all embedding steps of the present invention are based on the underlying functions of the business management framework to embed points.
[0075] See also Figure 2 As shown, the present invention also provides a data burying point system based on the program business management framework, the system includes: a button click event mounting data burying point module, a game network communication interface mounting data burying point module, a business logic event mounting data burying point module, an interface status mounting data burying point module, a data burying point configuration module, and a data burying point function triggering module;
[0076] The button click event data embedding module: embeds all the UI button click events of the game into a data embedding function, and the data embedding function records the parameters of the UI interface name where the UI button is located and the name of the UI button;
[0077] The game network communication interface mounts a data embedding module: a data embedding function is added before the game network communication function is requested and after the communication is successfully called back by the server, and the data embedding function records the network communication interface name and the request and callback parameters;
[0078] The business logic event mounting data embedding module: mounts the game business logic event with a data embedding function, which records the script name where the business logic event is located, the business logic event name, and the parameters of the event;
[0079] The interface status mounting data embedding module: the interface opening and closing functions of the underlying general functions of the UI interface mount the data embedding function, which records the parameters of the UI interface name and switch type; the data embedding function is mounted based on the underlying business management framework of each network communication interface;
[0080] The data embedding configuration module: creates a data embedding configuration file in the game project and configures the places where data embedding is required; the data embedding configuration file includes: embedding type and embedding parameters;
[0081] The data burying point function triggering module: when the button click event mounting data burying point module, the game network communication interface mounting data burying point module, the business logic event mounting data burying point module, and the interface status mounting data burying point module are triggered, it is determined whether the data burying point configuration file contains the corresponding burying point type and the corresponding burying point parameters. If so, the corresponding data burying point function is triggered, and the corresponding parameters are passed into the data burying point function to upload the data to the management background.
[0082] The button click event mounting data embedding module is specifically: mounting the click event monitoring script on all the UI buttons of the game, and the click event monitoring script is mounted on the UI button. Clicking the UI button in the game will trigger the corresponding data embedding function of the click event monitoring script. The data embedding function records the name of the UI interface where the UI button is located and the name parameters of the UI button.
[0083] The business logic event mounting data embedding module is specifically as follows: for the business logic event of the game, when mounting the logic function, it is determined whether the business logic event is currently empty. If it is empty, another data embedding function is mounted. The data embedding function records the script name where the business logic event is located, the business logic event name and the parameters of the event; if it is not empty, no mounting operation is performed.
[0084] The data embedding configuration module is specifically as follows: a data embedding configuration file is created in the game project. The configuration file uses an Excel table. Fields are set in the Excel table. The fields include embedding types and embedding parameters. The embedding types are the button click event mounting data embedding module, the game network communication interface mounting data embedding module, the business logic event mounting data embedding module, and the interface status mounting data embedding module, including UI button click events, game network communication functions, game business logic events, and interface opening and closing functions of the underlying general functions of the UI interface. The embedding parameters are the parameters of the records corresponding to the button click event mounting data embedding module, the game network communication interface mounting data embedding module, the business logic event mounting data embedding module, and the interface status mounting data embedding module.
[0085] In summary, the present invention is based on data embedding based on configuration files and a general business management framework. There is no need to edit and modify the data embedding location according to the game business logic, and addition, deletion, modification and inquiry are all based on independent data embedding configuration files, which improves the efficiency of data embedding and reduces the problem of errors that occur during data embedding.
[0086] The above description is only a preferred embodiment of the present invention. All equivalent changes and modifications made according to the scope of the patent application of the present invention should fall within the scope of the present invention.
Claims
1. A method for configuring data tracking points based on a program business management framework, characterized in that: The method comprises the following steps: Step 1, mounting a data embedding function for all UI button click events of the game, wherein the data embedding function records the name of the UI interface where the UI button is located and the parameters of the name of the UI button; Step 2: Add a data tracking function before the game network communication function is requested and after the communication is successfully called back by the server. The data tracking function records the network communication interface name and the request and callback parameters. Step 3: Mount the game business logic event with a data embedding function, which records the script name where the business logic event is located, the business logic event name, and the event parameters; Step 4: Mount the data embedding function by opening and closing the function in the interface of the underlying general function of the UI interface, and the data embedding function records the parameters of the UI interface name and the switch type; the data embedding function is mounted based on the underlying business management framework of each network communication interface; Step 5. Create a data tracking configuration file in the game project and configure the places where data tracking is required; The data tracking configuration file includes: tracking type and tracking parameters; Step 6. When the data embedding function mounted in steps 1 to 4 is triggered, determine whether the data embedding configuration file contains the corresponding embedding type and corresponding embedding parameters. If so, trigger the corresponding data embedding function, and pass the corresponding parameters into the data embedding function to upload the data to the management background.
2. According to claim 1, a method for configuring data tracking based on a program business management framework is characterized in that: The step 1 is specifically as follows: mount a click event monitoring script on all the UI buttons of the game. The click event monitoring script is mounted on the UI button. Clicking the UI button in the game will trigger the corresponding data embedding function of the click event monitoring script. The data embedding function records the name of the UI interface where the UI button is located and the name parameters of the UI button.
3. According to claim 1, a method for configuring data tracking based on a program business management framework is characterized in that: The step 3 is specifically as follows: for the business logic event of the game, when mounting the logic function, determining whether the business logic event is currently empty, and if it is empty, mounting a data embedding function, the data embedding function records the script name where the business logic event is located, the name of the business logic event, and the parameters of the event; If it is not empty, no mount operation will be performed.
4. According to claim 1, a method for configuring data tracking based on a program business management framework is characterized in that: The step 5 is specifically as follows: creating a data tracking configuration file in the game project, which uses an Excel table. By setting fields in the Excel table, the fields include tracking types and tracking parameters. The tracking types are the four types of UI button click events, game network communication functions, game business logic events, and interface opening and closing functions of the underlying general functions of the UI interface in steps 1 to 4. The tracking parameters are the parameters of the records corresponding to steps 1 to 4.
5. A data tracking system based on a program business management framework, characterized in that: The system includes: a button click event mounting data burying point module, a game network communication interface mounting data burying point module, a business logic event mounting data burying point module, an interface status mounting data burying point module, a data burying point configuration module, and a data burying point function triggering module; The button click event data embedding module: embeds all the UI button click events of the game into a data embedding function, and the data embedding function records the parameters of the UI interface name where the UI button is located and the name of the UI button; The game network communication interface mounts a data embedding module: a data embedding function is added before the game network communication function is requested and after the communication is successfully called back by the server, and the data embedding function records the network communication interface name and the request and callback parameters; The business logic event mounting data embedding module: mounts the game business logic event with a data embedding function, which records the script name where the business logic event is located, the business logic event name, and the parameters of the event; The interface status mounting data embedding module: the interface opening and closing functions of the underlying general functions of the UI interface mount the data embedding function, which records the parameters of the UI interface name and switch type; the data embedding function is mounted based on the underlying business management framework of each network communication interface; The data embedding configuration module: creates a data embedding configuration file in the game project and configures the places where data embedding is required; the data embedding configuration file includes: embedding type and embedding parameters; The data burying point function triggering module: when the button click event mounting data burying point module, the game network communication interface mounting data burying point module, the business logic event mounting data burying point module, and the interface status mounting data burying point module are triggered, it is determined whether the data burying point configuration file contains the corresponding burying point type and the corresponding burying point parameters. If so, the corresponding data burying point function is triggered, and the corresponding parameters are passed into the data burying point function to upload the data to the management background.
6. According to claim 5, a data tracking system based on a program business management framework is characterized in that: The button click event mounting data embedding module is specifically: mounting the click event monitoring script on all the UI buttons of the game, and the click event monitoring script is mounted on the UI button. Clicking the UI button in the game will trigger the corresponding data embedding function of the click event monitoring script. The data embedding function records the name of the UI interface where the UI button is located and the name parameters of the UI button.
7. According to claim 5, a data tracking system based on a program business management framework is characterized in that: The business logic event data embedding module is specifically as follows: for the business logic event of the game, when mounting the logic function, it is determined whether the business logic event is currently empty, and if it is empty, another data embedding function is mounted, and the data embedding function records the script name where the business logic event is located, the name of the business logic event, and the parameters of the event; If it is not empty, no mount operation will be performed.
8. According to claim 5, a data tracking system based on a program business management framework is characterized in that: The data embedding configuration module is specifically as follows: a data embedding configuration file is created in the game project. The configuration file uses an Excel table. Fields are set in the Excel table. The fields include embedding types and embedding parameters. The embedding types are the button click event mounting data embedding module, the game network communication interface mounting data embedding module, the business logic event mounting data embedding module, and the interface status mounting data embedding module, including UI button click events, game network communication functions, game business logic events, and interface opening and closing functions of the underlying general functions of the UI interface. The embedding parameters are the parameters of the records corresponding to the button click event mounting data embedding module, the game network communication interface mounting data embedding module, the business logic event mounting data embedding module, and the interface status mounting data embedding module.