CN111290799B - Component loading method and device, electronic equipment and storage medium - Google Patents

Component loading method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111290799B
CN111290799B CN202010081720.0A CN202010081720A CN111290799B CN 111290799 B CN111290799 B CN 111290799B CN 202010081720 A CN202010081720 A CN 202010081720A CN 111290799 B CN111290799 B CN 111290799B
Authority
CN
China
Prior art keywords
random
target component
result
random result
pointing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010081720.0A
Other languages
Chinese (zh)
Other versions
CN111290799A (en
Inventor
倪连柱
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202010081720.0A priority Critical patent/CN111290799B/en
Publication of CN111290799A publication Critical patent/CN111290799A/en
Application granted granted Critical
Publication of CN111290799B publication Critical patent/CN111290799B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the disclosure discloses a component loading method, a device, electronic equipment and a storage medium, wherein the method is used for executing the following operations according to an instruction code each time when a browsing client loads a target component at least once: determining whether a random result pointing to the target component exists or not, if not, generating the random result pointing to the target component according to a random strategy and storing the random result; and determining whether to load/hide the preset function of the target component according to the random result, and loading the target component according to the determined result. The technical scheme of the embodiment can load the same component by adopting the consistent random result within a certain range, so that the functions of the components are kept consistent.

Description

Component loading method and device, electronic equipment and storage medium
Technical Field
The embodiment of the disclosure relates to the technical field of Internet, in particular to a component loading method, a device, electronic equipment and a storage medium.
Background
Before the application is stably released, the application is usually put on the market in an experiment diversion mode, and specific functional improvement is fed back to be positive or negative according to experimental data to serve as a decision basis. For example, control some content to be open to random 20% of users, making hits visible to clients.
To make experimental data more objective, and to more easily control experimental split ratios, random strategies are typically employed to open only new or improved functions to hit users.
However, the random strategy, while making the hit user more average and objective, may also cause problems, for example, if the page or site uses the function in multiple places, the user may suddenly hit the function and suddenly miss the function.
Disclosure of Invention
In view of this, the embodiments of the present disclosure provide a method, an apparatus, an electronic device, and a storage medium for loading components, so as to maintain consistency of component functions.
Other features and advantages of embodiments of the present disclosure will be apparent from the following detailed description, or may be learned by practice of embodiments of the disclosure in part.
In a first aspect, an embodiment of the present disclosure provides a component loading method, including:
determining whether a random result pointing to the target component exists or not, if not, generating the random result pointing to the target component according to a random strategy and storing the random result;
and determining whether to load/hide the preset function of the target component according to the random result, and loading the target component according to the determined result.
In a second aspect, an embodiment of the present disclosure further provides a component loading apparatus, including:
the random result determining unit is used for determining whether a random result pointing to the target assembly exists or not, and if the random result does not exist, generating the random result pointing to the target assembly according to a random strategy and storing the random result;
and the random loading unit is used for determining whether to load/hide the preset function of the target component according to the random result and loading the target component according to the determined result.
In a third aspect, an embodiment of the present disclosure further provides an electronic device, including:
one or more processors;
a memory for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of the first aspects.
In a fourth aspect, the presently disclosed embodiments also provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method according to any of the first aspects.
According to the embodiment of the disclosure, whether the random result pointing to the target component exists or not is determined, if not, the random result pointing to the target component is generated and stored according to a random strategy, whether the preset function of the target component is loaded/hidden or not is determined according to the random result, the target component is loaded according to the determined result, and the same component can be loaded by adopting the consistent random result within a certain range, so that the consistency of the component functions is maintained.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following description will briefly explain the drawings required to be used in the description of the embodiments of the present disclosure, and it is apparent that the drawings in the following description are only some of the embodiments of the present disclosure, and other drawings may be obtained according to the contents of the embodiments of the present disclosure and these drawings without inventive effort for those skilled in the art.
FIG. 1 is a flow chart of a component loading method provided in an embodiment of the present disclosure;
FIG. 2 is a flow chart of another component loading method provided by an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a component loading device according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of another component loading device provided by an embodiment of the present disclosure;
fig. 5 shows a schematic structural diagram of an electronic device suitable for use in implementing embodiments of the present disclosure.
Detailed Description
In order to make the technical problems solved, the technical solutions adopted and the technical effects achieved by the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described in further detail below with reference to the accompanying drawings, and it is apparent that the described embodiments are only some embodiments, but not all embodiments of the present disclosure. All other embodiments, which are derived by a person skilled in the art from the embodiments of the present disclosure without creative efforts, fall within the protection scope of the embodiments of the present disclosure.
It should be noted that the terms "system" and "network" in the embodiments of the present disclosure are often used interchangeably herein. References to "and/or" in the embodiments of the present disclosure are intended to encompass any and all combinations of one or more of the associated listed items. The terms first, second and the like in the description and in the claims and drawings are used for distinguishing between different objects and not for limiting a particular order.
It should be further noted that, in the embodiments of the present disclosure, the following embodiments may be implemented separately, or may be implemented in combination with each other, which is not specifically limited by the embodiments of the present disclosure.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
The technical solutions of the embodiments of the present disclosure are further described below with reference to the accompanying drawings and through specific implementations.
Fig. 1 is a flow chart illustrating a component loading method according to an embodiment of the present disclosure, where the embodiment is applicable to a case of loading components according to a random policy, and the method may be performed by a component loading device in an electronic device, as shown in fig. 1, where the component loading method according to the embodiment is used to execute, when a client browses a target component at least once, the following operations according to instruction codes each time:
in step S110, it is determined whether there is a random result directed to the target component, and if not, a random result directed to the target component is generated and stored according to a random policy.
The random result is obtained, and the effects of the technical scheme of the embodiment of the disclosure are different due to the fact that the data life cycle of different storage modes related to the preset random result storage modes are different.
For example, the random result may be stored in a global variable of the browsing client, with a life cycle of: starting from the first generation or storage of the random result and ending with the closing of the browsing client. During this period, the same random result is used to load the target component.
As another example, the random result may be stored in a cookie of the current session of the browsing client, with the life cycle limited to the duration of the current session.
For another example, the random result may be stored in a sessionStorage, and the same random result is used to load the target component prior to page closing.
For another example, the random result may be stored in a LocalStorage, which is permanently valid for the browsing client, and the user always loads the target component with the same random result when using the browsing client to load the target component.
Based on the different effects described above, this step can be achieved through a variety of schemes, including but not limited to the following:
and according to the scheme I, determining whether a random result pointing to the target component exists in the global variable of the browsing client, if not, generating the random result pointing to the target component according to a random strategy, and setting the random result as the global variable of the browsing client.
And secondly, determining whether a random result pointing to the target component exists in the local storage of the browsing client, if not, generating the random result pointing to the target component according to a random strategy, and storing the random result in the local storage of the browsing client, wherein the local storage is cookie, localStorage or sessionStorage.
In this step, the specific method for generating the random result pointing to the target component according to the random policy may be different according to application scenarios, where the random policy may consider a plurality of factors, such as user factors, user weights, and preset proportions (e.g. controlling the predetermined function to be open to 20% of users at random). And generating a random number according to the factors, and determining a random result pointing to the target component according to the numerical value of the random number. For example, a random number is generated according to a set proportion and/or the weight of the current user, and a random result pointing to the target component is determined according to the value of the random number.
In step S120, it is determined whether to load/hide a predetermined function of the target component according to the random result, and the target component is loaded according to the determined result.
For example, if the random result is a first result, determining that the target component conceals the predetermined function; and if the random result is a second result, determining that the target component loads the preset function.
According to the embodiment, whether the random result pointing to the target component exists or not is determined, if not, the random result pointing to the target component is generated and stored according to a random strategy, whether the preset function of the target component is loaded/hidden or not is determined according to the random result, the target component is loaded according to the determined result, and the same component can be loaded by adopting the consistent random result within a certain range, so that the consistency of the component functions is maintained.
Fig. 2 is a schematic flow chart of another method for loading a component according to an embodiment of the present disclosure, where the embodiment is improved and optimized based on the foregoing embodiment, and is used to open trial on a part of users by a function to be issued in the component, so as to evaluate whether to issue the function to be issued according to effect information after trial on the part of users.
As shown in fig. 2, the component loading method in this embodiment includes:
in step S210, it is determined whether there is a random result directed to the target component, and if not, a random result directed to the target component is generated and stored according to a random policy.
For example, whether a random result pointing to the target component exists in the global variable of the browsing client is determined, and if not, the random result pointing to the target component is generated according to a random strategy and set as the global variable of the browsing client.
For another example, whether a random result pointing to the target component exists in the local storage of the browsing client is determined, if not, the random result pointing to the target component is generated according to a random policy and is stored in the local storage of the browsing client, wherein the local storage is Cookie, localStorage or sessionStorage.
The random result pointing to the target component is generated according to a random strategy, a random number can be generated according to a set proportion and/or the weight of the current user, and the random result pointing to the target component is determined according to the value of the random number.
In step S220, it is determined whether to load/hide the function to be issued of the target component according to the random result, and the target component is loaded according to the determined result.
For example, if the random result is a first result, determining that the target component hides the function to be issued; and if the random result is a second result, determining that the target component loads the function to be issued.
For example, if the random strategy is: and opening the functions to be issued in the target component to 20% of users. And generating a random number between 0 and 1 for the user, opening the function to be issued to the user with the random result of 0 to 0.2, and hiding the function to be issued to the user with the random result of 0.2 to 1.
In step S230, the effect information of the target component is classified and counted according to the random result, and the function to be issued is evaluated according to the classified and counted result to determine whether to issue.
Generally, if the score statistics shows that the effect of the hit user group of the function to be issued is significantly better than the effect of the non-hit user group, the function to be issued in the target component can be determined to be formally issued. After formal release, the system is opened to all users.
The embodiment discloses a new technical scheme based on the previous embodiment, which is used for opening trial cases for partial users of functions to be distributed in the component, evaluating whether the functions to be distributed are distributed according to the effect information of the partial users after trial, determining the trial range of the functions to be distributed by adopting consistent random results within a certain range, keeping the consistency of the functions of the component, keeping the independence of samples and enabling the evaluation result to be more objective.
As an implementation of the method shown in the foregoing figures, the present disclosure provides an embodiment of a component loading device, and fig. 3 shows a schematic structural diagram of the component loading device provided in this embodiment, where the embodiment of the device corresponds to the embodiment of the method shown in fig. 1 and fig. 2, and the device may be specifically applied to various electronic devices. As shown in fig. 3, the component loading apparatus described in the present embodiment includes a random result determining unit 310 and a random loading unit 320.
The random result determining unit 310 is configured to determine whether there is a random result pointing to the target component, and if not, generate and store the random result pointing to the target component according to a random policy;
the random loading unit 320 is configured to determine whether to load/hide a predetermined function of the target component according to the random result, and load the target component according to the determined result.
In an embodiment, the random result determining unit 310 is configured to determine whether there is a random result pointing to the target component in the global variable of the browsing client, and if not, generate a random result pointing to the target component according to a random policy and set as the global variable of the browsing client.
In an embodiment, the random result determining unit 310 is configured to determine whether there is a random result pointing to the target component in the local storage of the browsing client, and if not, generate the random result pointing to the target component according to a random policy and store the random result in the local storage of the browsing client, where the local storage is cookie, localStorage or sessionStorage.
In an embodiment, the random result determining unit 310 is configured to generate a random number according to a set proportion and/or a weight of a current user, and determine a random result pointing to the target component according to a value of the random number.
In one embodiment, the random loading unit 320 is configured to:
if the random result is a first result, determining that the target component conceals the preset function;
and if the random result is a second result, determining that the target component loads the preset function.
The component loading device provided by the embodiment can execute the component loading method provided by the embodiment of the method disclosed by the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Fig. 4 is a schematic structural diagram of another component loading device according to an embodiment of the present disclosure, and as shown in fig. 4, the component loading device according to the present embodiment includes a random result determining unit 410, a random loading unit 420, and an effect evaluating unit 430.
The random result determining unit 410 is configured to determine whether there is a random result pointing to the target component, and if not, generate and store the random result pointing to the target component according to a random policy;
the random loading unit 420 is configured to determine that the target component hides the predetermined function if the random result is a first result; and if the random result is a second result, determining that the target component loads the preset function. And loading the target component according to the determined result.
Wherein the predetermined function is a function to be issued in the target component.
The effect evaluation unit 430 is configured to perform classification statistics on the effect information of the target component according to the random result after loading the target component according to the determined result, and evaluate the function to be issued according to the classification statistics result to determine whether to issue.
In an embodiment, the random result determining unit 410 is configured to determine whether there is a random result pointing to the target component in the global variable of the browsing client, and if not, generate a random result pointing to the target component according to a random policy and set as the global variable of the browsing client.
In an embodiment, the random result determining unit 410 is configured to determine whether there is a random result pointing to the target component in the local storage of the browsing client, and if not, generate the random result pointing to the target component according to a random policy and store the random result in the local storage of the browsing client, where the local storage is cookie, localStorage or sessionStorage.
In an embodiment, the random result determining unit 410 is configured to generate a random number according to a set proportion and/or a weight of a current user, and determine a random result pointing to the target component according to a value of the random number.
The component loading device provided by the embodiment can execute the component loading method provided by the embodiment of the method disclosed by the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Referring now to fig. 5, a schematic diagram of an electronic device 500 suitable for use in implementing embodiments of the present disclosure is shown. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 5 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 5, the electronic device 500 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 501, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage means 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic apparatus 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
In general, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 507 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 508 including, for example, magnetic tape, hard disk, etc.; and communication means 509. The communication means 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. While fig. 5 shows an electronic device 500 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 509, or from the storage means 508, or from the ROM 502. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 501.
It should be noted that, the computer readable medium described above in the embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the disclosed embodiments, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the disclosed embodiments, the computer-readable signal medium may comprise a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to:
determining whether a random result pointing to the target component exists or not, if not, generating the random result pointing to the target component according to a random strategy and storing the random result;
and determining whether to load/hide the preset function of the target component according to the random result, and loading the target component according to the determined result.
Computer program code for carrying out operations for embodiments of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. The name of the unit does not in any way constitute a limitation of the unit itself, for example the first acquisition unit may also be described as "unit acquiring at least two internet protocol addresses".
According to one or more embodiments of the present disclosure, in the component loading method, determining whether there is a random result pointing to the target component, and if not, generating and saving the random result pointing to the target component according to a random policy includes: and determining whether a random result pointing to the target component exists in the global variable of the browsing client, if not, generating the random result pointing to the target component according to a random strategy, and setting the random result as the global variable of the browsing client.
According to one or more embodiments of the present disclosure, in the component loading method, determining whether there is a random result pointing to the target component, and if not, generating and saving the random result pointing to the target component according to a random policy includes:
and determining whether a random result pointing to the target component exists in the local storage of the browsing client, if not, generating the random result pointing to the target component according to a random strategy, and storing the random result into the local storage of the browsing client, wherein the local storage is cookie, localStorage or a sessionStorage.
According to one or more embodiments of the present disclosure, in the component loading method, the generating a random result directed to the target component according to a random policy includes:
and generating a random number according to the set proportion and/or the weight of the current user, and determining a random result pointing to the target component according to the numerical value of the random number.
According to one or more embodiments of the present disclosure, in the component loading method, determining whether to load/hide the predetermined function of the target component according to the random result includes:
if the random result is a first result, determining that the target component conceals the preset function;
and if the random result is a second result, determining that the target component loads the preset function.
According to one or more embodiments of the present disclosure, in the component loading method, the predetermined function is a function to be issued in the target component;
the component loading method further comprises the following steps: and after loading the target component according to the determined result, classifying and counting the effect information of the target component according to the random result, and evaluating the function to be issued according to the classifying and counting result to determine whether to issue or not.
According to one or more embodiments of the present disclosure, in the component loading apparatus, the random result determining unit is configured to: and determining whether a random result pointing to the target component exists in the global variable of the browsing client, if not, generating the random result pointing to the target component according to a random strategy, and setting the random result as the global variable of the browsing client.
According to one or more embodiments of the present disclosure, in the component loading apparatus, the random result determining unit is configured to:
and determining whether a random result pointing to the target component exists in the local storage of the browsing client, if not, generating the random result pointing to the target component according to a random strategy, and storing the random result in the local storage of the browsing client.
In accordance with one or more embodiments of the present disclosure, in the component loading apparatus, the local store is cookie, localStorage or sessionStorage.
According to one or more embodiments of the present disclosure, in the component loading apparatus, the random result determining unit generates a random result directed to the target component according to a random policy, including:
and generating a random number according to the set proportion and/or the weight of the current user, and determining a random result pointing to the target component according to the numerical value of the random number.
According to one or more embodiments of the present disclosure, in the component loading apparatus, the random loading unit is configured to:
if the random result is a first result, determining that the target component conceals the preset function;
and if the random result is a second result, determining that the target component loads the preset function.
According to one or more embodiments of the present disclosure, in the component loading device, the predetermined function is a function to be issued in the target component;
the device further comprises an effect evaluation unit, wherein the effect evaluation unit is used for carrying out classification statistics on the effect information of the target component according to the random result after loading the target component according to the determined result, and evaluating the function to be issued according to the classification statistics result so as to determine whether to issue or not.
The foregoing description is only of the preferred embodiments of the disclosed embodiments and is presented for purposes of illustration of the principles of the technology being utilized. It will be appreciated by those skilled in the art that the scope of the disclosure in the embodiments of the disclosure is not limited to the specific combination of the above technical features, but also encompasses other technical features formed by any combination of the above technical features or their equivalents without departing from the spirit of the disclosure. Such as the technical solution formed by mutually replacing the above-mentioned features and the technical features with similar functions (but not limited to) disclosed in the embodiments of the present disclosure.

Claims (10)

1. A component loading method, comprising:
determining whether a random result pointing to a target component exists, if not, generating the random result pointing to the target component according to a random strategy and storing the random result;
determining whether to load/hide a predetermined function of the target component according to the random result, and loading the target component according to the determined result; and the random result is stored in a global variable of the browsing client or a local storage of the browsing client, and for each storage mode, the same random result is adopted to load the target component in a corresponding life cycle.
2. The method of claim 1, wherein the determining whether there is a random result directed to the target component, and if not, generating a random result directed to the target component according to a random policy and saving comprises:
and determining whether a random result pointing to the target component exists in the global variable of the browsing client, if not, generating the random result pointing to the target component according to a random strategy, and setting the random result as the global variable of the browsing client.
3. The method of claim 1, wherein the determining whether there is a random result directed to the target component, and if not, generating a random result directed to the target component according to a random policy and saving comprises:
and determining whether a random result pointing to the target component exists in the local storage of the browsing client, if not, generating the random result pointing to the target component according to a random strategy, and storing the random result in the local storage of the browsing client.
4. A method according to claim 3, wherein the local store is Cookie, localStorage or sessionStorage.
5. The method of claim 1, wherein the generating a random result directed to the target component according to a random policy comprises:
and generating a random number according to the set proportion and/or the weight of the current user, and determining a random result pointing to the target component according to the numerical value of the random number.
6. The method of claim 1, wherein said determining whether to load/hide the predetermined function of the target component based on the random result comprises:
if the random result is a first result, determining that the target component conceals the preset function;
and if the random result is a second result, determining that the target component loads the preset function.
7. The method of claim 6, wherein the predetermined function is a function to be issued in the target component; the method further comprises the steps of: and after loading the target component according to the determined result, classifying and counting the effect information of the target component according to the random result, and evaluating the function to be issued according to the classifying and counting result to determine whether to issue or not.
8. A component loading apparatus, comprising:
the random result determining unit is used for determining whether a random result pointing to the target assembly exists or not, and if the random result does not exist, generating the random result pointing to the target assembly according to a random strategy and storing the random result;
the random loading unit is used for determining whether to load/hide the preset function of the target component according to the random result and loading the target component according to the determined result; and the random result is stored in a global variable of the browsing client or a local storage of the browsing client, and for each storage mode, the same random result is adopted to load the target component in a corresponding life cycle.
9. An electronic device, comprising:
one or more processors;
a memory for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-7.
10. A computer readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the method according to any of claims 1-7.
CN202010081720.0A 2020-02-06 2020-02-06 Component loading method and device, electronic equipment and storage medium Active CN111290799B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010081720.0A CN111290799B (en) 2020-02-06 2020-02-06 Component loading method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010081720.0A CN111290799B (en) 2020-02-06 2020-02-06 Component loading method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111290799A CN111290799A (en) 2020-06-16
CN111290799B true CN111290799B (en) 2023-09-19

Family

ID=71025518

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010081720.0A Active CN111290799B (en) 2020-02-06 2020-02-06 Component loading method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111290799B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113110887B (en) * 2021-03-31 2023-07-21 联想(北京)有限公司 Information processing method, device, electronic equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1505497A1 (en) * 2003-08-06 2005-02-09 Alcatel A method, a computer software product, and a telecommunication device for dynamically and automatically loading software components
CN105005532A (en) * 2015-08-05 2015-10-28 广东欧珀移动通信有限公司 System for automatically testing stability of application program interface and method
CN107766084A (en) * 2016-08-17 2018-03-06 美商安迈科技股份有限公司 Bootload and installation method and its computing system
CN108133125A (en) * 2018-01-17 2018-06-08 北京网信云服信息科技有限公司 The access method and system of a kind of application program
CN109165055A (en) * 2018-08-30 2019-01-08 百度在线网络技术(北京)有限公司 A kind of component loading method, device, computer equipment and storage medium
CN109240756A (en) * 2018-07-06 2019-01-18 沈文策 A kind of method and device of dynamically load JavaScript module
CN109766228A (en) * 2017-11-09 2019-05-17 北京京东尚科信息技术有限公司 Verification method and device on a kind of line based on interface
CN110634049A (en) * 2019-09-05 2019-12-31 北京无限光场科技有限公司 Page display content processing method and device, electronic equipment and readable medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090012528A (en) * 2007-07-30 2009-02-04 삼성전자주식회사 Method and apparatus for autonomous online test of random number generator
US20100325615A1 (en) * 2009-06-23 2010-12-23 Myspace Inc. Method and system for capturing web-page information through web-browser plugin
EP3125110A4 (en) * 2014-04-16 2017-04-19 Huawei Technologies Co., Ltd. Software upgrade method and terminal

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1505497A1 (en) * 2003-08-06 2005-02-09 Alcatel A method, a computer software product, and a telecommunication device for dynamically and automatically loading software components
CN105005532A (en) * 2015-08-05 2015-10-28 广东欧珀移动通信有限公司 System for automatically testing stability of application program interface and method
CN107766084A (en) * 2016-08-17 2018-03-06 美商安迈科技股份有限公司 Bootload and installation method and its computing system
CN109766228A (en) * 2017-11-09 2019-05-17 北京京东尚科信息技术有限公司 Verification method and device on a kind of line based on interface
CN108133125A (en) * 2018-01-17 2018-06-08 北京网信云服信息科技有限公司 The access method and system of a kind of application program
CN109240756A (en) * 2018-07-06 2019-01-18 沈文策 A kind of method and device of dynamically load JavaScript module
CN109165055A (en) * 2018-08-30 2019-01-08 百度在线网络技术(北京)有限公司 A kind of component loading method, device, computer equipment and storage medium
CN110634049A (en) * 2019-09-05 2019-12-31 北京无限光场科技有限公司 Page display content processing method and device, electronic equipment and readable medium

Also Published As

Publication number Publication date
CN111290799A (en) 2020-06-16

Similar Documents

Publication Publication Date Title
CN110489101B (en) Interface simulation method, system, medium and electronic equipment
US20220075932A1 (en) Method and apparatus for inserting information into online document
CN106888236B (en) Session management method and session management device
CN110059273B (en) Method for displaying rich media on mobile terminal and mobile terminal
CN111488185B (en) Page data processing method, device, electronic equipment and readable medium
CN110389809B (en) Method and apparatus for displaying information
CN112604289B (en) Game map generation method, device, equipment and storage medium
CN111596971B (en) Application cleaning method and device, storage medium and electronic equipment
CN110889062A (en) Page loading method and device, terminal and computer readable storage medium
CN111459364A (en) Icon updating method and device and electronic equipment
CN113253885A (en) Target content display method, device, equipment, readable storage medium and product
CN111290799B (en) Component loading method and device, electronic equipment and storage medium
CN111597009B (en) Application program display method and device and terminal equipment
CN111159038B (en) Method for simulating CPU load and electronic equipment
CN110147283B (en) Display content switching display method, device, equipment and medium
CN111273967A (en) Remote hook setting method and device suitable for Android system and electronic equipment
CN111158824A (en) Interface display method, device, equipment and medium
CN113709573B (en) Method, device, equipment and storage medium for configuring video special effects
CN113010064B (en) Information prompting method and device and electronic equipment
CN111382025A (en) Method and device for judging foreground and background states of application program and electronic equipment
CN112199187B (en) Content display method, device, electronic equipment and computer readable storage medium
CN113268300B (en) Information display method and device
CN111210271B (en) Method, device, electronic equipment and storage medium for identifying form cheating
CN113177174B (en) Feature construction method, content display method and related device
CN117435830A (en) Page preloading method, device, storage medium and program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant