Shunting test method and device of application program, processor and electronic equipment
By obtaining the application's shunt object and attribute information of the experimental data, the experimental data is diverted, which solves the problem of excessive load requested by the shunt control center, and achieves the effect of reducing the load.
Patent Information
- Application Number
- CN202411894627.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-04-11
AI Technical Summary
The existing shunt method causes the request load of shunt control centers to be too high and lacks effective solutions.
By obtaining the application's shunt object, determining the attribute information of the experimental events and experimental data associated with the application, diversion of the experimental data based on this information, obtaining the shunt results, and using the experimental data to test the application in the experimental group.
Avoid storing all experimental configuration information in the shunt control center, reducing the request load of the shunt control center, and improving system performance.
Smart Images

Figure CN119807061A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence, and in particular to a method, device, processor and electronic device for testing the diversion of an application program. Background Art
[0002] Before the product is officially iterated and released, the diversion method is often used to divide user data into several groups, allowing user groups with similar characteristics to randomly use the above plan. Scientific decisions are made based on the real data feedback of the user groups to obtain the final plan.
[0003] However, existing traffic diversion methods often add traffic distribution code based on the request gateway layer of load balancing. Alternatively, the diversion strategy and related algorithms are packaged into a software development kit (SDK) and integrated into the business side, and the configuration information of all experiments is uniformly stored in the diversion control center, which leads to the technical problem of excessive request load in the diversion control center.
[0004] Currently, no effective solution has been proposed to the technical problem of excessive request load in the above-mentioned diversion control center. Summary of the invention
[0005] The embodiments of the present invention provide a method, device, processor and electronic device for testing the diversion of an application program, so as to at least solve the technical problem of excessively high request load of a diversion control center.
[0006] According to one aspect of an embodiment of the present invention, a diversion test method for an application is provided, the method comprising: obtaining a diversion object of the application, wherein the diversion object is used to access the application; in response to the diversion object having completed initialization, determining from a server first attribute information of an experimental event associated with the application, and second attribute information of experimental data associated with the experimental event, wherein the first attribute information includes first identification information for identifying the experimental event, and the second attribute information includes second identification information for identifying the experimental data; based on the first identification information in the first attribute information and the second identification information in the second attribute information, diverting the experimental data to obtain a diversion result, wherein the diversion result is used to indicate an experimental group assigned to the experimental data; based on the diversion result, testing the application using the experimental data in the experimental group to obtain a test result, wherein the test result is used to indicate whether the function of the application needs to be corrected.
[0007] Optionally, based on the first identification information in the first attribute information and the second identification information in the second attribute information, the experimental data is diverted to obtain a diversion result, including: determining the relationship between the experimental data and the experimental event based on the first identification information and the second identification information; based on the relationship, the experimental data is diverted to obtain a diversion result.
[0008] Optionally, determining the relationship between the experimental data and the experimental event based on the first identification information and the second identification information includes: in response to the first identification information being associated with the second identification information, determining the relationship is that the experimental data has been applied in the experimental event.
[0009] Optionally, based on the relationship, the experimental data is diverted to obtain a diversion result, including: in response to the relationship being that the experimental data has been applied in the experimental event, the experimental data is diverted to obtain a diversion result.
[0010] Optionally, the experimental data includes first experimental data and second experimental data, the value of the first experimental data is different from the value of the second experimental data, and based on the diversion result, the experimental data is used to test the application in the experimental group to obtain a test result, including: in response to the diversion result being a first diversion result, the first experimental data is used to test the application in the first experimental group to obtain a first test result, wherein the first diversion result is used to indicate the first experimental group assigned to the first experimental data, and the first test result is used to indicate whether it is necessary to correct the function of the application adapted to the first experimental data; in response to the diversion result being a second diversion result, the second experimental data is used to test the application in the second experimental group to obtain a second test result, wherein the second diversion result is used to indicate the second experimental group assigned to the second experimental data, and the second test result is used to indicate whether it is necessary to correct the function of the application adapted to the second experimental data.
[0011] Optionally, obtaining the diversion object of the application includes: using a toolkit to obtain the diversion object in a singleton mode.
[0012] According to one aspect of an embodiment of the present invention, a diversion test device for an application is provided, and the device may include: an acquisition unit, used to acquire a diversion object of the application, wherein the diversion object is used to access the application; a determination unit, used to determine, in response to the diversion object having completed initialization, first attribute information of an experimental event associated with the application and second attribute information of experimental data associated with the experimental event from a server, wherein the first attribute information includes first identification information for identifying the experimental event, and the second attribute information includes second identification information for identifying the experimental data; a diversion unit, used to divert the experimental data based on the first identification information in the first attribute information and the second identification information in the second attribute information, to obtain a diversion result, wherein the diversion result is used to indicate an experimental group assigned to the experimental data; a testing unit, used to test the application using the experimental data in the experimental group based on the diversion result, to obtain a test result, wherein the test result is used to indicate whether the function of the application needs to be corrected.
[0013] According to another aspect of an embodiment of the present invention, a processor is provided, which is used to run a program, wherein when the program is run by the processor, the program executes the offloading test method of the application program in the embodiment of the present invention.
[0014] According to another aspect of an embodiment of the present invention, there is further provided an electronic device, comprising: a memory storing an executable program; and a processor for running the program, wherein when the program is running, the diversion test method of the application program in each embodiment of the present invention is executed.
[0015] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the application program diversion test method in the present invention.
[0016] According to another aspect of an embodiment of the present invention, a computer program product is further provided. The computer program product includes a computer program. When the computer program is executed by a processor, the method for diverting the application program in the embodiment of the present invention is implemented.
[0017] According to another aspect of an embodiment of the present invention, a computer program product is also provided, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the diversion testing method of the application program in the embodiment of the present invention is implemented.
[0018] According to another aspect of an embodiment of the present invention, an embodiment of the present application further provides a computer program, which, when executed by a processor, implements the diversion test method of the application program in the above-mentioned embodiment of the present invention.
[0019] In an embodiment of the present invention, when a diversion test is performed on an application, a diversion object of the application can be obtained. In response to the obtained diversion object having completed initialization, the first attribute information of the experimental event associated with the application and the second attribute information of the experimental data associated with the experimental event can be determined from the server. According to the first identification information in the first attribute information and the second identification information in the second attribute information, the experimental data is diverted to obtain a diversion result, and according to the obtained diversion result, the application is tested using the experimental data in the experimental group to obtain a test result, thereby achieving the purpose of avoiding the unified storage of all experimental configuration information in the diversion control center, thereby solving the technical problem of the excessively high request load of the diversion control center, and further achieving the technical effect of reducing the request load of the diversion control center. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0021] Figure 1 is a hardware structure block diagram of a computer terminal for implementing a diversion test method for an application program according to an embodiment of the present invention;
[0022] Figure 2 is a flow chart of a diversion testing method for an application according to an embodiment of the present invention;
[0023] Figure 3 is a flow chart of a cache-based AB experiment diversion method according to an embodiment of the present invention;
[0024] Figure 4 is a schematic diagram of a shunt testing device for an application according to an embodiment of the present invention;
[0025] Figure 5 It is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only embodiments of a part of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0028] According to an embodiment of the present invention, a diversion testing method for an application is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0029] The application program diversion testing method provided in the embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 1 is a hardware structure block diagram of a computer terminal for implementing a diversion test method for an application according to an embodiment of the present invention. Figure 1 As shown, the computer terminal 10 (or mobile device) may include one or more (102a, 102b, ..., 102n are used to illustrate) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0030] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10 (or mobile device). As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0031] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the shunt test method of the application program in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, the shunt test method of the above-mentioned application program is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0032] The transmission device 106 can be used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0033] The display may be, for example, a touch screen liquid crystal display (LCD), which enables a user to interact with a user interface of the computer terminal 10 (or mobile device).
[0034] Under the above operating environment, this application provides Figure 2 The triage testing method for the application is shown. Figure 2 is a flow chart of a method for diverting and testing an application according to an embodiment of the present invention. The method may include the following steps:
[0035] Step S201, obtaining the diversion object of the application.
[0036] In the technical solution provided in step S201 of the present invention, the diversion object can be used to access an application. For example, the diversion object can be a singleton diversion object, and the application can be a business application (Application, referred to as App), which is only used as an example and is not specifically limited.
[0037] In this embodiment, the diversion object of the application is obtained. Optionally, this embodiment uses a toolkit integrated in the application to obtain the diversion object of the application. For example, using the SDK integrated in the business App, the singleton diversion object of the business App can be obtained. This is only an example and is not specifically limited.
[0038] Step S202, in response to the diversion object having completed initialization, determining from the server first attribute information of the experimental event associated with the application and second attribute information of the experimental data associated with the experimental event.
[0039] In the technical solution provided in step S202 of the present invention, the first attribute information may include first identification information for identifying the experimental event. For example, the first attribute information may be relevant information of the experimental event bound to the business App, and the first identification information may be an experimental identification, which is only used as an example and is not specifically limited.
[0040] In this embodiment, the second attribute information may include second identification information for identifying the experimental data. For example, the second attribute information may be related information of user data associated with the experimental event, and the second identification information may be a user identification, which is only used as an example and is not specifically limited.
[0041] In this embodiment, after obtaining the diversion object of the application, in response to the diversion object having completed initialization, the first attribute information of the experimental event associated with the application and the second attribute information of the experimental data associated with the experimental event are determined from the server. Optionally, based on the diversion object of the application being obtained, this embodiment determines whether the diversion object has completed initialization. If it is determined that the diversion object of the application has completed initialization, the first attribute information of the experimental event associated with the application and the second attribute information of the experimental data associated with the experimental event can be queried from the local server, and the queried first attribute information and the second attribute information can be downloaded.
[0042] Optionally, if it is determined that the diversion object of the application has been initialized, the first attribute information of the experimental event associated with the application and the second attribute information of the experimental data associated with the experimental event can be queried from the cloud server, and the queried first attribute information and second attribute information can be downloaded. The cloud server can be, but is not limited to, a remote dictionary server (Remote Dictionary Server, referred to as Redis).
[0043] Step S203: Based on the first identification information in the first attribute information and the second identification information in the second attribute information, the experimental data is diverted to obtain a diversion result.
[0044] In the technical solution provided in the above step S203 of the present invention, the above diversion result can be used to represent the experimental group assigned to the experimental data.
[0045] In this embodiment, in response to the completion of the initialization of the diversion object, after determining the first attribute information of the experimental event associated with the application and the second attribute information of the experimental data associated with the experimental event from the server, the experimental data is diverted based on the first identification information in the first attribute information and the second identification information in the second attribute information to obtain a diversion result. Optionally, this embodiment can determine the first identification information in the first attribute information and the second identification information in the second attribute information based on the determination of the first attribute information and the second attribute information. By using the determined first identification information and the second identification information to divert the experimental data, a diversion result can be obtained, that is, an experimental group assigned to the experimental data can be obtained.
[0046] Optionally, a hash factor is constructed using the first identification information and the second identification information, and in a mapping relationship table between hash factors and allocation ratios, an allocation ratio that satisfies the hash factor can be found, wherein the hash factor can be obtained by hashing the first identification information and the second identification information using a non-encrypted hash algorithm, and the mapping relationship table can be represented by, but not limited to, a rectangular tree diagram. According to the found allocation ratio, the experimental data is split to obtain a split result.
[0047] Step S204: Based on the diversion result, the application is tested using the experimental data in the experimental group to obtain a test result.
[0048] In the technical solution provided in the above step S204 of the present invention, the above test result can be used to indicate whether the function of the application needs to be corrected.
[0049] In this embodiment, the experimental data is diverted based on the first identification information in the first attribute information and the second identification information in the second attribute information to obtain the diversion result, and then the application is tested in the experimental group using the experimental data based on the diversion result to obtain the test result. Optionally, based on the diversion result, the embodiment can determine the experimental group assigned to the experimental data represented by the diversion result, and perform functional testing on the application using the experimental data in the assigned experimental group to obtain the test result, thereby determining whether it is necessary to modify the function of the application adapted to the experimental data.
[0050] In the above steps S201 to S204 of the present application, when the application is diverted and tested, the diversion object of the application can be obtained. In response to the fact that the obtained diversion object has been initialized, the first attribute information of the experimental event associated with the application and the second attribute information of the experimental data associated with the experimental event can be determined from the server. According to the first identification information in the first attribute information and the second identification information in the second attribute information, the experimental data is diverted to obtain the diversion result, and according to the obtained diversion result, the application is tested in the experimental group using the experimental data to obtain the test result, thereby achieving the purpose of avoiding the unified storage of all experimental configuration information in the diversion control center, thereby solving the technical problem of the excessive request load of the diversion control center, and then achieving the technical effect of reducing the request load of the diversion control center.
[0051] The above method of this embodiment is further introduced below.
[0052] As an optional implementation method, step S203, based on the first identification information in the first attribute information and the second identification information in the second attribute information, diverts the experimental data to obtain a diversion result, including: determining the relationship between the experimental data and the experimental event based on the first identification information and the second identification information; based on the relationship, diverts the experimental data to obtain a diversion result.
[0053] In this embodiment, the relationship between the experimental data and the experimental event can be used to indicate whether the experimental data has been applied in the experimental event.
[0054] In this embodiment, in response to the completion of the initialization of the diversion object, after determining the first attribute information of the experimental event associated with the application and the second attribute information of the experimental data associated with the experimental event from the server, the relationship between the experimental data and the experimental event is determined based on the first identification information and the second identification information. Optionally, this embodiment can determine the first identification information in the first attribute information and the second identification information in the second attribute information on the basis of determining the first attribute information and the second attribute information. A judgment result can be obtained by performing a correlation judgment on the first identification information and the second identification information, wherein the judgment result can be used to indicate whether the first identification information is associated with the second identification information. Based on the obtained judgment result, the relationship between the experimental data and the experimental event can be determined.
[0055] In this embodiment, after determining the relationship between the experimental data and the experimental event based on the first identification information and the second identification information, the experimental data is divided based on the relationship to obtain a division result. Optionally, this embodiment divides the experimental data based on determining the relationship between the experimental data and the experimental event to obtain a division result, that is, the experimental group assigned to the experimental data can be obtained.
[0056] As an optional implementation method, determining the relationship between the experimental data and the experimental event based on the first identification information and the second identification information includes: in response to the first identification information being associated with the second identification information, determining the relationship is that the experimental data has been applied in the experimental event.
[0057] In this embodiment, in response to the completion of the initialization of the diversion object, after determining from the server the first attribute information of the experimental event associated with the application and the second attribute information of the experimental data associated with the experimental event, in response to the first identification information being associated with the second identification information, the relationship is determined to be that the experimental data has been applied in the experimental event. Optionally, this embodiment, based on the determination of the first attribute information and the second attribute information, performs a correlation judgment on the first identification information in the above-mentioned first attribute information and the second identification information in the above-mentioned second attribute information, and a judgment result can be obtained. If the obtained judgment result indicates that the first identification information is associated with the second identification information, it can be determined that the relationship between the experimental data and the experimental event is that the experimental data has been applied in the experimental event.
[0058] Optionally, if the obtained judgment result indicates that the first identification information is not associated with the second identification information, it can be determined that the relationship between the experimental data and the experimental event is that the experimental data has not been applied in the experimental event.
[0059] As an optional embodiment, based on the relationship, the experimental data is diverted to obtain the diversion result, including: in response to the relationship being that the experimental data has been applied in the experimental event, the experimental data is diverted to obtain the diversion result.
[0060] In this embodiment, after determining the relationship between the experimental data and the experimental event based on the first identification information and the second identification information, in response to the relationship being that the experimental data has been applied in the experimental event, the experimental data is diverted to obtain a diversion result. Optionally, this embodiment identifies the determined relationship between the experimental data and the experimental event, and if the relationship is identified as that the experimental data has been applied in the experimental event, the experimental data is diverted to obtain a diversion result, that is, the experimental group assigned to the experimental data can be obtained.
[0061] As an optional implementation method, step S204, based on the diversion result, tests the application program using the experimental data in the experimental group to obtain a test result, including: in response to the diversion result being a first diversion result, testing the application program using the first experimental data in the first experimental group to obtain a first test result; in response to the diversion result being a second diversion result, testing the application program using the second experimental data in the second experimental group to obtain a second test result.
[0062] In this embodiment, the experimental data may include first experimental data and second experimental data, wherein the value of the first experimental data is different from the value of the second experimental data.
[0063] In this embodiment, the first diversion result can be used to indicate the first experimental group assigned to the first experimental data. The first test result can be used to indicate whether the function of the application program adapted to the first experimental data needs to be modified.
[0064] In this embodiment, after the experimental data is diverted based on the first identification information in the first attribute information and the second identification information in the second attribute information to obtain the diversion result, in response to the diversion result being the first diversion result, the application is tested using the first experimental data in the first experimental group to obtain the first test result. Optionally, on the basis of obtaining the diversion result, this embodiment compares the obtained diversion result with the first diversion result and the second diversion result. If the obtained diversion result is compared to be the first diversion result, the application is tested using the first experimental data in the first experimental group assigned to the first experimental data to obtain the first test result, thereby determining whether it is necessary to modify the function of the application adapted to the first experimental data.
[0065] In this embodiment, the second diversion result can be used to indicate the second experimental group assigned to the second experimental data. The second test result can be used to indicate whether the function of the application program adapted to the second experimental data needs to be modified.
[0066] In this embodiment, after the experimental data is diverted based on the first identification information in the first attribute information and the second identification information in the second attribute information to obtain the diversion result, in response to the diversion result being the second diversion result, the application is tested using the second experimental data in the second experimental group to obtain the second test result. Optionally, on the basis of obtaining the diversion result, this embodiment compares the obtained diversion result with the first diversion result and the second diversion result. If the obtained diversion result is compared to be the second diversion result, the application is tested using the second experimental data in the second experimental group assigned to the second experimental data to obtain the second test result, thereby determining whether it is necessary to modify the function of the application adapted to the second experimental data.
[0067] As an optional implementation manner, step S201, obtaining a diversion object of an application, includes: using a toolkit to obtain the diversion object in a singleton mode.
[0068] In this embodiment, the toolkit is used to obtain the diversion object in singleton mode. Optionally, this embodiment uses a toolkit integrated in the application to obtain the diversion object of the application in singleton mode. For example, using the SDK integrated in the business App, the singleton diversion object of the business App can be obtained in singleton mode. This is only an example and is not specifically limited.
[0069] In an embodiment of the present invention, when a diversion test is performed on an application, a diversion object of the application can be obtained. In response to the obtained diversion object having completed initialization, the first attribute information of the experimental event associated with the application and the second attribute information of the experimental data associated with the experimental event can be determined from the server. According to the first identification information in the first attribute information and the second identification information in the second attribute information, the experimental data is diverted to obtain a diversion result, and according to the obtained diversion result, the application is tested using the experimental data in the experimental group to obtain a test result, thereby achieving the purpose of avoiding the unified storage of all experimental configuration information in the diversion control center, thereby solving the technical problem of the excessively high request load of the diversion control center, and further achieving the technical effect of reducing the request load of the diversion control center.
[0070] The technical solution of the embodiment of the present invention is illustrated below in conjunction with preferred implementation modes.
[0071] Before the product is officially iterated and released, the diversion method is often used to divide user data into several groups, allowing user groups with similar characteristics to randomly use the above plan. Scientific decisions are made based on the real data feedback of the user groups to obtain the final plan.
[0072] However, existing traffic diversion methods often add traffic distribution code based on the request gateway layer of load balancing. Alternatively, the diversion strategy and related algorithms are packaged into a software development kit (SDK) and integrated into the business side, and the configuration information of all experiments is uniformly stored in the diversion control center, which leads to the technical problem of excessive request load in the diversion control center.
[0073] In order to solve the above technical problems, an embodiment of the present invention proposes a diversion test method for an application program, in response to the acquisition of the diversion object having completed initialization, the first attribute information of the experimental event associated with the application program and the second attribute information of the experimental data associated with the experimental event can be determined from the server. According to the first identification information in the first attribute information and the second identification information in the second attribute information, the experimental data is diverted to obtain the diversion result, and according to the obtained diversion result, the application program is tested using the experimental data in the experimental group to obtain the test result, thereby achieving the purpose of avoiding the unified storage of all experimental configuration information in the diversion control center, thereby solving the technical problem of the excessively high request load of the diversion control center, and further achieving the technical effect of reducing the request load of the diversion control center.
[0074] In this embodiment, the AB experiment diversion method based on cache (redis) in this application is executed to perform diversion testing on the application. For example, Figure 3 is a flow chart of a cache-based AB experiment diversion method according to an embodiment of the present invention. Figure 3 As shown, the method may include the following steps:
[0075] Step S301, enter the experiment entrance.
[0076] After entering the experiment entrance, proceed to step S302 and step S303 to initialize the diversion object and call the diversion entrance method.
[0077] In the technical solution provided in step S302 of the present invention, a singleton diversion object can be obtained according to the identification (ID) of the business App. The advantage of the singleton mode is that it provides a global access point for the business App, avoiding the overhead of repeatedly creating the same object, thereby achieving the purpose of saving system resources.
[0078] In the technical solution provided in the above step S303 of the present invention, the diversion entry method can be called based on obtaining the experiment ID and the user ID.
[0079] After initializing the diversion object, proceed to step S305 and step S306 to call the experimental service interface and the user service interface.
[0080] In the technical solution provided in the above step S305 of the present invention, the diversion SDK asynchronously calls the experiment service interface of the experiment management platform through a remote procedure call (RPC) according to the business ID of the business App to query the relevant information of the experimental event bound to the business App, and caches the queried results to the Redis server, setting a random expiration time to prevent cache avalanche.
[0081] In the technical solution provided in the above step S306 of the present invention, the diversion SDK asynchronously calls the user service interface of the experiment management platform through RPC according to the business ID and user ID to query the association information between the business user data and the experimental event, and caches the queried results in the Redis server, and sets a random expiration time to prevent cache avalanche.
[0082] For the above step S305 and the above step S306, a scheduled task is set to asynchronously refresh the Redis cache information to ensure the freshness of the experiment and user information.
[0083] After calling the diversion entry method, proceed to step S307 to cache the relevant information of the experimental event bound to the business App and the association information between the business user data and the experimental event in the Redis server.
[0084] After the relevant information of the experimental event bound to the business App and the association information between the business user data and the experimental event are cached in the Redis server, step S308 is entered to determine whether the user data is used in the experiment.
[0085] If it is determined that the user data has been used in the experiment, the process proceeds to step S309 to obtain the experiment information. If it is determined that the user data has not been used in the experiment, the process ends.
[0086] In the technical solution provided in the above step S309 of the present invention, the offload SDK queries the experiment information from the Redis server according to the experiment ID.
[0087] In this embodiment, the diversion SDK queries the cache information associated with the user and the experiment from the Redis server according to the experiment ID. If the query finds that the user data has been used in the experiment, go to step S309; if the query finds that the user data has not been used in the experiment, perform the following processing: Processing method 1, if the cache data is queried from Redis, and it is determined that the user data is not used in the experiment, jump directly to step S312; Processing method 2, if the expired cache is queried from Redis, return the expired return data for judgment, and asynchronously call the experimental user service interface of the experimental platform to refresh the cache; Processing method 3, if the query from Redis is empty (use Bloom filter to filter invalid requests, if the requested key does not exist in the Bloom filter, the request is directly rejected, and the remote service will not be called to prevent cache penetration), then jump directly to step S312 to end the experimental diversion. Among them, the cache boundary processing method is executed according to the above three processing methods.
[0088] After obtaining the experimental information, the process proceeds to step S310 to execute the diversion strategy.
[0089] In the technical solution provided in the above step S310 of the present invention, after obtaining the experiment name, experiment details, experiment type, experiment status, experiment effective time range, experiment group and allocation ratio and other information, the diversion SDK uses the experiment ID and the user ID to construct a hash factor, for example, using a non-encrypted hash algorithm (murmurhash) to complete the hash modulus (for example, 0-99 buckets). At the same time, a weighted diversion algorithm is implemented based on a rectangular tree map (TreeMap), and the user data is experimentally diverted according to the experimental group and allocation ratio of the experiment.
[0090] After executing the diversion strategy, proceed to step S311 and step S312 to divert the experiments to specific experimental groups, and execute corresponding business logic according to different experimental groups.
[0091] In the technical solution provided in the above step S311 of the present invention, the diversion SDK returns the final experimental diversion result (that is, the experimental group information assigned to the user data) to the business App.
[0092] In the technical solution provided in the above step S312 of the present invention, the business App will execute different business logics according to different experimental groups assigned by the user.
[0093] It should be noted that the above-mentioned business App can be responsible for the core business logic of the application, and integrate the diversion SDK to achieve the effect of experiment diversion; the above-mentioned diversion SDK can be used to obtain the experiment configuration and related user information from the Redis server, and divert the user data to different experiment groups according to the proportion and rules of the experiment configuration; the above-mentioned experiment platform can be used to configure various parameters of the experiment, wherein the various parameters may include the experiment ID, experiment group information and proportion, etc.; the above-mentioned Redis server can be used to obtain the experiment configuration and related user information from the experiment platform at a regular interval, and cache it in the server, and set the expiration time, while realizing asynchronous refresh and expired cache to prevent cache penetration.
[0094] In this embodiment, when a diversion test is performed on an application, a diversion object of the application can be obtained. In response to the obtained diversion object having completed initialization, the first attribute information of the experimental event associated with the application and the second attribute information of the experimental data associated with the experimental event can be determined from the server. According to the first identification information in the first attribute information and the second identification information in the second attribute information, the experimental data is diverted to obtain a diversion result, and according to the obtained diversion result, the application is tested using the experimental data in the experimental group to obtain a test result, thereby achieving the purpose of avoiding the unified storage of all experimental configuration information in the diversion control center, thereby solving the technical problem of excessive request load of the diversion control center, and further achieving the technical effect of reducing the request load of the diversion control center.
[0095] According to an embodiment of the present invention, a flow diversion testing device for an application is also provided. It should be noted that the flow diversion testing device for an application can be used to execute a flow diversion testing method for an application in an embodiment.
[0096] Figure 4 FIG. 1 is a schematic diagram of a flow diversion testing device for an application according to an embodiment of the present invention. Figure 4 As shown, the application program diversion testing device 400 may include: an acquisition unit 401 , a determination unit 402 , a diversion unit 403 and a testing unit 404 .
[0097] The acquisition unit 401 is used to acquire a diversion object of an application program, wherein the diversion object is used to access the application program.
[0098] The determination unit 402 is used to determine, in response to the completion of initialization of the diversion object, first attribute information of the experimental event associated with the application and second attribute information of the experimental data associated with the experimental event from the server, wherein the first attribute information includes first identification information for identifying the experimental event, and the second attribute information includes second identification information for identifying the experimental data.
[0099] The diversion unit 403 is used to divert the experimental data based on the first identification information in the first attribute information and the second identification information in the second attribute information to obtain a diversion result, wherein the diversion result is used to indicate the experimental group assigned to the experimental data.
[0100] The testing unit 404 is used to test the application program using the experimental data in the experimental group based on the diversion result to obtain a test result, wherein the test result is used to indicate whether the function of the application program needs to be modified.
[0101] Optionally, the diversion unit 403 may include: a determination module, used to determine the relationship between the experimental data and the experimental event based on the first identification information and the second identification information; and a diversion module, used to divert the experimental data based on the relationship to obtain a diversion result.
[0102] Optionally, the determination module may include: a determination submodule, configured to determine, in response to the first identification information being associated with the second identification information, that the relationship is that the experimental data has been applied in the experimental event.
[0103] Optionally, the diversion module may include: a diversion submodule, configured to divert the experimental data in response to the relationship that the experimental data has been applied in the experimental event, to obtain a diversion result.
[0104] Optionally, the testing unit 404 may include: a first testing module, used to test the application using the first experimental data in the first experimental group in response to the diversion result being the first diversion result, so as to obtain a first test result, wherein the first diversion result is used to indicate the first experimental group assigned to the first experimental data, and the first test result is used to indicate whether it is necessary to correct the function of the application adapted to the first experimental data; a second testing module, used to test the application using the second experimental data in the second experimental group in response to the diversion result being the second diversion result, so as to obtain a second test result, wherein the second diversion result is used to indicate the second experimental group assigned to the second experimental data, and the second test result is used to indicate whether it is necessary to correct the function of the application adapted to the second experimental data.
[0105] Optionally, the acquisition unit 401 may include: an acquisition module, configured to acquire the diversion object by using a toolkit in a singleton mode.
[0106] In this embodiment, the following units are deployed in the diversion test device of the application: an acquisition unit, used to acquire the diversion object of the application, wherein the diversion object is used to access the application; a determination unit, used to determine, in response to the completion of initialization of the diversion object, from the server, first attribute information of the experimental event associated with the application, and second attribute information of the experimental data associated with the experimental event, wherein the first attribute information includes first identification information for identifying the experimental event, and the second attribute information includes second identification information for identifying the experimental data; a diversion unit, used to divert the experimental data based on the first identification information in the first attribute information and the second identification information in the second attribute information, to obtain a diversion result, wherein the diversion result is used to indicate the experimental group assigned to the experimental data; a testing unit, used to test the application using the experimental data in the experimental group based on the diversion result, to obtain a test result, wherein the test result is used to indicate whether the function of the application needs to be corrected, thereby achieving the purpose of avoiding the unified storage of all experimental configuration information in the diversion control center, thereby solving the technical problem of excessive request load of the diversion control center, and further achieving the technical effect of reducing the request load of the diversion control center.
[0107] It should be noted that the acquisition unit 401, the determination unit 402, the diversion unit 403 and the test unit 404 correspond to steps S201 to S204 in the embodiment, and the four units are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the contents disclosed in the above embodiment. It should be noted that the above modules or units can be hardware components or software components stored in a memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n), and the above modules can also be part of the device and can be run in the computer terminal 10 provided in the first embodiment.
[0108] An embodiment of the present application may provide an electronic device, Figure 5 is a structural block diagram of an electronic device according to an embodiment of the present application. Figure 5 As shown, the electronic device 500 may include: one or more ( Figure 5 (only one is shown) processor 502, memory 504, storage controller 506, and peripheral interface 508, wherein the peripheral interface 508 is connected to the RF module 5101, the audio module 5102 and the display 5103.
[0109] Among them, the memory can be used to store software programs and modules, such as program instructions / modules corresponding to the methods and devices in the embodiments of the present application, and the processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0110] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: obtain a diversion object of the application, wherein the diversion object is used to access the application; in response to the diversion object having completed initialization, determine from the server first attribute information of an experimental event associated with the application, and second attribute information of experimental data associated with the experimental event, wherein the first attribute information includes first identification information for identifying the experimental event, and the second attribute information includes second identification information for identifying the experimental data; based on the first identification information in the first attribute information and the second identification information in the second attribute information, divert the experimental data to obtain a diversion result, wherein the diversion result is used to indicate the experimental group assigned to the experimental data; based on the diversion result, test the application in the experimental group using the experimental data to obtain a test result, wherein the test result is used to indicate whether the function of the application needs to be corrected.
[0111] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: determine the relationship between the experimental data and the experimental event based on the first identification information and the second identification information; based on the relationship, divert the experimental data to obtain the diversion result.
[0112] The processor may also call the information and application program stored in the memory through the transmission device to perform the following steps: in response to the first identification information being associated with the second identification information, determining the relationship as the experimental data having been applied in the experimental event.
[0113] The processor may also call the information and application program stored in the memory through the transmission device to perform the following steps: in response to the relationship that the experimental data has been applied in the experimental event, divert the experimental data to obtain a diversion result.
[0114] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: in response to the diversion result being a first diversion result, testing the application using the first experimental data in the first experimental group to obtain a first test result, wherein the first diversion result is used to indicate the first experimental group assigned to the first experimental data, and the first test result is used to indicate whether it is necessary to correct the function of the application adapted to the first experimental data; in response to the diversion result being a second diversion result, testing the application using the second experimental data in the second experimental group to obtain a second test result, wherein the second diversion result is used to indicate the second experimental group assigned to the second experimental data, and the second test result is used to indicate whether it is necessary to correct the function of the application adapted to the second experimental data.
[0115] The processor can also call the information and application program stored in the memory through the transmission device to perform the following steps: using the toolkit, in singleton mode, to obtain the diversion object.
[0116] In an embodiment of the present invention, when a diversion test is performed on an application, a diversion object of the application can be obtained. In response to the obtained diversion object having completed initialization, the first attribute information of the experimental event associated with the application and the second attribute information of the experimental data associated with the experimental event can be determined from the server. According to the first identification information in the first attribute information and the second identification information in the second attribute information, the experimental data is diverted to obtain a diversion result, and according to the obtained diversion result, the application is tested using the experimental data in the experimental group to obtain a test result, thereby achieving the purpose of avoiding the unified storage of all experimental configuration information in the diversion control center, thereby solving the technical problem of the excessively high request load of the diversion control center, and further achieving the technical effect of reducing the request load of the diversion control center.
[0117] Figure 5 is a structural block diagram of an electronic device according to an embodiment of the present application. A person skilled in the art can understand that Figure 5 The structure shown is for illustration only, and the electronic device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, or other terminal devices. Figure 5 The structure of the electronic device is not limited. Figure 5 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Figure 5 Different configurations shown.
[0118] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.
[0119] According to an embodiment of the present invention, a processor is further provided, the processor being used to run a program, wherein when the program is run by the processor, the diversion testing method of the application program in the embodiment is executed.
[0120] According to an embodiment of the present invention, there is also provided an electronic device, comprising: a memory storing an executable program; and a processor for running the program, wherein the program executes the diversion test method of the application program in the embodiment when running.
[0121] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the diversion test method of the application program in the embodiment.
[0122] According to an embodiment of the present invention, a computer program product is further provided. The computer program product includes a computer program. When the computer program is executed by a processor, the method for diverting the application program in the embodiment is implemented.
[0123] According to an embodiment of the present invention, a computer program product is also provided, including a non-volatile computer-readable storage medium, the non-volatile computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the diversion test method of the application program in the embodiment is implemented.
[0124] According to an embodiment of the present invention, a computer program is also provided. When the computer program is executed by a processor, the method for diverting the application program in the embodiment is implemented.
[0125] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0126] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0127] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0128] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed over multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0129] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0130] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the relevant technology, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes: U disk, ROM, RAM, mobile hard disk, disk or optical disk and other media that can store program codes.
[0131] The above are only preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for diversion testing of an application, characterized in that: include: Obtaining a diversion object of an application, wherein the diversion object is used to access the application; In response to the diversion object having completed initialization, determining from the server first attribute information of an experimental event associated with the application, and second attribute information of experimental data associated with the experimental event, wherein the first attribute information includes first identification information for identifying the experimental event, and the second attribute information includes second identification information for identifying the experimental data; Based on the first identification information in the first attribute information and the second identification information in the second attribute information, the experimental data is divided to obtain a division result, wherein the division result is used to indicate an experimental group assigned to the experimental data; Based on the diversion result, the application is tested in the experimental group using the experimental data to obtain a test result, wherein the test result is used to indicate whether the function of the application needs to be modified.
2. The method according to claim 1, characterized in that Based on the first identification information in the first attribute information and the second identification information in the second attribute information, the experimental data is divided to obtain a division result, including: Determining a relationship between the experimental data and the experimental event based on the first identification information and the second identification information; Based on the relationship, the experimental data is divided to obtain the division result.
3. The method according to claim 2, characterized in that Determining the relationship between the experimental data and the experimental event based on the first identification information and the second identification information includes: In response to the first identification information being associated with the second identification information, the relationship is determined to be that the experimental data has been applied in the experimental event.
4. The method according to claim 3, characterized in that Based on the relationship, the experimental data is divided to obtain the division result, including: In response to the relationship that the experimental data has been applied in the experimental event, the experimental data is diverted to obtain the diversion result.
5. The method according to claim 1, characterized in that The experimental data includes first experimental data and second experimental data, the value of the first experimental data is different from the value of the second experimental data, and based on the diversion result, the application is tested in the experimental group using the experimental data to obtain a test result, including: In response to the diversion result being a first diversion result, testing the application using the first experimental data in a first experimental group to obtain a first test result, wherein the first diversion result is used to indicate the first experimental group assigned to the first experimental data, and the first test result is used to indicate whether a function of the application adapted to the first experimental data needs to be modified; In response to the diversion result being a second diversion result, the application is tested in a second experimental group using the second experimental data to obtain a second test result, wherein the second diversion result is used to indicate the second experimental group assigned to the second experimental data, and the second test result is used to indicate whether it is necessary to correct the function of the application adapted to the second experimental data.
6. The method according to claim 1, characterized in that Get the application's diversion object, including: The shunt object is obtained in singleton mode using a toolkit.
7. A flow-dividing testing device for an application, characterized in that: include: An acquisition unit, used for acquiring a diversion object of an application, wherein the diversion object is used for accessing the application; a determining unit, configured to determine, in response to the diversion object having completed initialization, from a server, first attribute information of an experimental event associated with the application, and second attribute information of experimental data associated with the experimental event, wherein the first attribute information includes first identification information for identifying the experimental event, and the second attribute information includes second identification information for identifying the experimental data; a distribution unit, configured to distribute the experimental data based on the first identification information in the first attribute information and the second identification information in the second attribute information to obtain a distribution result, wherein the distribution result is used to indicate an experimental group assigned to the experimental data; A testing unit is used to test the application program in the experimental group using the experimental data based on the diversion result to obtain a test result, wherein the test result is used to indicate whether the function of the application program needs to be corrected.
8. A processor, characterized in that: The processor is used to run a program, wherein the program, when run by the processor, executes the diversion testing method of the application program described in any one of claims 1 to 6.
9. An electronic device, characterized in that: include: A memory storing an executable program; A processor is used to run the program, wherein the program, when running, executes the diversion testing method of the application program described in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored executable program, wherein when the executable program is run, the device where the storage medium is located is controlled to execute the diversion test method of the application program described in any one of claims 1 to 6.