CN117873592A - Application program optimization method and device, electronic equipment and storage medium - Google Patents

Application program optimization method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN117873592A
CN117873592A CN202410011855.8A CN202410011855A CN117873592A CN 117873592 A CN117873592 A CN 117873592A CN 202410011855 A CN202410011855 A CN 202410011855A CN 117873592 A CN117873592 A CN 117873592A
Authority
CN
China
Prior art keywords
application program
client
application
starting
judging
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.)
Pending
Application number
CN202410011855.8A
Other languages
Chinese (zh)
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.)
Guangzhou Huya Technology Co Ltd
Original Assignee
Guangzhou Huya 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 Guangzhou Huya Technology Co Ltd filed Critical Guangzhou Huya Technology Co Ltd
Priority to CN202410011855.8A priority Critical patent/CN117873592A/en
Publication of CN117873592A publication Critical patent/CN117873592A/en
Pending legal-status Critical Current

Links

Abstract

The embodiment of the invention provides an application program optimization method, an application program optimization device, electronic equipment and a storage medium, and relates to the technical field of software optimization. And when the interactive instruction of starting the application program, which is input by a user, is acquired, the equipment information of the client is acquired, the client is used for running the application program, whether the client is a first type client is judged according to the judging strategy and the equipment information, if so, the main thread is called to run the task related to the starting of the application program so as to display the application program, and at least one sub-thread is called to run the task unrelated to the starting of the application program. Therefore, the first type client can start the application program more quickly, the application program is reduced from being blocked, and the experience of using the application program by a user is improved.

Description

