Advertisement simulation display method, device, system and equipment and storage medium
By connecting the advertising simulation device with the terminal device, parsing and returning advertising data for display, the problem of invalid billing in traditional testing methods is solved, and efficient testing of advertising display function is achieved.
Patent Information
- Application Number
- CN202511251027.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-03
- Publication Date
- 2025-12-19
AI Technical Summary
Traditional ad display testing methods rely on real ad platforms, which may result in invalid billing and interference with the platform's billing logic during the testing process, making it impossible to effectively test the ad display function.
The device establishes a communication connection with the terminal device through an advertising simulation device, receives target advertising requests, parses the advertising location identifier, determines the target advertising data from the pre-stored advertising data, and returns it to the terminal device for display to simulate the advertising display effect.
It enables ad display function testing independent of real advertising platforms, improving testing efficiency and allowing simultaneous testing of the effects of different ad display positions, thus avoiding invalid billing.
Smart Images

Figure CN121166535A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of software testing, and in particular to an advertisement simulation display method, device, system, equipment and storage medium. BACKGROUND
[0002] As an important module in software, the actual display effect of the advertisement display function directly affects user experience and advertisement conversion efficiency. Therefore, during software development and updating, technical personnel need to test the advertisement display function of the software.
[0003] The traditional test method is that the to-be-tested software sends an advertisement request to a real advertisement platform and completes advertisement display based on advertisement data returned by the real advertisement platform, and then tests the advertisement display function of the to-be-tested software through the advertisement display effect of the to-be-tested software. However, this method may cause the advertisement request generated in the test process to be determined as valid exposure by the real advertisement platform, thereby triggering invalid billing and interfering with the normal billing logic of the platform. SUMMARY
[0004] The purpose of the embodiments of the present application is to provide an advertisement simulation display method, device, system, equipment and storage medium to test the advertisement display function in software without the real advertisement platform. The specific technical solutions are as follows:
[0005] In a first aspect, the embodiments of the present application provide an advertisement simulation display method applied to an advertisement simulation device, wherein the advertisement simulation device and a to-be-tested software installed on a terminal device have a communication connection, and the method comprises:
[0006] receiving a target advertisement request, wherein the target advertisement request is sent by the to-be-tested software when an advertisement display condition is met;
[0007] parsing a target advertisement position identifier from the target advertisement request, wherein the target advertisement position identifier represents a display position of an advertisement requested by the to-be-tested software in the to-be-tested software;
[0008] determining target advertisement data corresponding to the target advertisement position identifier from each advertisement data stored in advance according to a preset correspondence relationship between the advertisement position identifier and the advertisement data;
[0009] returning the target advertisement data to the terminal device, so that the to-be-tested software displays an advertisement based on the target advertisement data, wherein the advertisement display effect of the to-be-tested software is used to test the advertisement display function of the to-be-tested software.
[0010] Optionally, the parsing of the target advertisement position identifier from the target advertisement request comprises:
[0011] determining a source of the target advertisement request according to a request feature of the target advertisement request, wherein the source refers to a type of an SDK initiating the advertisement request, including an internal SDK built in the to-be-tested software and / or an external SDK additionally integrated by the to-be-tested software;
[0012] if the target advertisement request is from the internal SDK, decoding the target advertisement request based on a decoding algorithm corresponding to the internal SDK, and taking a first field corresponding to the internal SDK in the decoded target advertisement request as a target advertisement position identifier;
[0013] if the target advertisement request is from the external SDK, decoding the target advertisement request based on a decoding algorithm corresponding to the external SDK, and taking a second field corresponding to the external SDK in the decoded target advertisement request as a target advertisement position identifier.
[0014] Optionally, the determining of the target advertisement data corresponding to the advertisement position identifier in the target advertisement request from the pre-stored advertisement data according to a preset corresponding relationship between the advertisement position identifier and the advertisement data includes:
[0015] if the target advertisement request is from the internal SDK built in the to-be-tested software, determining the target advertisement data corresponding to a first type of identifier in the target advertisement request from the pre-stored advertisement data according to a first corresponding relationship between the first type of identifier and the advertisement data, wherein the first type of identifier is an advertisement position identifier parsed from the advertisement request from the internal SDK;
[0016] if the target advertisement request is from the external SDK additionally integrated by the to-be-tested software, converting a second type of identifier in the target advertisement request into the first type of identifier according to a second corresponding relationship between the first type of identifier and the second type of identifier, and determining the target advertisement data corresponding to the converted first type of identifier from the pre-stored advertisement data according to the first corresponding relationship, wherein the second type of identifier is an advertisement position identifier parsed from the advertisement request from the external SDK.
[0017] Optionally, the determining of the source of the target advertisement request according to the request feature of the target advertisement request includes:
[0018] judging whether a first specific field is included in a user agent of the target advertisement request, and if yes, determining that the target advertisement request is from the internal SDK, and if not, determining that the target advertisement request is from the external SDK;
[0019] and / or,
[0020] Determine whether the header of the target ad request includes a second specific field. If it does, determine that the target ad request originates from the internal SDK; otherwise, determine that the target ad request originates from the external SDK.
[0021] And / or,
[0022] Determine whether the encoding algorithm of the target ad request is a preset encoding algorithm. If yes, determine that the target ad request originates from the internal SDK; otherwise, determine that the target ad request originates from the external SDK.
[0023] Optionally, before returning the target advertising data to the terminal device, the method further includes:
[0024] Determine whether the ad simulation display function for the source of the target ad request is enabled;
[0025] If the advertising simulation display function is enabled, then the step of returning the target advertising data to the terminal device is performed.
[0026] Optionally, returning the target advertising data to the terminal device includes:
[0027] According to the business rules corresponding to the source of the target advertisement request, the target advertisement data is encapsulated and the encapsulated target advertisement data is returned to the terminal device.
[0028] Optionally, receiving the target advertisement request includes:
[0029] Receive the original advertising request sent by the software to be tested installed on the terminal device;
[0030] Based on the protocol characteristics of the original advertising request, determine the protocol type of the original advertising request;
[0031] The parser corresponding to the protocol type is invoked to parse the original advertisement request, and the parsing result is mapped to a preset standard request template to obtain the target advertisement request.
[0032] Secondly, embodiments of this application provide an advertising simulation display device, applied to an advertising simulation equipment, wherein the advertising simulation equipment establishes a communication connection with the software to be tested installed on a terminal device, and the device includes:
[0033] A request receiving module is used to receive a target advertisement request, wherein the target advertisement request is sent by the software under test when the advertisement display conditions are met;
[0034] an identifier resolving module, configured to resolve a target advertisement position identifier from the target advertisement request, wherein the target advertisement position identifier is used to represent a display position of an advertisement requested by the software to be tested in the software to be tested;
[0035] an advertisement data determining module, configured to determine target advertisement data corresponding to the target advertisement position identifier from pre-stored advertisement data according to a preset correspondence relationship between advertisement position identifiers and advertisement data;
[0036] an advertisement data sending module, configured to return the target advertisement data to the terminal device, so that the software to be tested displays an advertisement based on the target advertisement data, wherein an advertisement display effect of the software to be tested is used to test an advertisement display function of the software to be tested.
[0037] In a third aspect, an embodiment of the present application provides an advertisement simulation system, the system comprising an advertisement simulation device and a terminal device, the terminal device being installed with software to be tested, and the advertisement simulation device and the software to be tested being in communication connection;
[0038] the software to be tested, configured to send an advertisement request to the advertisement simulation device through the terminal device;
[0039] the advertisement simulation device, configured to execute the method in any of the first aspect;
[0040] the software to be tested, further configured to receive target advertisement data returned by the advertisement simulation device through the terminal device, and display an advertisement based on the target advertisement data, wherein an advertisement display effect of the software to be tested is used to test an advertisement display function of the software to be tested.
[0041] In a fourth aspect, an embodiment of the present application provides an advertisement simulation device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
[0042] the memory, configured to store a computer program;
[0043] the processor, configured to execute the program stored on the memory, and realize the method in any of the first aspect.
[0044] In a fifth aspect, an embodiment of the present application provides a computer readable storage medium, the computer readable storage medium storing a computer program, and the computer program is executed by a processor to realize the method in any of the first aspect.
[0045] In the scheme provided by the embodiments of the present application, a communication connection is established between the advertising simulation device and the to-be-tested software installed on the terminal device, on the basis of which, a target advertising request is received, wherein the target advertising request is sent by the to-be-tested software when an advertising display condition is met; a target advertising position identifier is parsed from the target advertising request, wherein the target advertising position identifier is used to represent a display position of the advertising requested by the to-be-tested software in the to-be-tested software; in the pre-stored advertising data, target advertising data corresponding to the target advertising position identifier is determined according to a preset corresponding relationship between the advertising position identifier and the advertising data; and the target advertising data is returned to the terminal device, so that the to-be-tested software displays the advertising based on the target advertising data, wherein the advertising display effect of the to-be-tested software is used to test the advertising display function of the to-be-tested software.
[0046] It can be seen that the to-be-tested software can establish a communication connection with the advertising simulation device storing the advertising data, on the basis of which, the to-be-tested software can send an advertising request to the advertising simulation device and display based on the advertising data returned by the advertising simulation device, and further test the advertising display function based on the advertising display effect, so that the advertising display function is tested without the real advertising platform. In addition, the advertising simulation device can determine, according to the advertising position identifier in the advertising request, that the to-be-tested software requests the advertising to be displayed in which advertising display position, and return the corresponding advertising data to the to-be-tested software, on the basis of which, when the to-be-tested software installed on multiple terminal devices simultaneously sends advertising requests for different advertising display positions to the advertising simulation device, the advertising simulation device can return the advertising data of different advertising display positions to each terminal device respectively, so that the advertising display effects of different advertising display positions are simultaneously tested, and the efficiency of the test is improved. BRIEF DESCRIPTION OF DRAWINGS
[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced.
[0048] Figure 1 A flowchart of an advertising simulation display method provided by the embodiments of the present application;
[0049] Figure 2 A flowchart of an advertising simulation display method based on the embodiment shown in Figure 1 A flowchart of an advertising position identifier parsing method based on the embodiment shown in
[0050] Figure 3 A specific flowchart of an advertising simulation display method based on the embodiment shown in Figure 1
[0051] Figure 4 A specific flowchart of an advertising simulation display method based on the embodiment shown in Figure 1 Another specific flowchart of the advertising simulation display method in the illustrated embodiment;
[0052] Figure 5 Based on Figure 1 A schematic diagram of another specific process of the advertising simulation display method shown in the embodiment;
[0053] Figure 6 Based on Figure 1 A schematic diagram of another specific process of the advertising simulation display method shown in the embodiment;
[0054] Figure 7 Based on Figure 1 The illustrated embodiment is a flowchart of a method for obtaining an advertisement request;
[0055] Figure 8 This is a schematic diagram of the advertising simulation display device provided in an embodiment of this application;
[0056] Figure 9 This is a schematic diagram of the advertising simulation display system provided in an embodiment of this application;
[0057] Figure 10 Based on Figure 9 A flowchart illustrating an advertising simulation display system according to the embodiment shown;
[0058] Figure 11 This is a schematic diagram of the structure of an advertising simulation display device provided in an embodiment of this application. Detailed Implementation
[0059] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.
[0060] To enable testing of the advertising display function in software without relying on a real advertising platform, this application provides an advertising simulation display method, apparatus, system, advertising simulation device, computer-readable storage medium, and computer program product. The advertising simulation display method provided in this application is described below.
[0061] The advertising simulation display method provided in this application embodiment can be applied to an advertising simulation device that stores various advertising data and can establish a communication connection with the software to be tested installed on the terminal device. The advertising simulation device can be a server, personal computer, dedicated testing equipment, virtual machine, etc., and is not specifically limited here. For clarity, it is referred to as an advertising simulation device below.
[0062] like Figure 1As shown, an advertising simulation display method is applied to an advertising simulation device. A communication connection is established between the advertising simulation device and the software to be tested installed on a terminal device. The method includes:
[0063] S101, Receive target advertisement request.
[0064] Among them, the target ad request is sent by the software under test when the ad display conditions are met.
[0065] S102, parse the target ad location identifier from the target ad request.
[0066] The target ad location identifier is used to characterize the display position of the ad requested by the software under test within the software under test.
[0067] S103, in the pre-stored advertising data, determine the target advertising data corresponding to the target advertising location identifier according to the preset correspondence between the advertising location identifier and the advertising data.
[0068] S104, return the target advertising data to the terminal device so that the software under test can display advertisements based on the target advertising data.
[0069] The ad display effect of the software under test is used to test the ad display function of the software under test.
[0070] In the solution provided in this application embodiment, a communication connection is established between the advertising simulation device and the software under test installed on the terminal device. Based on this, a target advertising request is received, which is sent by the software under test when the advertising display conditions are met. A target advertising location identifier is parsed from the target advertising request, which represents the display position of the requested advertisement in the software under test. Based on a preset correspondence between advertising location identifiers and advertising data, the target advertising data corresponding to the target advertising location identifier is determined from pre-stored advertising data. The target advertising data is returned to the terminal device so that the software under test can display an advertisement based on the target advertising data. The advertising display effect of the software under test is used to test its advertising display function. Therefore, the software under test can establish a communication connection with the advertising simulation device storing various advertising data. Based on this, the software under test can send advertising requests to the advertising simulation device and display advertisements based on the advertising data returned by the advertising simulation device. This allows for testing of the advertising display function independently of a real advertising platform. Furthermore, the advertising simulation device can determine which ad display position the software under test is requesting based on the ad location identifier in the ad request, and return the corresponding ad data to the software under test. On this basis, when the software under test installed on multiple terminal devices simultaneously sends ad requests for different ad display positions to the advertising simulation device, the advertising simulation device can return ad data for different ad display positions to each terminal device respectively, thereby realizing simultaneous testing of the ad display effect of different ad display positions and improving the efficiency of testing.
[0071] When testing software is required, technicians can install the software on terminal devices such as mobile phones, tablets, and computers, and then establish a communication connection between the software and the advertising simulation device.
[0072] When the software under test is running on the terminal device, it can monitor in real time whether the current conditions for displaying advertisements are met. If they are met, it can determine the current advertisement display position and generate a target advertisement request carrying an advertisement position identifier. Then, through the communication connection between the software and the advertisement simulation device, it sends the target advertisement request to the advertisement simulation device.
[0073] For example, if the software under test is a video playback application, and the advertisements in the software include "pause ads" and "splash ads," then when the software under test detects that video playback has stopped, it can determine that the current ad display condition 1 is met, and that the current ad display position is the "pause position." The software under test can then generate an ad request carrying the ad position identifier of the "pause position" and send this ad request to the ad simulation device. When the software under test detects that it has started up or been reactivated, it can determine that the current ad display condition 2 is met, and that the current ad display position is the "splash position." The software under test can then generate an ad request carrying the ad position identifier of the "splash position" and send this ad request to the ad simulation device.
[0074] In one implementation, there may be a correspondence between ad display conditions and ad display locations. Based on this, when the software under test detects that a certain ad display condition is currently met, it can determine the ad display location corresponding to the currently met ad display condition based on the above correspondence, and then use the ad display location as the current ad display location and generate a target ad request.
[0075] After receiving a target ad request, the ad simulation device can parse the target ad location identifier from the request. As mentioned earlier, the target ad location identifier indicates the ad display location requested by the software under test. Therefore, the ad simulation device can determine the ad data to be displayed at the desired ad display location based on the target ad location identifier and its stored ad data. In other words, it determines the target ad data corresponding to the target ad location identifier based on a pre-defined correspondence between ad location identifiers and ad data within the pre-stored ad data.
[0076] After determining the target advertising data, the advertising simulation device can return the target advertising data to the terminal device. The software under test can then obtain the target advertising data and render and display it based on the target advertising data (i.e., display the advertisement).
[0077] Finally, by judging whether the ad display effect of the software under test meets the expectations, it can be determined whether the ad display function of the software under test is normal in the ad display position targeted by the target ad request.
[0078] For example, if the target ad request requests splash screen ad data, and the ad display effect of the software under test meets expectations, then it can be determined that the splash screen ad display function of the software under test is normal. Similarly, if the target ad request requests paused ad data, and the ad display effect of the software under test meets expectations, then it can be determined that the paused ad display function of the software under test is normal.
[0079] In this process, it can be determined whether the advertising display effect of the software under test meets the expected effect. This can be done manually by technicians or by using terminal devices or other devices with image acquisition functions. This application does not make any specific limitations on this.
[0080] For example, when the software under test displays ads based on target ad data, the terminal device can obtain the ad display effect of the software under test through screen recording or other means, or other devices with image acquisition capabilities can obtain the ad display effect of the software under test through image acquisition. Then, the terminal device (other devices) compares the obtained ad display effect with the preset display effect corresponding to the target ad data. If the similarity between the two is greater than the preset threshold, it can be determined that the ad display function of the software under test is normal; otherwise, it is determined that the ad display function of the software under test is abnormal.
[0081] In the solution provided in this application embodiment, the software under test can establish a communication connection with an advertising simulation device that stores various advertising data. Based on this, the software under test can send advertising requests to the advertising simulation device and display the ads based on the advertising data returned by the advertising simulation device. This allows for testing of the advertising display function based on the ad display effect, thus enabling testing of the advertising display function independently of a real advertising platform. Furthermore, the advertising simulation device can determine the ad display location requested by the software under test based on the ad location identifier in the ad request and return the corresponding advertising data to the software under test. Therefore, when the software under test installed on multiple terminal devices simultaneously sends advertising requests for different ad display locations to the advertising simulation device, the advertising simulation device can return advertising data for different ad display locations to each terminal device, thereby enabling simultaneous testing of the advertising display effect at different ad display locations and improving testing efficiency.
[0082] The software to be tested may include a built-in internal SDK (Software Development Kit) and / or additionally integrated external SDKs. An internal SDK refers to an SDK developed by the developer of the software to be tested, while an external SDK refers to an SDK developed and provided by a third party and integrated into the software to be tested by the developer.
[0083] The software under test can send ad requests either through an internal SDK or an external SDK. For example, the software under test can send ad requests for splash screen ads through the internal SDK and ad requests for pause ads through the external SDK. In this scenario, combined with... Figures 2-6 The advertising simulation display method provided in the embodiments of this application will be introduced.
[0084] As one implementation method of this application, such as Figure 2 As shown, when the software under test includes a built-in internal SDK and / or an additional integrated external SDK, the advertising simulation device can specifically achieve step S201-S203 when performing step S102:
[0085] S201, Determine the source of the target ad request based on the request characteristics of the target ad request.
[0086] Because the internal SDK is developed by the developers themselves, it can be flexibly adjusted according to actual usage needs. Therefore, developers can design the internal SDK to carry specific fields in the UA (User-Agent), specific fields in the protocol header, or use specific encoding algorithms to encode the advertising request when sending advertising requests, so as to distinguish it from the advertising requests sent by the external SDK.
[0087] Therefore, after receiving a target ad request, the ad simulation device can determine whether the target ad request originates from an internal or external SDK based on request characteristics such as the user agent, protocol header, and encoding algorithm of the target ad request. Specifically:
[0088] The system determines whether the user agent of the target ad request includes a first specific field. If it does, the target ad request originates from the internal SDK; otherwise, it originates from the external SDK. The first specific field can be fields such as "abc=1" or "internal," and is not specifically limited here. The specific format of the first specific field can be flexibly set according to actual usage requirements, as long as it is a field not included in the user agent of the ad request sent by the external SDK.
[0089] And / or,
[0090] The system determines whether the header of the target ad request includes a second specific field. If it does, the target ad request originates from the internal SDK; otherwise, it originates from the external SDK. The second specific field can be fields such as "abc=1" or "internal," and is not specifically limited here. The specific format of the second specific field can be flexibly set according to actual usage requirements, as long as it is a field not included in the header of the ad request sent by the external SDK.
[0091] And / or,
[0092] The system determines whether the encoding algorithm of the target ad request is a preset encoding algorithm. If it is, the target ad request originates from the internal SDK; otherwise, it originates from the external SDK. The preset encoding algorithm can be a "URL encoding method," "Base64 encoding method," etc., and is not specifically limited here. The specific type of preset encoding algorithm can be flexibly set according to actual usage needs, as long as it is different from the encoding algorithm used by the external SDK.
[0093] It should be noted that the advertising simulation device can determine the source of an advertising request based solely on the user agent, protocol header, or encoding algorithm, or it can combine at least two of these methods. Furthermore, in addition to user agents, protocol headers, and encoding algorithms, the advertising simulation device can also determine the source of an advertising request through other request characteristics, such as API paths and structured data identifiers. This application embodiment does not limit the specific types of request characteristics.
[0094] S202, If the target ad request originates from the internal SDK, the target ad request is decoded based on the decoding algorithm corresponding to the internal SDK, and the first field corresponding to the internal SDK in the decoded target ad request is used as the target ad location identifier.
[0095] S203. If the target ad request originates from an external SDK, the target ad request is decoded based on the decoding algorithm corresponding to the external SDK, and the second field corresponding to the external SDK in the decoded target ad request is used as the target ad location identifier.
[0096] After determining the source of the target ad request, the ad simulation device can determine the corresponding decoding algorithm based on the pre-recorded correspondence between request sources and decoding algorithms, and then decode the target ad request based on that decoding algorithm. That is, if the target ad request originates from an internal SDK, it is decoded using the decoding algorithm corresponding to the internal SDK; if the target ad request originates from an external SDK, it is decoded using the decoding algorithm corresponding to the external SDK.
[0097] The advertising simulation device can predefine "field mapping rules," which explicitly stipulate which field is the "first field" in the data structure of the advertising request sent by the internal SDK, and which field is the "second field" in the data structure of the advertising request sent by the external SDK.
[0098] Based on this, after decoding the target ad request, the ad mode device can extract the corresponding fields from the decoded target ad request (i.e., extract the first field for ad requests sent by the internal SDK and extract the second field for ad requests sent by the external SDK), and then use the extracted fields as the target ad location identifier.
[0099] In the solution provided in this application embodiment, when the software under test includes a built-in internal SDK and / or an additional integrated external SDK, the advertising simulation device can determine the source of the target advertising request based on the request characteristics of the target advertising request, and then use the corresponding method to determine the target advertising location identifier for different sources, thereby accurately determining the location where the advertisement requested by the software under test is displayed, and thus ensuring the accuracy of the advertising display function test.
[0100] As one implementation method of this application, such as Figure 3 As shown, when the software under test includes a built-in internal SDK and / or an additional integrated external SDK, the advertising simulation device can specifically achieve step S301-S302 when performing step S103:
[0101] S301, if the target ad request originates from the internal SDK, the target ad data corresponding to the first type of identifier in the target ad request is determined from the pre-stored ad data according to the first correspondence between the preset first type of identifier and the ad data.
[0102] The advertising simulation device can pre-store the correspondence between ad location identifiers (i.e., first-type identifiers) parsed from ad requests originating from the internal SDK and ad data (i.e., the first correspondence). For example, the first correspondence is shown in Table 1:
[0103] Table 1
[0104] First type of identification Advertisement data 1 First advertisement data 2 Second advertisement data
[0105] Based on this, if the advertising simulation device determines that the target advertising request originates from the internal SDK, it can determine the target advertising data corresponding to the first type of identifier in the target advertising request based on the first correspondence between the first type of identifier and the advertising data in the preset stored advertising data.
[0106] For example, if the ad location identifier (i.e., the first type of identifier) parsed from the target ad request from the internal SDK is 1, then the ad simulation device can determine the target ad data as the first ad data according to the first correspondence shown in the table above.
[0107] S302, if the target ad request originates from an external SDK, the second type identifier in the target ad request is converted into a first type identifier according to the second correspondence between the first type identifier and the second type identifier in the preset second correspondence relationship. In the pre-stored ad data, the target ad data corresponding to the converted first type identifier is determined according to the first correspondence relationship.
[0108] Because the ad simulation device stores the first correspondence between the first type of identifier and the ad data, if the ad simulation device determines that the target ad request originates from an external SDK, it needs to first convert the ad position identifier (i.e., the second type of identifier) parsed from the target ad request from the external SDK into the first type of identifier. Specifically, this conversion can be performed using the pre-stored correspondence between the first type of identifier and the second type of identifier (i.e., the second correspondence). Then, based on the first correspondence, the target ad data corresponding to the converted first type of identifier is determined from the pre-stored ad data.
[0109] For example, the second correspondence is shown in the table below. Suppose the ad location identifier (i.e., the second type identifier) obtained from the target ad request from the external SDK is 'a'. Then, the ad simulation device can determine that the first type identifier corresponding to 'a' is '1' according to the second correspondence shown in Table 2. Furthermore, the ad simulation device can determine that the target ad data is the first ad data according to the first correspondence shown in Table 1.
[0110] Table 2
[0111] First type of identification Second type of identification 1 a 2 b
[0112] In the solution provided in this application embodiment, when the software under test includes a built-in internal SDK and / or an additionally integrated external SDK, the advertising simulation device can determine the source of the target advertising request based on the request characteristics of the target advertising request, and then use corresponding methods to determine the target advertising data for different sources, thereby ensuring that the target advertising data meets the actual needs of the target advertising request. Furthermore, in this solution, both the internal SDK and the external SDK ultimately map to the same advertising data source, so that only one set of advertising data with a common data structure can be stored for both the internal SDK and the external SDK, avoiding data redundancy and reducing data storage costs.
[0113] and Figure 3 The illustrated embodiment corresponds to another implementation of the embodiments of this application, such as... Figure 4 As shown, when the software under test includes a built-in internal SDK and / or an additional integrated external SDK, the advertising simulation device can also achieve step S401-S402 when performing step S103:
[0114] S401, if the target ad request originates from the internal SDK, the target ad data corresponding to the first type of identifier in the target ad request is determined from the pre-stored ad data according to the first correspondence between the first type of identifier and the ad data.
[0115] Step S401 is the same as step S301, and will not be repeated here.
[0116] S402, if the target ad request originates from an external SDK, the target ad data corresponding to the second type identifier in the target ad request is determined from the pre-stored ad data according to the first correspondence between the preset second type identifier and the ad data.
[0117] In addition to pre-storing the correspondence between ad location identifiers (i.e., first-type identifiers) and ad data obtained from ad requests parsed from internal SDKs (i.e., the first correspondence), the ad simulation device can also pre-storing the correspondence between ad location identifiers (i.e., second-type identifiers) and ad data obtained from ad requests parsed from external SDKs (i.e., the third correspondence). For example, the third correspondence is shown in Table 3:
[0118] Table 3
[0119] First type of identification Advertisement data a Third advertisement data b Fourth advertisement data
[0120] Based on this, if the advertising simulation device determines that the target advertising request originates from an external SDK, it can determine the target advertising data corresponding to the second type of identifier in the target advertising request based on the third correspondence between the second type of identifier and the advertising data in the preset stored advertising data.
[0121] For example, if the ad location identifier (i.e., the second type identifier) obtained from the target ad request from the external SDK is 'a', then the ad simulation device can determine the target ad data as the third ad data based on the third correspondence shown in the table above.
[0122] In the solution provided in this application embodiment, when the software under test includes a built-in internal SDK and / or an additionally integrated external SDK, the advertising simulation device can determine the source of the target advertising request based on the request characteristics of the target advertising request, and then use corresponding methods to determine the target advertising data for different sources, thereby ensuring that the target advertising data meets the actual needs of the target advertising request. Furthermore, in this solution, because the correspondence between identifiers and data can be maintained separately for the internal SDK and the external SDK, the internal SDK and the external SDK can be mapped to different advertising data sources according to actual usage requirements. This supports customizing different advertising data for the internal and external SDKs (e.g., the internal SDK returns video ads, and the external SDK returns image and text ads, etc.).
[0123] As one implementation method of this application, such as Figure 5 As shown, before executing step S104, the advertising simulation device can execute step S501:
[0124] S501, determine whether the ad simulation display function for the source of the target ad request is enabled; if so, proceed to step S104.
[0125] Before returning the target advertising data to the terminal device, the advertising simulation device can first determine whether the advertising simulation display function for the source of the target advertising request is enabled, that is, whether it is necessary to return advertising data to the source. If the determination result is yes, the advertising simulation device can execute step S104 to return the target advertising data to the terminal device so that the software under test can display the advertisement based on the target advertising data. If the determination result is no, the advertising simulation device can determine that the advertising simulation display process has ended.
[0126] In one implementation, the options for enabling the ad simulation display function may include: "Enable ad simulation display only for the internal SDK", "Enable ad simulation display only for the external SDK", and "Enable ad simulation display for both the internal and external SDKs simultaneously". Based on this, when the ad simulation device determines whether the ad simulation display function for the source of the target ad request is enabled, it can first determine whether the ad simulation display function is enabled. If enabled, it then determines whether the specific enabling option is for the source of the target ad request. If so, it is determined that the ad simulation display function for the source of the target ad request is enabled.
[0127] For example, if the target ad request originates from the internal SDK, the ad simulation device can first determine whether the ad simulation display function is enabled. If it is enabled, it can then determine whether the specific enabling option is for the source of the target ad request (i.e., whether it is "only enable the ad simulation display function for the internal SDK" or "enable the ad simulation display function for both the internal SDK and the external SDK"). If so, it is determined that the ad simulation display function for the source of the target ad request has been enabled.
[0128] In another implementation, the ad simulation display function can be divided into an ad simulation display sub-function for the internal SDK and an ad simulation display sub-function for the external SDK. Based on this, when the ad simulation device determines whether the ad simulation display function for the source of the target ad request is enabled, it can directly determine whether the ad simulation display sub-function for the source of the target ad request is enabled. If it is enabled, then it is determined that the ad simulation display function for the source of the target ad request is enabled.
[0129] For example, if the target ad request originates from the internal SDK, the ad simulation device can directly determine whether the ad simulation display sub-function for the internal SDK is enabled. If so, it is determined that the ad simulation display function for the source of the target ad request is enabled.
[0130] In the solution provided in this application embodiment, before returning target advertising data to the terminal device, the advertising simulation device can first determine whether the advertising simulation display function for the source of the target advertising request is enabled. If enabled, the target advertising data is then returned to the terminal device. This allows for selection of "advertising simulation display only for the internal SDK," "advertising simulation display only for the external SDK," or "advertising simulation display for both the internal and external SDKs simultaneously" based on actual needs, improving the flexibility of advertising simulation display.
[0131] As one implementation method of this application, such as Figure 6 As shown, when the advertising simulation device performs step S104, it can be specifically implemented through step S601:
[0132] S601, according to the business rules corresponding to the source of the target advertisement request, encapsulates the target advertisement data and returns the encapsulated target advertisement data to the terminal device so that the software under test can display advertisements based on the encapsulated target advertisement data.
[0133] When the software under test includes a built-in internal SDK and / or an additional integrated external SDK, the requirements for the return format of advertising data may differ between the internal SDK and the external SDK. Therefore, when the advertising simulation device returns the target advertising data to the terminal device, it can first encapsulate the target advertising data according to the business rules corresponding to the source of the target advertising request, and then return the encapsulated target advertising data to the terminal device.
[0134] Among them, business rules refer to the requirements of internal SDK and external SDK for the return format of advertising data, which may include encoding method, data conversion format, field mapping and filling, adding / removing specific information, etc. This application embodiment does not limit the specific type of business rules.
[0135] In the solution provided in this application embodiment, when the advertising simulation device returns advertising data to the terminal device, it can encapsulate the advertising data according to the business rules corresponding to different SDKs, so that the advertising data can effectively adapt to the characteristics of different SDKs, ensuring that the advertising data received by the terminal device meets the specifications of the SDK that initiated the advertising request in terms of format and content, thereby providing accurate and reliable testing resources for functional testing, compatibility verification and other aspects of the software under test.
[0136] As one implementation method provided in this application, such as Figure 7 As shown, when the advertising simulation device performs step S101, it can be specifically implemented through steps S701-S703:
[0137] S701 receives the original advertising request sent by the software to be tested installed on the terminal device.
[0138] Each SDK in the software under test specifies the protocol (such as HTTP REST, gRPC, WebSocket, etc.) used to send advertising requests during the design phase. Based on this, when advertising simulation is required on the software under test, the SDK in the software under test will generate and send original advertising requests according to the preset protocol, and the advertising simulation device can receive these original advertising requests.
[0139] S702, Determine the protocol type of the original advertising request based on the protocol characteristics of the original advertising request.
[0140] After receiving the original advertising request, the advertising simulation device can determine the protocol type of the original advertising request based on its request header format, data transmission method, encoding identifier, and other protocol characteristics.
[0141] S703 calls the parser corresponding to the protocol type to parse the original advertisement request, and maps the parsing result to the preset standard request template to obtain the target advertisement request.
[0142] Because the original ad requests from different protocol types differ in data structure and field definitions, directly processing them would increase the complexity of subsequent processes. Therefore, it is necessary to call a parser that matches the protocol type (such as an HTTP parser or WebSocket parser) to parse the original ad requests and extract key information (such as user identifier, device identifier, request time, ad location identifier, etc.). Subsequently, this information is mapped and integrated according to a preset standard request template to form a uniformly formatted target ad request, thereby ensuring that subsequent ad simulation devices can efficiently process requests from different sources within the same processing framework.
[0143] In one implementation, the standard request template can adopt a custom format. Based on this, when the advertising simulation device receives raw advertising requests of types such as HTTP REST, gRPC, and WebSocket, it can uniformly organize them into target advertising requests of a custom format.
[0144] In another implementation, the standard request template can be a request template corresponding to a specific protocol type. Based on this, after determining the protocol type of the original advertising request, if the protocol type is a specific protocol type, the advertising simulation device can directly use the original advertising request as the target advertising request. If the protocol type is not a specific protocol type, the corresponding parser is called and the parsing result is mapped to the request template corresponding to the aforementioned protocol type to obtain the target advertising request.
[0145] For example, the standard request template can be the request template corresponding to WebSocket. Based on this, if the protocol type of the original ad request is WebSocket, the original ad request can be directly used as the target ad request. If the protocol type of the original ad request is HTTP REST, the corresponding parser can be called and the parsing result can be mapped to the request template corresponding to WebSocket to obtain the target ad request.
[0146] In the solution provided in this application embodiment, since the original advertising requests of different protocol types differ in data structure and field definition, direct processing would increase the complexity of subsequent processes. Therefore, the advertising simulation device maps and integrates each original advertising request according to a preset standard request template to form a target advertising request with a unified format, thereby ensuring that requests from different sources can be processed efficiently under the same processing framework.
[0147] Corresponding to the above-described advertising simulation display method, this application embodiment also provides an advertising simulation display device, which will be described below.
[0148] like Figure 8 As shown, an advertising simulation display device is applied to an advertising simulation equipment. A communication connection is established between the advertising simulation equipment and the software to be tested installed on a terminal device. The device includes:
[0149] The request receiving module 801 is used to receive target advertisement requests, wherein the target advertisement request is sent by the software under test when the advertisement display conditions are met;
[0150] The identifier parsing module 802 is used to parse the target ad location identifier from the target ad request, wherein the target ad location identifier is used to represent the display position of the ad requested by the software under test in the software under test;
[0151] The advertising data determination module 803 is used to determine the target advertising data corresponding to the advertising position identifier in the target advertising request based on the preset correspondence between the advertising position identifier and the advertising data in the pre-stored advertising data.
[0152] The advertising data sending module 804 is used to return target advertising data to the terminal device so that the software under test can display advertisements based on the target advertising data. The advertising display effect of the software under test is used to test the advertising display function of the software under test.
[0153] In the solution provided in this application embodiment, the software under test can establish a communication connection with an advertising simulation device that stores various advertising data. Based on this, the software under test can send advertising requests to the advertising simulation device and display the ads based on the advertising data returned by the advertising simulation device. This allows for testing of the advertising display function based on the ad display effect, thus enabling testing of the advertising display function independently of a real advertising platform. Furthermore, the advertising simulation device can determine the ad display location requested by the software under test based on the ad location identifier in the ad request and return the corresponding advertising data to the software under test. Therefore, when the software under test installed on multiple terminal devices simultaneously sends advertising requests for different ad display locations to the advertising simulation device, the advertising simulation device can return advertising data for different ad display locations to each terminal device, thereby enabling simultaneous testing of the advertising display effect at different ad display locations and improving testing efficiency.
[0154] As one embodiment of this application, the identifier resolution module 802 may include:
[0155] The advertising source determination unit is used to determine the source of the target advertising request based on the request characteristics of the target advertising request. The source refers to the type of SDK that initiated the advertising request, including: the internal SDK built into the software under test and / or the external SDK that is additionally integrated into the software under test.
[0156] The first parsing unit is used to decode the target ad request based on the decoding algorithm corresponding to the internal SDK when the target ad request originates from the internal SDK, and to use the first field corresponding to the internal SDK in the decoded target ad request as the target ad location identifier.
[0157] The second parsing unit is used to decode the target ad request based on the decoding algorithm corresponding to the external SDK when the target ad request originates from an external SDK, and to use the second field corresponding to the external SDK in the decoded target ad request as the target ad location identifier.
[0158] As one embodiment of this application, the advertising data determination module 803 may include:
[0159] The first advertising data determination unit is used to determine the target advertising data corresponding to the first type of identifier in the target advertising request based on the first correspondence between the preset first type of identifier and the advertising data in the pre-stored advertising data when the target advertising request comes from the internal SDK built into the software under test. The first type of identifier is the advertising position identifier parsed from the advertising request from the internal SDK.
[0160] The second advertising data determination unit is used to convert the second type identifier in the target advertising request into the first type identifier according to the second correspondence between the first type identifier and the second type identifier in the test software when the target advertising request comes from an external SDK that is additionally integrated into the test software. In the case of the target advertising request, the unit determines the target advertising data corresponding to the converted first type identifier according to the first correspondence in the pre-stored advertising data. The second type identifier is the advertising position identifier parsed from the advertising request from the external SDK.
[0161] As one implementation of this application, the advertising source determination unit can be specifically used for:
[0162] Determine whether the user agent of the target ad request includes a first specific field. If it does, determine that the target ad request originates from the internal SDK; otherwise, determine that the target ad request originates from the external SDK.
[0163] And / or,
[0164] Determine whether the target ad request header includes a second specific field. If it does, determine that the target ad request originates from the internal SDK; otherwise, determine that the target ad request originates from the external SDK.
[0165] And / or,
[0166] Determine whether the encoding algorithm of the target ad request is the preset encoding algorithm. If it is, determine that the target ad request comes from the internal SDK; otherwise, determine that the target ad request comes from the external SDK.
[0167] As one embodiment of this application, the apparatus may further include:
[0168] The function judgment module is used to determine whether the ad simulation display function is enabled for the source of the target ad request;
[0169] The advertising data sending module 804 can be specifically used to return target advertising data to the terminal device when the judgment result of the function judgment module is yes.
[0170] As one embodiment of this application, the advertising data sending module 804 can be specifically used to encapsulate the target advertising data according to the business rules corresponding to the source of the target advertising request, and return the encapsulated target advertising data to the terminal device.
[0171] As one embodiment of this application, the request receiving module 801 may include:
[0172] The receiving unit is used to receive the original advertising requests sent by the software to be tested installed on the terminal device;
[0173] The type determination unit is used to determine the protocol type of the original advertising request based on the protocol characteristics of the original advertising request.
[0174] The conversion unit is used to call the parser corresponding to the protocol type to parse the original advertisement request and map the parsing result to a preset standard request template to obtain the target advertisement request.
[0175] Corresponding to the above-described advertising simulation display method, this application embodiment also provides an advertising simulation display system, which will be described below.
[0176] like Figure 9 As shown, an advertising simulation system includes an advertising simulation device 901 and a terminal device 902. The terminal device 902 is equipped with software to be tested, and a communication connection is established between the advertising simulation device 901 and the software to be tested.
[0177] The software to be tested is used to send advertising requests to the advertising simulation device 901 via the terminal device 902;
[0178] The advertising simulation device 901 is used to perform the advertising simulation display method described in any of the above embodiments;
[0179] The software under test is also used to receive target advertising data returned by advertising simulation device 901 through terminal device 902, and to display advertisements based on the target advertising data. The advertising display effect of the software under test is used to test the advertising display function of the software under test.
[0180] In the solution provided in this application embodiment, the software under test can establish a communication connection with an advertising simulation device that stores various advertising data. Based on this, the software under test can send advertising requests to the advertising simulation device and display the ads based on the advertising data returned by the advertising simulation device. This allows for testing of the advertising display function based on the ad display effect, thus enabling testing of the advertising display function independently of a real advertising platform. Furthermore, the advertising simulation device can determine the ad display location requested by the software under test based on the ad location identifier in the ad request and return the corresponding advertising data to the software under test. Therefore, when the software under test installed on multiple terminal devices simultaneously sends advertising requests for different ad display locations to the advertising simulation device, the advertising simulation device can return advertising data for different ad display locations to each terminal device, thereby enabling simultaneous testing of the advertising display effect at different ad display locations and improving testing efficiency.
[0181] The following is based on Figure 10 Taking an example, the advertising simulation display system provided in the embodiments of this application will be illustrated.
[0182] I. Ad Request Stage:
[0183] The internal SDK and external SDK in the software to be tested installed on the terminal device can send advertising requests to the advertising simulation device.
[0184] After receiving an advertising request, the advertising simulation device can first perform "request analysis," specifically: through feature analysis, it determines the protocol type and source of the advertising request; then, it unifies advertising requests of different protocol types; and finally, it distributes the requests. Specifically, it distributes advertising requests sent by the internal SDK of the software under test to the internal SDK service of the advertising simulation device, enabling the internal SDK to determine the requested advertising data and subsequently encapsulate the advertising data according to business rules. Similarly, it distributes advertising requests sent by the external SDK of the software under test to the external SDK service of the advertising simulation device, enabling the external SDK to determine the requested advertising data and subsequently encapsulate the advertising data according to business rules.
[0185] Then the advertising simulation device can make "intelligent decisions", specifically: determine whether the simulation function (advertising simulation display function) is enabled, that is, whether to return the advertising data in the advertising database to the terminal device.
[0186] II. Advertising Display Stage:
[0187] If the advertising simulation device determines that the advertising simulation display function is not enabled, it will not return advertising data to the terminal device. In this case, the terminal device will not display the advertisement.
[0188] If the advertising simulation device determines that the advertising simulation display function is enabled, it can further determine the enabling type as "external only," "internal only," or "simultaneously." If the enabling type is "external only," it only needs to return the advertising data requested by the external SDK to the terminal device. If the enabling type is "internal only," it only needs to return the advertising data requested by the internal SDK to the terminal device. If the enabling type is "simultaneously," it needs to return the advertising data requested by both the external and internal SDKs to the terminal device. In this case, the terminal device will display the advertisement.
[0189] This application also provides an advertising simulation device, such as... Figure 11 As shown, it includes a processor 1101, a communication interface 1102, a memory 1103, and a communication bus 1104. The processor 1101, communication interface 1102, and memory 1103 communicate with each other via the communication bus 1104.
[0190] Memory 1103 is used to store computer programs;
[0191] When the processor 1101 executes the program stored in the memory 1103, it implements the advertising simulation display method described in any of the above embodiments.
[0192] In the solution provided in this application embodiment, the software under test can establish a communication connection with an advertising simulation device that stores various advertising data. Based on this, the software under test can send advertising requests to the advertising simulation device and display the ads based on the advertising data returned by the advertising simulation device. This allows for testing of the advertising display function based on the ad display effect, thus enabling testing of the advertising display function independently of a real advertising platform. Furthermore, the advertising simulation device can determine the ad display location requested by the software under test based on the ad location identifier in the ad request and return the corresponding advertising data to the software under test. Therefore, when the software under test installed on multiple terminal devices simultaneously sends advertising requests for different ad display locations to the advertising simulation device, the advertising simulation device can return advertising data for different ad display locations to each software under test installed on each terminal device, thereby enabling simultaneous testing of the advertising display effect at different ad display locations and improving testing efficiency.
[0193] The communication bus mentioned in the aforementioned advertising simulation device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not indicate that there is only one bus or one type of bus.
[0194] The communication interface is used for communication between the aforementioned advertising simulation device and other devices.
[0195] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0196] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0197] In another embodiment provided in this application, a computer-readable storage medium is also provided, wherein a computer program is stored therein, and when the computer program is executed by a processor, it implements any of the advertising simulation display methods described in the above embodiments.
[0198] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the advertising simulation display methods described in the above embodiments.
[0199] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).
[0200] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0201] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of apparatus, systems, advertising simulation devices, computer-readable storage media, and computer program products are basically similar to the method embodiments, and therefore the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0202] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application are included within the scope of protection of this application.
Claims
1. A method for simulating advertising display, characterized in that, The method, applied to an advertising simulation device, establishes a communication connection between the advertising simulation device and the software to be tested installed on a terminal device, includes: Receive a target advertisement request, wherein the target advertisement request is sent by the software under test when the advertisement display conditions are met; The target ad location identifier is obtained by parsing the target ad request, wherein the target ad location identifier is used to characterize the display position of the ad requested by the software under test in the software under test; In the pre-stored advertising data, the target advertising data corresponding to the target advertising location identifier is determined according to the pre-defined correspondence between the advertising location identifier and the advertising data; The target advertising data is returned to the terminal device so that the software under test can display advertisements based on the target advertising data, wherein the advertising display effect of the software under test is used to test the advertising display function of the software under test.
2. The method according to claim 1, characterized in that, The step of parsing the target ad location identifier from the target ad request includes: Based on the request characteristics of the target advertisement request, the source of the target advertisement request is determined, wherein the source refers to the type of SDK that initiates the advertisement request, including: the internal SDK built into the software under test and / or the external SDK that is additionally integrated into the software under test; If the target ad request originates from the internal SDK, the target ad request is decoded based on the decoding algorithm corresponding to the internal SDK, and the first field corresponding to the internal SDK in the decoded target ad request is used as the target ad location identifier. If the target ad request originates from the external SDK, the target ad request is decoded based on the decoding algorithm corresponding to the external SDK, and the second field corresponding to the external SDK in the decoded target ad request is used as the target ad location identifier.
3. The method according to claim 1, characterized in that, The step of determining the target advertising data corresponding to the target advertising location identifier based on the preset correspondence between advertising location identifiers and advertising data from the pre-stored advertising data includes: If the target ad request originates from the internal SDK built into the software under test, the target ad data corresponding to the first type of identifier in the target ad request is determined according to the first correspondence between the preset first type of identifier and the ad data in the pre-stored ad data, wherein the first type of identifier is an ad position identifier parsed from the ad request originating from the internal SDK. If the target ad request originates from an external SDK additionally integrated into the software under test, the second type identifier in the target ad request is converted into a first type identifier according to the second correspondence between the preset first type identifier and the second type identifier. In each pre-stored ad data, the target ad data corresponding to the converted first type identifier is determined according to the first correspondence. The second type identifier is an ad position identifier parsed from the ad request originating from the external SDK.
4. The method according to claim 2, characterized in that, Determining the source of the target advertisement request based on its request characteristics includes: Determine whether the user agent of the target ad request includes a first specific field. If it does, determine that the target ad request originates from the internal SDK; if it does not, determine that the target ad request originates from the external SDK. And / or, Determine whether the header of the target ad request includes a second specific field. If it does, determine that the target ad request originates from the internal SDK; otherwise, determine that the target ad request originates from the external SDK. And / or, Determine whether the encoding algorithm of the target ad request is a preset encoding algorithm. If it is, then the target ad request is determined to originate from the internal SDK. If not, then the target ad request is determined to originate from the external SDK.
5. The method according to any one of claims 1-4, characterized in that, Before returning the target advertising data to the terminal device, the method further includes: Determine whether the ad simulation display function for the source of the target ad request is enabled; If the advertising simulation display function is enabled, then the step of returning the target advertising data to the terminal device is performed.
6. The method according to any one of claims 1-4, characterized in that, The step of returning the target advertising data to the terminal device includes: According to the business rules corresponding to the source of the target advertisement request, the target advertisement data is encapsulated and the encapsulated target advertisement data is returned to the terminal device.
7. The method according to any one of claims 1-4, characterized in that, The receiving of the target advertisement request includes: Receive the original advertising request sent by the software to be tested installed on the terminal device; Based on the protocol characteristics of the original advertising request, determine the protocol type of the original advertising request; The parser corresponding to the protocol type is invoked to parse the original advertisement request, and the parsing result is mapped to a preset standard request template to obtain the target advertisement request.
8. An advertising simulation display device, characterized in that, An apparatus for use in advertising simulation devices, wherein a communication connection is established between the advertising simulation device and the software to be tested installed on a terminal device, the apparatus comprising: A request receiving module is used to receive a target advertisement request, wherein the target advertisement request is sent by the software under test when the advertisement display conditions are met; The identifier parsing module is used to parse the target advertisement location identifier from the target advertisement request, wherein the target advertisement location identifier is used to characterize the display position of the advertisement requested by the software under test in the software under test; The advertising data determination module is used to determine the target advertising data corresponding to the target advertising location identifier from the pre-stored advertising data according to the preset correspondence between the advertising location identifier and the advertising data; An advertising data sending module is used to return the target advertising data to the terminal device so that the software under test can display advertisements based on the target advertising data. The advertising display effect of the software under test is used to test the advertising display function of the software under test.
9. An advertising simulation system, characterized in that, The system includes an advertising simulation device and a terminal device. The terminal device is equipped with software to be tested, and a communication connection is established between the advertising simulation device and the software to be tested. The software to be tested is used to send an advertising request to the advertising simulation device through the terminal device; The advertising simulation device is used to perform the method according to any one of claims 1-7; The software under test is also used to receive target advertising data returned by the advertising simulation device through the terminal device, and to display advertisements based on the target advertising data, wherein the advertising display effect of the software under test is used to test the advertising display function of the software under test.
10. An advertising simulation device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the method described in any one of claims 1-7.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method described in any one of claims 1-7.