CN111290799A - 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
CN111290799A
CN111290799A CN202010081720.0A CN202010081720A CN111290799A CN 111290799 A CN111290799 A CN 111290799A CN 202010081720 A CN202010081720 A CN 202010081720A CN 111290799 A CN111290799 A CN 111290799A
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.)
Granted
Application number
CN202010081720.0A
Other languages
Chinese (zh)
Other versions
CN111290799B (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

Images

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, an electronic device and a storage medium, wherein the method is used for browsing a client to load a target component at least once, and executing the following operations according to an indication code each time: determining whether a random result pointing to the target component exists or not, if not, generating a random result pointing to the target component according to a random strategy and storing the random result; and 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. The technical scheme of the embodiment can load the same component by adopting consistent random results 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 and device, electronic equipment and a storage medium.
Background
Before the application is released stably, the application is generally put on the market in an experimental distribution mode, and whether the specific function improvement is positive or negative is fed back according to experimental data to serve as a decision basis. For example, controlling certain content to be open to 20% of the random users, making the hit clients visible.
In order to make experimental data more objective and to control experimental split ratio more easily, a random strategy is usually adopted to open new functions or improve functions to the target users.
However, the random strategy can make the hit users more even and objective, but may also cause some problems, for example, if the function is used in many places of a page or a site, the user may hit the function suddenly and not hit the function.
Disclosure of Invention
In view of this, the embodiments of the present disclosure provide a component loading method and apparatus, an electronic device, and a storage medium, so as to maintain consistency of component functions.
Additional features and advantages of the disclosed embodiments will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosed embodiments.
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 a random result pointing to the target component according to a random strategy and storing the random result;
and 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.
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 component exists or not, and if not, generating and storing the random result pointing to the target component according to a random strategy;
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;
when executed by the one or more processors, cause the one or more processors to implement a method as claimed in any one of the first aspects.
In a fourth aspect, the disclosed embodiments also provide a computer-readable storage medium on which a computer program is stored, which when executed by a processor implements the method according to any one of the first aspect.
The embodiment of the disclosure determines whether a random result pointing to the target component exists, generates and stores the random result pointing to the target component according to a random strategy if the random result does not exist, determines whether to load/hide the predetermined function of the target component according to the random result, and loads the target component according to the determined result, so that the same component can be loaded by adopting a consistent random result within a certain range, and the functions of the components are kept consistent.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings needed to be used in the description of the embodiments of the present disclosure will be briefly described below, and it is obvious that the drawings in the following description are only a part of the embodiments of the present disclosure, and for those skilled in the art, other drawings can be obtained according to the contents of the embodiments of the present disclosure and the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a component loading method according to an embodiment of the present disclosure;
FIG. 2 is a schematic flow chart diagram illustrating another component loading method according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a component loading apparatus provided in an embodiment of the present disclosure;
FIG. 4 is a schematic structural diagram of another component loading apparatus provided in the embodiments of the present disclosure;
FIG. 5 illustrates a schematic 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, technical solutions adopted and technical effects achieved by the embodiments of the present disclosure clearer, 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 obvious that the described embodiments are only some embodiments, but not all embodiments, of the embodiments of the present disclosure. All other embodiments, which can be obtained by a person skilled in the art without making creative efforts based on the embodiments of the present disclosure, belong to the protection scope of the embodiments of the present disclosure.
It should be noted that the terms "system" and "network" are often used interchangeably in the embodiments of the present disclosure. Reference to "and/or" in embodiments of the present disclosure is meant to include any and all combinations of one or more of the associated listed items. The terms "first", "second", and the like in the description and claims of the present disclosure and in the drawings are used for distinguishing between different objects and not for limiting a particular order.
It should also be noted that, in the embodiments of the present disclosure, each of the following embodiments may be executed alone, or may be executed in combination with each other, and the embodiments of the present disclosure are not limited specifically.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
The technical solutions of the embodiments of the present disclosure are further described by the following detailed description in conjunction with the accompanying drawings.
Fig. 1 shows a schematic flowchart of a component loading method provided in an embodiment of the present disclosure, where the embodiment is applicable to a case of loading a component according to a random policy, and the method may be executed by a component loading apparatus in an electronic device, as shown in fig. 1, when the component loading method described in this embodiment is used for browsing a client to load a target component at least once, the following operations are executed each time according to an indication code:
in step S110, it is determined whether there is a random result pointing to the target component, and if not, a random result pointing to the target component is generated according to a random policy and stored.
The random result is obtained in relation to a preset random result storage mode, and the effect of the technical scheme of the embodiment of the disclosure is different due to different storage modes and different data life cycles.
For example, the random result may be stored in a global variable of the browsing client, whose lifetime is: starting from the first generation or storage of the random result, and ending when the browsing client is closed. During this period, the target component is loaded with the same random result.
For another example, the random result may be stored in a cookie of the current session of the browsing client, and the lifetime of the random result is limited to the duration of the current session.
As another example, a random result may be stored in sessionStorage, with the same random result being used to load the target component before the page is closed.
For another example, the random result may be stored in LocalStorage, and is permanently valid for the browsing client, and the user always loads the target component with the same random result when loading the target component using the browsing client.
Based on the above different effects, the present step can be achieved by various schemes, including but not limited to the following schemes:
and the first scheme is that whether the global variable of the browsing client has a random result pointing to the target component or not is determined, and if not, the random result pointing to the target component is generated according to a random strategy and is set as the global variable of the browsing client.
And determining whether a random result pointing to the target component exists in a local storage of the browsing client side, 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 side, wherein the local storage is cookie, Localstorage or sessionStorage.
In this step, the specific method for generating the random result directed to the target component according to the random policy differs according to different application scenarios, and the random policy may consider various factors, such as a user factor, a user weight, and a preset proportion (for example, the predetermined function is controlled to be open to 20% of random users). 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 hides the predetermined function; and if the random result is a second result, determining that the target component loads the predetermined function.
In this embodiment, by determining whether there is a random result pointing to the target component, if not, generating and storing a random result pointing to the target component according to a random policy, 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, the same component can be loaded with a consistent random result within a certain range, so that the functions of the components are kept consistent.
Fig. 2 shows a flowchart of another component loading method provided in the embodiment of the present disclosure, and in this embodiment, based on the foregoing embodiment, improvement and optimization are performed to open a trial on a part of users for a function to be issued in a component, so as to evaluate whether to issue the function to be issued according to effect information after the trial of the part of users.
As shown in fig. 2, the component loading method according to this embodiment includes:
in step S210, it is determined whether there is a random result pointing to the target component, and if not, a random result pointing to the target component is generated according to a random policy and stored.
For example, whether the global variable of the browsing client has a random result pointing to the target component is determined, and if not, the random result pointing to the target component is generated according to a random strategy and is 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 strategy and is stored in the local storage of the browsing client, wherein the local storage is a Cookie, a LocalStorage or a sessionstorege.
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 policy is: and opening the function to be issued in the target component to 20 percent of users. 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 the function.
Generally speaking, if the scoring statistics shows that the effect of the hit user group of the function to be published is obviously better than that of the non-hit user group, it can be determined that the function to be published in the target component is published formally. After formal release, the system is opened to all users.
On the basis of the previous embodiment, a new technical scheme is disclosed in this embodiment, for example, the function to be issued in the component is tried out on a part of users, whether the function to be issued is issued can be evaluated according to effect information of the part of users after trial, a trial range of the function to be issued can be determined by using a consistent random result within a certain range, so that the functions of the component are kept consistent, sample independence can be kept, and an evaluation result can be more objective.
As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a component loading apparatus, and fig. 3 illustrates a schematic structural diagram of a component loading apparatus provided in this embodiment, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 1 and fig. 2, and the apparatus may be specifically applied to various electronic devices. As shown in fig. 3, the component loading apparatus according to 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 a target component, and if not, generate and store a 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 variables of the browsing client, and if not, generate a random result pointing to the target component according to a random policy and set the random result as the global variables of the browsing client.
In an embodiment, the random result determining unit 310 is configured to determine whether a random result pointing to the target component exists in a local storage of the browsing client, and if not, generate a 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 a cookie, a LocalStorage, or a sessionstorege.
In an embodiment, the random result determining unit 310 is configured to generate a random number according to a set ratio 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 hides the predetermined function;
and if the random result is a second result, determining that the target component loads the predetermined 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 corresponding functional modules and beneficial effects of the execution method.
Fig. 4 shows a schematic structural diagram of another component loading apparatus provided in the embodiment of the present disclosure, and as shown in fig. 4, the component loading apparatus described in this 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 a target component, and if not, generate and store a 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 predetermined function. And loading the target component according to the determined result.
And the preset function is a function to be issued in the target component.
The effect evaluation unit 430 is configured to, after loading the target component according to the determined result, perform classification statistics on the effect information of the target component according to the random result, and evaluate the function to be issued according to the classification statistical result to determine whether to issue the function.
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 variables of the browsing client, and if not, generate a random result pointing to the target component according to a random policy and set the random result as the global variables of the browsing client.
In an embodiment, the random result determining unit 410 is configured to determine whether a random result pointing to the target component exists in a local storage of the browsing client, and if not, generate a 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 a cookie, a LocalStorage, or a sessionstorege.
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 corresponding functional modules and beneficial effects of the execution method.
Referring now to FIG. 5, a block 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., car navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 5, electronic device 500 may include a processing means (e.g., central processing unit, graphics processor, etc.) 501 that may perform various appropriate actions and processes in accordance with 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 necessary 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 through a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
Generally, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 507 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, and the like; storage devices 508 including, for example, magnetic tape, hard disk, etc.; and a communication device 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 illustrates an electronic device 500 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the 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 illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 509, or installed from the storage means 508, or installed from the ROM 502. The computer program performs the above-described functions defined in the methods of the embodiments of the present disclosure when 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. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination 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, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. 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, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled 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 a random result pointing to the target component according to a random strategy and storing the random result;
and 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.
Computer program code for carrying out operations for embodiments of the present disclosure may be written in any combination of 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 type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart 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 described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a unit does not in some cases constitute a limitation of the unit itself, for example, the first retrieving unit may also be described as a "unit for retrieving 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 storing the random result pointing to the target component according to a random policy includes: and determining whether the global variable of the browsing client has a random result pointing to the target component, 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 storing 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 a 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 a cookie, a Localstorage or a sessionStorage.
According to one or more embodiments of the present disclosure, in the component loading method, the generating a random result pointing to the target component according to a random policy includes:
and generating a random number according to a 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 hides the predetermined function;
and if the random result is a second result, determining that the target component loads the predetermined 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: after the target assembly is loaded according to the determined result, classifying and counting the effect information of the target assembly according to the random result, and evaluating the function to be issued according to the classifying and counting result to determine whether to issue.
According to one or more embodiments of the present disclosure, in the component loading apparatus, the random result determination unit is configured to: and determining whether the global variable of the browsing client has a random result pointing to the target component, 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 determination 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 a 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.
According to one or more embodiments of the present disclosure, in the component loading apparatus, the local storage is a cookie, a LocalStorage, or a sessionstorege.
According to one or more embodiments of the present disclosure, in the component loading apparatus, the generating, by the random result determining unit, a random result directed to the target component according to a random policy includes:
and generating a random number according to a 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 hides the predetermined function;
and if the random result is a second result, determining that the target component loads the predetermined function.
According to one or more embodiments of the present disclosure, in the component loading apparatus, the predetermined function is a function to be issued in the target component;
the device also comprises an effect evaluation unit which is used for carrying out classification statistics on the effect information of the target assembly according to the random result after the target assembly is loaded according to the determined result, and evaluating the function to be issued according to the classification statistical result so as to determine whether to issue.
The foregoing description is only a preferred embodiment of the disclosed embodiments and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure in the embodiments of the present disclosure is not limited to the particular combination of the above-described features, but also encompasses other embodiments in which any combination of the above-described features or their equivalents is possible without departing from the scope of the present disclosure. For example, the above features and (but not limited to) the features with similar functions disclosed in the embodiments of the present disclosure are mutually replaced to form the technical solution.

Claims (10)

1. A method of component loading, comprising:
determining whether a random result pointing to a target component exists, if not, generating a random result pointing to the target component according to a random strategy and storing the random result;
and 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.
2. The method of claim 1, wherein the determining whether there is a random result directed to the target component, and if not, generating and saving the random result directed to the target component according to a random policy comprises:
and determining whether the global variable of the browsing client has a random result pointing to the target component, 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 and saving the random result directed to the target component according to a random policy comprises:
and determining whether a random result pointing to the target component exists in a local storage of the browsing client side, if not, generating a 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 side.
4. The method of claim 3, wherein the local store is a Cookie, a LocalStorage, or a sessionstorege.
5. The method of claim 1, wherein generating the random result directed to the target component according to a random policy comprises:
and generating a random number according to a 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 the determining whether to load/hide the predetermined functionality of the target component based on the random result comprises:
if the random result is a first result, determining that the target component hides the predetermined function;
and if the random result is a second result, determining that the target component loads the predetermined function.
7. The method of claim 6, wherein the predetermined function is a function to be published in the target component; the method further comprises the following steps: after the target assembly is loaded according to the determined result, classifying and counting the effect information of the target assembly according to the random result, and evaluating the function to be issued according to the classifying and counting result to determine whether to issue.
8. A component loading apparatus, comprising:
the random result determining unit is used for determining whether a random result pointing to the target component exists or not, and if not, generating and storing the random result pointing to the target component according to a random strategy;
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.
9. An electronic device, comprising:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 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 true CN111290799A (en) 2020-06-16
CN111290799B 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)