Application program optimization method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of software optimization technologies, and in particular, to an application program optimization method, an application program optimization device, an electronic device, and a storage medium.
Background
Nowadays, mobile internet users grow slowly, mobile internet companies are experiencing thinking transition from served incremental users to served stock users, and low-end machines are important components in the stock users, however, the low-end machines run increasingly complex application programs nowadays, which can cause slow and stuck running of the application programs by the low-end machines, and influence user experience.
Disclosure of Invention
In view of the above, an object of the embodiments of the present invention is to provide an application optimization method, an apparatus, an electronic device and a storage medium, so as to at least partially improve the above-mentioned problems.
In order to achieve the above object, the technical scheme adopted by the embodiment of the invention is as follows:
in a first aspect, an embodiment of the present invention provides an application optimization method, where the method includes:
when an interaction instruction for starting an application program, which is input by a user, is acquired, acquiring equipment information of a client; the client is used for running the application program;
judging whether the client is a first type client or not according to a judging strategy and the equipment information; the first type client characterizes clients which are required to deploy the tasks related to the starting of the application program and the tasks not related to the starting of the application program on different threads respectively;
if yes, calling a main thread to run a task related to the starting of the application program so as to display the application program;
at least one sub-thread is invoked to run tasks that are not related to the application launch.
Optionally, the client is in communication connection with the server, and the determining, according to the determining policy and the device information, whether the client is a first type of client includes:
inquiring whether the judging strategy exists in the application program local area or not;
if the judging strategy exists in the application program locally, the judging strategy is obtained from the application program locally, and whether the client is a first type client is judged according to the judging strategy and the equipment information;
and if the application program does not have the judging strategy locally, acquiring the judging strategy from the server, and judging whether the client is a first type client according to the judging strategy and the equipment information.
Optionally, after the displaying the application program, the method further includes:
closing the flashing advertisement of the application program;
and/or disabling a loop play function of a lottie framework of the application;
and/or setting the webp animation of the application program to display the first frame only;
and/or lazy loading of TAB pages outside the first page of the application; the lazy load characterization loads the TAB page as a blank page;
and/or closing a preview function of a live room of the application.
Optionally, after the displaying the application program, the method further includes:
receiving an instruction for entering a live broadcasting room, wherein the instruction for entering the live broadcasting room comprises a unique identifier of the live broadcasting room;
displaying a corresponding live broadcasting room page according to the unique identifier of the live broadcasting room;
judging whether the client is a first type client or not;
if yes, optimizing the function of the live broadcasting room.
Optionally, the optimizing the function of the live room includes:
lazy loading is performed on TAB pages within the living room;
and/or removing the historical public screen information of the live broadcasting room, and reducing the public screen refreshing speed;
and/or closing the AI barrage function of the live broadcasting room and the real-time caption function of the live broadcasting room;
and/or disabling the Unity animation of the living room using MP4 animation when the living room displays a luxury gift.
Optionally, the application program is installed on a plurality of the clients, and the method further includes:
acquiring equipment information of each client;
sequencing the equipment information according to a preset rule to obtain sequencing information;
and taking the client sides with preset proportions as the first type client sides according to the ordering information to obtain the judging strategy.
In a second aspect, an embodiment of the present invention provides an application optimization apparatus, including:
the device information acquisition unit is used for acquiring the device information of the client when acquiring the interactive instruction of starting the application program input by the user; the client is used for running the application program;
the client type judging unit is used for judging whether the client is a first type client or not according to a judging strategy and the equipment information; the first type client characterizes clients which are required to deploy the tasks related to the starting of the application program and the tasks not related to the starting of the application program on different threads respectively;
a main thread calling unit, configured to call a main thread to run a task related to the application program start if the main thread is the main thread, so as to display the application program;
and the sub-thread calling unit is used for calling at least one sub-thread to run tasks which are not related to the starting of the application program.
Optionally, the apparatus further comprises:
the home page optimizing unit is used for closing the screen flashing advertisement of the application program; and/or disabling a loop play function of a lottie framework of the application; and/or setting the webp animation of the application program to display the first frame only; and/or lazy loading of TAB pages outside the first page of the application; the lazy load characterization loads the TAB page as a blank page; and/or closing a preview function of a live room of the application.
In a third aspect, an embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the method of any one of the above when executing the program.
In a fourth aspect, embodiments of the present invention provide a storage medium having stored thereon a computer program which, when executed by a processor, implements a method as described in any of the preceding claims.
The embodiment of the invention provides an application program optimization method, an application program optimization device, electronic equipment and a storage medium, and relates to the technical field of software optimization. When an interactive instruction of starting an application program input by a user is acquired, equipment information of a client is acquired, the client is used for running the application program, whether the client is a first type client is judged according to a judging strategy and the equipment information, if yes, a main thread is called to run a task related to the starting of the application program so as to display the application program, at least one sub-thread is called to run a task unrelated to the starting of the application program, configuration optimization is further carried out on an application program front page, and related optimization between live broadcasting is further carried out. Therefore, the first type client can start the application program more quickly, the application program is reduced from being blocked, and the experience of using the application program by a user is improved.
In order to make the above objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic block diagram of an electronic device according to an embodiment of the present invention;
FIG. 2 is a flowchart of an application optimization method according to an embodiment of the present invention;
FIG. 3 is another flow chart of an application optimization method according to an embodiment of the present invention;
FIG. 4 is a schematic flow chart of another method for optimizing an application program according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of an application optimizing device according to an embodiment of the present invention;
fig. 6 is a comparison chart of data before and after application program optimization according to an embodiment of the present invention.
Icon: 100-an electronic device; 101-memory; 102-a communication interface; 103-a processor; 104-a bus; 300-application optimizing means; 310-a device information acquisition unit; 320-a client type judgment unit; 330-a main thread call unit; 340-child thread call unit.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. The components of the embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the invention, as presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures. Meanwhile, in the description of the present invention, the terms "first", "second", and the like are used only to distinguish the description, and are not to be construed as indicating or implying relative importance.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Nowadays, mobile internet users grow slowly, mobile internet companies are experiencing thinking transition from good service incremental users to good service stock users, and low-end machines are important components in the stock users, however, the functions of the application programs (APP) nowadays are more and more complex, and when the low-end machines run the application programs nowadays, the low-end machines run slowly and are blocked due to insufficient performances, so that user experience is affected.
Based on the above situation, the embodiment of the invention provides an application program optimizing method, an apparatus, an electronic device and a storage medium, wherein when an interactive instruction for starting an application program input by a user is acquired, equipment information of a client is acquired, the client is used for running the application program, whether the client is a first type of client is judged according to a judging strategy and the equipment information, if yes, a main thread is called to run a task related to the starting of the application program so as to display the application program, at least one sub-thread is called to run a task not related to the starting of the application program, and further configuration optimization is carried out on a front page of the application program and related optimization between live broadcasting is carried out. Therefore, the first type client can start the application program more quickly, the blocking of the running application program is reduced, and the experience of using the application program by a user is improved.
In order to implement the flow steps and functions of the examples of the present invention, please refer to fig. 1, and fig. 1 is a schematic block diagram of an electronic device according to an embodiment of the present invention. The electronic device 100 comprises a memory 101 and a processor 103, the memory 101 and the processor 103 being electrically connected to each other, either directly or indirectly, for enabling transmission or interaction of data. For example, the components may be electrically coupled to each other via one or more communication buses 104 or signal lines. The memory 101 may be used to store software programs and modules that the processor 103 oversubscribes within the memory 101, thereby performing various functional applications and data processing.
The electronic device 100 may be, but is not limited to, a personal computer (personal computer, PC), a server, a distributed deployment computer, or the like. It is understood that the electronic device 100 is not limited to a physical server, and may be a virtual machine on a physical server, a virtual machine built on a cloud platform, or a computer that can provide the same function as the server or the virtual machine. The operating system of the electronic device 100 may be, but is not limited to, a Windows system, a Linux system, etc.
The Memory 101 may be, but is not limited to, a random access Memory (Random Access Memory, RAM), a Read Only Memory (ROM), a programmable Read Only Memory (Programmable Read-Only Memory, PROM), an erasable Read Only Memory (Erasable Programmable Read-Only Memory, EPROM), an electrically erasable Read Only Memory (Electric Erasable Programmable Read-Only Memory, EEPROM), etc.
The communication connection between the electronic device 100 and the external device is achieved through at least one communication interface 102 (which may be wired or wireless).
The processor 103 may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of embodiments of the present invention may be performed by integrated logic circuitry in hardware in processor 103 or by instructions in software. The processor 103 may be a general-purpose processor including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Network Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
It is to be understood that the configuration shown in fig. 1 is merely illustrative, and that electronic device 100 may also include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1. The components shown in fig. 1 may be implemented in hardware, software, or a combination thereof.
In the following, for the application optimization method provided by the present invention, fig. 2 is a schematic flow chart of an application optimization method provided by an embodiment of the present invention, referring to fig. 2, an execution body of the method may be the electronic device 100 shown in fig. 1, and the method includes the following steps as shown in fig. 2:
step S210: and when the interactive instruction of starting the application program, which is input by the user, is acquired, acquiring the equipment information of the client. Wherein the client is used for running the application program.
Step S220: and judging whether the client is a first type client or not according to the judging strategy and the equipment information. If yes, go to step S230; if not, step S250 is performed.
The first type of client characterization needs to deploy the tasks related to the application program starting and the tasks unrelated to the application program starting on the clients of different threads respectively.
Step S230: the main thread is invoked to run a task associated with the application launch to display the application.
Step S240: at least one sub-thread is invoked to run tasks that are not related to application launch.
Step S250: all tasks of the mainline Cheng Yunhang application are invoked to display the application.
When the interactive instruction of starting the application program input by the user is acquired, the equipment information of the client side running the application program is acquired, wherein the equipment information can comprise CPU frequency, memory size, system version and the like. The device information may indicate the performance of the client.
According to the judging strategy and the device information, judging whether the client is a first type client, in this embodiment, taking an android mobile phone as an example, the first type client can be understood as a low-end machine, and the performance of the low-end machine is poor. The judgment policy is set according to the low-end machine, for example, the CPU frequency may be less than or equal to 2.0GHz, or the memory size may be less than or equal to 4GB, or the system version may be less than or equal to 4.0.
Preferably, after determining whether the client is a first type of client, the result is cached locally, so that the cached result is directly read when the client is subsequently determined.
When the client is a low-end machine, starting a multithread to execute a task related to starting an application program, calling a main thread to run the task related to starting the application program, for example, only loading a globally required software development kit (Software Development Kit, SDK) and an SDK required by an application program access page in the main thread, and calling a plurality of sub-threads by other SDKs to load, wherein after loading related contents in the sub-threads, the main thread is informed, so that the loading of other SDKs does not influence the starting flow of the application program, and the starting speed of the application program is improved.
When the client is not a low-end machine, and the application program is started, all SDKs are loaded in the main thread, and after all SDKs are loaded, the starting of the application program is completed.
According to the method, when an interactive instruction for starting the application program, which is input by a user, is acquired, equipment information of the client is acquired, whether the client is a first type client is judged according to a judging strategy and the equipment information, if yes, a main thread is called to run a task related to the starting of the application program so as to display the application program, and at least one sub thread is called to run a task unrelated to the starting of the application program. Therefore, the first type client can start the application program more quickly, the application program is reduced from being blocked, and the experience of using the application program by a user is improved.
In one possible implementation, in order to determine what device information is to be the low-end machine according to the actual situation, device information of all the clients running the application program may be collected, and the low-end machine may be determined according to a certain proportion. Referring to fig. 3, fig. 3 is another flow chart of an application program optimizing method provided by the embodiment of the present invention, where an application program is installed on a plurality of clients, and the method may further include the steps shown in fig. 3:
step S201: and acquiring the equipment information of each client.
Step S202: and sequencing the equipment information according to a preset rule to obtain sequencing information.
Step S203: and taking the client sides with preset proportions as the first type client sides according to the ordering information to obtain a judging strategy.
The application program is installed on a plurality of clients, when each client runs the application program, the device information of each client is obtained, and the obtained device information is ordered according to a certain mode.
Optionally, in all the device information, the device information of each client running the application program in the previous day is acquired, the CPU frequency is respectively ordered from small to large, the memory size is ordered from small to large, the system version is ordered from small to large, and a preset proportion of clients are taken as the first type of clients, so as to obtain the boundary point of the low-end machine and the high-end machine, for example, the first 3% of clients can be taken as the low-end machine, for example, the obtained boundary point is respectively the CPU frequency of 2.0GHz, the memory size of 4GB and the system version of 4.0, and the judgment policy of the low-end machine is that the CPU frequency is less than or equal to 2.0GHz, or the memory size is less than or equal to 4GB, or the mobile phone with the system version of less than or equal to 4.0 is the low-end machine.
In another possible implementation manner, the above ratio may be increased, and the judgment policy may be obtained by using a sum of conditions, for example, the first 5% may be obtained, for example, the obtained demarcation points are respectively a CPU frequency of 3.0GHz, a memory size of 6GB, and a system version of 5.0, and the obtained judgment policy of the low-end machine is that the mobile phone with the CPU frequency of 3.0GHz or less, the memory size of 6GB or less, and the system version of 5.0 or less is the low-end machine.
In a possible implementation manner, the above-mentioned determination policy may be updated at regular time, or may be preset when the client installs the application, referring to fig. 4, fig. 4 is a schematic flow diagram of another application optimizing method provided by an embodiment of the present invention, where the client may be communicatively connected to the server, and step S220 may include the steps as shown in fig. 4:
step S221: and inquiring whether the application program has a judging strategy locally, if so, executing the step S222, and if not, executing the step S223.
Step S222: the decision strategy is obtained locally from the application.
Step S223: and acquiring a judgment strategy from the server.
Step S224: and judging whether the client is a first type client or not.
When the application program is started, whether a judging strategy exists is firstly inquired locally from the application program, the judging strategy does not exist locally, and then the judging strategy is obtained from the server.
In one possible implementation manner, in order to display the application program more smoothly after the application program is started without consuming too high performance of the client, the application program optimization method may further include:
and closing the flashing advertisement of the application program.
And/or disable the loop play function of the lottie framework of the application.
And/or setting the webp animation of the application to display only the first frame.
And/or lazy loading of TAB pages outside the home page of the application; lazy load characterization loads TAB pages as blank pages.
And/or close the preview function of the application's live room.
The application program is a layer of page covered on the home page after being started, a large number of effects are included, the used components are more, the performance of the mobile phone is consumed very much, and the application program can be turned off to reduce the consumption of the performance of the mobile phone.
The lottie frame is an animation frame, can play the animation circularly, but always plays or continuously consumes the performance of the mobile phone, can disable the circulation play function of the lottie frame, and only plays the animation once so as to reduce the cost of the mobile phone.
The WebP animation is an animation in WebP format generated by packing a series of frames, and the autoplay of the WebP animation is set to be in a disabled state, so that only the first frame is forcedly displayed, and the performance consumption is reduced.
In the android system, a principle exists that when one page is loaded, two adjacent pages must be loaded simultaneously to finish loading, loading speed can be greatly influenced when contents of the two adjacent pages are loaded, and user experience can be greatly influenced when the content is loaded by a low-end machine, so that in order to meet rules of the android system, the page loading speed is improved, the two adjacent pages can be loaded into a blank page first, and the loading speed is improved.
The application program home page comprises a plurality of live broadcasting room list items, when the application program home page slides to a certain Item, the Item can start to play, and a preview function is realized, but the function uses the SDK of the whole live broadcasting room, and the preview function can be directly disabled, so that the program processing efficiency is improved.
In one possible implementation manner, the application program further needs to display the live broadcast room, so that the user does not generate a phenomenon of blocking or the like when watching the live broadcast, and the application program optimization method may further include:
and receiving an instruction for entering a live broadcasting room. Wherein the enter live room instruction includes a live room unique identification.
And displaying the corresponding live broadcasting room page according to the unique identification of the live broadcasting room.
And judging whether the client is a first type client or not.
If yes, optimizing the function of the live broadcasting room.
Whether the client is the first type client is judged here, and the cached judging result can be directly used to improve the program efficiency.
In one possible implementation, optimizing the functionality of the living room may include:
lazy loading of TAB pages within the living room.
And/or removing historical public screen messages from the live room and reducing the public screen refresh rate.
And/or closing an AI barrage function of the live broadcasting room and a real-time caption function of the live broadcasting room.
And/or disabling the Unity animation of the living room and using MP4 animation when the living room displays a luxury gift.
After the user enters the live broadcasting room, the application program performs a series of processing, and in order to enable the user to watch live broadcasting more smoothly, a series of optimization can be performed again, and lazy loading is performed on TAB pages in the live broadcasting room first, which is the same as the lazy loading description and is not repeated here.
Each time a historical public screen message is pulled, a large amount of data can be pulled, so that an application program is very time-consuming to process, and is blocked, the public screen message is quickly refreshed, and the pressure of processing capacity can be brought, so that the historical public screen message of a live broadcasting room is removed, the refreshing speed of the public screen is reduced, and the pressure of processing the data by a mobile phone is reduced.
The AI barrage function comprises shielding prevention, barrage effect and the like, the rendering pressure of the mobile phone is very high, the AI barrage function can be disabled to reduce the rendering pressure of the mobile phone, the real-time caption function has higher requirement on the processing capability of converting voice into characters, and the real-time caption function is disabled to reduce the requirement on the processing capability.
When the luxury gift is sent out from the living broadcasting room, the effect of the luxury gift is realized by the practical Unity animation, but the Unity animation can be diy, but the requirement on the performance of the mobile phone is very high, so that the low-end function can display the effect of the luxury gift, the Unity animation is forbidden, and the effect of the luxury gift is displayed by using the MP4 animation.
Optionally, the up-and-down sliding function of the live broadcasting room can be disabled, and the up-and-down sliding function can rapidly switch the live broadcasting room, but adjacent live broadcasting needs to be preloaded, so that the performance requirement is high, the burden is heavy for a low-end machine, and therefore the live broadcasting room can be disabled.
An exemplary description of an apparatus capable of performing the above-described exemplary flow steps is provided below. Specifically, fig. 5 is a schematic structural diagram of an application optimizing apparatus according to an embodiment of the present invention, referring to fig. 5, the application optimizing apparatus 300 includes: device information acquisition unit 310, client type determination unit 320, main thread call unit 330, and sub thread call unit 340:
a device information obtaining unit 310, configured to obtain device information of a client when obtaining an interaction instruction for starting an application program input by a user; the client is used for running the application program.
A client type determining unit 320, configured to determine whether the client is a first type client according to the determination policy and the device information; the first type of client characterization needs to deploy the tasks related to the application program starting and the tasks unrelated to the application program starting on the clients of different threads respectively.
The main thread calling unit 330 is configured to call the main thread to execute the task related to the application program start if yes, so as to display the application program.
A sub-thread calling unit 340, configured to call at least one sub-thread to run a task that is not related to the application launch.
Optionally, the application optimizing apparatus 300 may further include:
the home page optimizing unit is used for closing the screen flashing advertisement of the application program; and/or disabling the loop play function of the lottie framework of the application; and/or setting the webp animation of the application program to display only the first frame; and/or lazy loading of TAB pages outside the home page of the application; lazy load characterization loads TAB pages as blank pages; and/or close the preview function of the application's live room.
In practical cases, through the processing of the embodiment of the invention, the occupation of the CPU and the memory of the low-end machine is obviously reduced, the fluency of the low-end machine user is improved, and the retention of the low-end machine user is obviously achieved. The following day is preserved: 29.2% -31%, 6.2% improvement. The specific data is shown in fig. 6.
In summary, according to the application program optimizing method, device, electronic equipment and storage medium provided by the embodiments of the present invention, when an interactive instruction for starting an application program input by a user is obtained, device information of a client is obtained, the client is used for running the application program, whether the client is a first type of client is judged according to a judgment policy and the device information, if yes, a main thread is called to run a task related to the starting of the application program so as to display the application program, at least one sub-thread is called to run a task unrelated to the starting of the application program, and further configuration optimization is performed on a front page of the application program, and related optimization between live broadcasting is performed. Therefore, the first type client can start the application program more quickly, the application program is reduced from being blocked, the experience of using the application program by a user is improved, and the next-day retention rate of the user is improved.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other manners. The apparatus embodiments described above are merely illustrative, for example, of the flowcharts and block diagrams in the figures that illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. 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.
In addition, functional modules in the embodiments of the present invention may be integrated together to form a single part, or each module may exist alone, or two or more modules may be integrated to form a single part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored on a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution in the form of a software product stored in a computer-readable storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above is only a preferred embodiment of the present invention, and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.

Claims (10)

1. A method of application optimization, the method comprising:
when an interaction instruction for starting an application program, which is input by a user, is acquired, acquiring equipment information of a client; the client is used for running the application program;
judging whether the client is a first type client or not according to a judging strategy and the equipment information; the first type client characterizes clients which are required to deploy the tasks related to the starting of the application program and the tasks not related to the starting of the application program on different threads respectively;
if yes, calling a main thread to run a task related to the starting of the application program so as to display the application program;
at least one sub-thread is invoked to run tasks that are not related to the application launch.
2. The method of claim 1, wherein the client is communicatively coupled to a server, and wherein determining whether the client is a first type of client based on a determination policy and the device information comprises:
inquiring whether the judging strategy exists in the application program local area or not;
if the judging strategy exists in the application program locally, the judging strategy is obtained from the application program locally, and whether the client is a first type client is judged according to the judging strategy and the equipment information;
and if the application program does not have the judging strategy locally, acquiring the judging strategy from the server, and judging whether the client is a first type client according to the judging strategy and the equipment information.
3. The method of claim 1, further comprising, after said displaying said application:
closing the flashing advertisement of the application program;
and/or disabling a loop play function of a lottie framework of the application;
and/or setting the webp animation of the application program to display the first frame only;
and/or lazy loading of TAB pages outside the first page of the application; the lazy load characterization loads the TAB page as a blank page;
and/or closing a preview function of a live room of the application.
4. The method of claim 1, further comprising, after said displaying said application:
receiving an instruction for entering a live broadcasting room, wherein the instruction for entering the live broadcasting room comprises a unique identifier of the live broadcasting room;
displaying a corresponding live broadcasting room page according to the unique identifier of the live broadcasting room;
judging whether the client is a first type client or not;
if yes, optimizing the function of the live broadcasting room.
5. The method of claim 4, wherein the optimizing the function of the living room comprises:
lazy loading is performed on TAB pages within the living room;
and/or removing the historical public screen information of the live broadcasting room, and reducing the public screen refreshing speed;
and/or closing the AI barrage function of the live broadcasting room and the real-time caption function of the live broadcasting room;
and/or disabling the Unity animation of the living room using MP4 animation when the living room displays a luxury gift.
6. The method of claim 1, wherein the application is installed on a plurality of the clients, the method further comprising:
acquiring equipment information of each client;
sequencing the equipment information according to a preset rule to obtain sequencing information;
and taking the client sides with preset proportions as the first type client sides according to the ordering information to obtain the judging strategy.
7. An application optimization device, the device comprising:
the device information acquisition unit is used for acquiring the device information of the client when acquiring the interactive instruction of starting the application program input by the user; the client is used for running the application program;
the client type judging unit is used for judging whether the client is a first type client or not according to a judging strategy and the equipment information; the first type client characterizes clients which are required to deploy the tasks related to the starting of the application program and the tasks not related to the starting of the application program on different threads respectively;
a main thread calling unit, configured to call a main thread to run a task related to the application program start if the main thread is the main thread, so as to display the application program;
and the sub-thread calling unit is used for calling at least one sub-thread to run tasks which are not related to the starting of the application program.
8. The apparatus of claim 7, wherein the apparatus further comprises:
the home page optimizing unit is used for closing the screen flashing advertisement of the application program; and/or disabling a loop play function of a lottie framework of the application; and/or setting the webp animation of the application program to display the first frame only; and/or lazy loading of TAB pages outside the first page of the application; the lazy load characterization loads the TAB page as a blank page; and/or closing a preview function of a live room of the application.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any one of claims 1 to 6 when executing the program.
10. A storage medium having a computer program stored thereon, characterized by: the computer program, when executed by a processor, implements the method of any of claims 1 to 6.
CN202410011855.8A 2024-01-02 2024-01-02 Application program optimization method and device, electronic equipment and storage medium Pending CN117873592A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410011855.8A CN117873592A (en) 2024-01-02 2024-01-02 Application program optimization method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410011855.8A CN117873592A (en) 2024-01-02 2024-01-02 Application program optimization method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117873592A true CN117873592A (en) 2024-04-12