Cited By (1)

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

Citations (11)

* 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
US20090037787A1 (en) * 2007-07-30 2009-02-05 Ihor Vasyltsov Apparatus and methods for autonomous testing of random number generators
US20100325615A1 (en) * 2009-06-23 2010-12-23 Myspace Inc. Method and system for capturing web-page information through web-browser plugin
CN105005532A (en) * 2015-08-05 2015-10-28 广东欧珀移动通信有限公司 System for automatically testing stability of application program interface and method
US20170034309A1 (en) * 2014-04-16 2017-02-02 Huawei Technologies Co., Ltd. Software upgrade method and terminal
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

Patent Citations (11)

* 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
US20090037787A1 (en) * 2007-07-30 2009-02-05 Ihor Vasyltsov Apparatus and methods for autonomous testing of random number generators
US20100325615A1 (en) * 2009-06-23 2010-12-23 Myspace Inc. Method and system for capturing web-page information through web-browser plugin
US20170034309A1 (en) * 2014-04-16 2017-02-02 Huawei Technologies Co., Ltd. Software upgrade method and terminal
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

Cited By (2)

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

Also Published As

Publication number Publication date
CN111290799B (en) 2023-09-19

Similar Documents

Publication Publication Date Title
CN110489101B (en) Interface simulation method, system, medium and electronic equipment
CN110825456B (en) Loading time calculation method, loading time calculation device, computer equipment and storage medium
CN106888236B (en) Session management method and session management device
CN109726076B (en) Applet life cycle management method and system
US11431182B2 (en) Resource statistics collection method and apparatus and terminal
CN110389809B (en) Method and apparatus for displaying information
CN109726390B (en) Document processing method, device, electronic equipment and storage medium
CN111596971B (en) Application cleaning method and device, storage medium and electronic equipment
CN110765354A (en) Information pushing method and device, electronic equipment and storage medium
CN112379982B (en) Task processing method, device, electronic equipment and computer readable storage medium
CN110781373A (en) List updating method and device, readable medium and electronic equipment
CN113301157A (en) Cloud mobile phone group control method, equipment and storage medium based on android system
WO2024109786A1 (en) Instant messaging session information processing method and apparatus, and electronic device
CN114528517A (en) View processing method and device, electronic equipment and computer readable medium
CN109634702B (en) Information prompting method and device, electronic equipment and readable medium
CN114386830A (en) Information processing method, device, terminal and storage medium
CN111290799B (en) Component loading method and device, electronic equipment and storage medium
CN113343138A (en) Rollback interception method and device, intelligent terminal and storage medium
CN116388112B (en) Abnormal supply end power-off method, device, electronic equipment and computer readable medium
CN110147283B (en) Display content switching display method, device, equipment and medium
CN110162350B (en) Notification bar information display method, notification bar information display device, server and storage medium
CN116319932A (en) Training method, device, equipment and storage medium of content push model
CN111158824A (en) Interface display method, device, equipment and medium
CN111273967A (en) Remote hook setting method and device suitable for Android system and electronic equipment
CN111382057B (en) Test case generation method, test method and device, server and storage medium

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