Family

ID=90578656

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410011855.8A Pending CN117873592A (en) 2024-01-02 2024-01-02 Application program optimization method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117873592A (en)

Similar Documents

Publication Publication Date Title
CN110377264B (en) Layer synthesis method, device, electronic equipment and storage medium
CN110377257B (en) Layer composition method and device, electronic equipment and storage medium
CN108282686B (en) Video picture processing method and device and electronic equipment
CN110377263B (en) Image synthesis method, image synthesis device, electronic equipment and storage medium
CN108010112A (en) Animation processing method, device and storage medium
US20220139017A1 (en) Layer composition method, electronic device, and storage medium
CN113055742B (en) Video display method, device, terminal and storage medium
CN111476852B (en) Reader refresh method, computing device, and computer storage medium
CN109218817B (en) Method and device for displaying virtual gift prompting message
CN110866208B (en) Page response type layout method, device and equipment
CN117873592A (en) Application program optimization method and device, electronic equipment and storage medium
CN113766316A (en) Display device and video information processing method
CN110456999B (en) Program creation method, program creation device, electronic equipment and computer readable storage medium
CN111445562A (en) Character animation generation method and device
CN112307383A (en) Page loading method and device
CN110020285B (en) Histogram processing method and device
CN110704157A (en) Application starting method, related device and medium
CN113365137B (en) Video advertisement display method and device, electronic equipment and readable storage medium
CN113779466B (en) Page display method and device, storage medium and electronic equipment
CN115185621B (en) Scene arrangement method and device, electronic equipment and storage medium
CN117215584B (en) UI automatic arrangement method, system, storage medium and electronic equipment
CN113190306B (en) Display hierarchy switching method, device, equipment and storage medium
CN109905759B (en) List display method, device, equipment and medium applied to Android client
CN115904295B (en) Multi-screen display control method, device, medium, system, chip and panel
US20210153118A1 (en) Method for referring to application scenario to manage hardware component of electronic device and associated non-transitory machine-readable medium

Legal Events

Date Code Title Description
PB01 Publication