CN113778546A - Method and device for gray scale optimization - Google Patents

Method and device for gray scale optimization Download PDF

Info

Publication number
CN113778546A
CN113778546A CN202110298380.1A CN202110298380A CN113778546A CN 113778546 A CN113778546 A CN 113778546A CN 202110298380 A CN202110298380 A CN 202110298380A CN 113778546 A CN113778546 A CN 113778546A
Authority
CN
China
Prior art keywords
deleted
file
information
application program
initial
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
CN202110298380.1A
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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information 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 Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202110298380.1A priority Critical patent/CN113778546A/en
Publication of CN113778546A publication Critical patent/CN113778546A/en
Pending legal-status Critical Current

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/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the application provides a method and a device for gray scale optimization, comprising the following steps: receiving a starting instruction initiated by a user, wherein the starting instruction is used for indicating the starting of an initial application program, traversing each file to be deleted according to a preset mapping chart corresponding to the initial application program to obtain information to be deleted corresponding to each file to be deleted, the mapping chart comprises a mapping relation between the file to be deleted and the information to be deleted, deleting the information to be deleted corresponding to each file to be deleted from the initial application program to obtain a target application program, starting the target application program, obtaining the information to be deleted corresponding to each file to be deleted through traversal based on the mapping chart, deleting the information to be deleted from the initial application program, avoiding the problem of low reliability of gray scale optimization in the related technology, improving the accuracy and reliability of gray scale optimization, improving the flexibility and diversity of the gray scale optimization, and ensuring that the gray scale optimization has no perception to the user, the user experience is improved.

Description

Method and device for gray scale optimization
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a method and a device for gray scale optimization.
Background
With the development of internet and computer technology, Applications (APPs) have increased in number, and the demand of users for the use effect of applications has increased. To improve the quality of the application, the application may be grayscale optimized before the application is online.
In the prior art, a commonly adopted method for gray scale optimization is a gray scale test, specifically: by configuring the upgrade prompt through the server, when the user starts the application program, the upgrade in the application program can be realized on the basis of the upgrade prompt.
However, with the above method, part of the logic in the application program, especially the one-time logic, may not be run, resulting in incomplete coverage of the grayscale optimization, which causes a problem of low reliability of the grayscale optimization.
Disclosure of Invention
The embodiment of the application provides a method and a device for gray scale optimization, which are used for solving the problem of low reliability of gray scale optimization in the related art.
In a first aspect, an embodiment of the present application provides a method for gray scale optimization, including:
receiving a starting instruction initiated by a user, wherein the starting instruction is used for indicating to start an initial application program;
traversing each file to be deleted according to a preset mapping chart corresponding to the initial application program to obtain information to be deleted corresponding to each file to be deleted, wherein the mapping chart comprises the mapping relation between the files to be deleted and the information to be deleted;
and deleting the information to be deleted corresponding to each file to be deleted from the initial application program to obtain a target application program, and starting the target application program.
In some embodiments, the map is a container that associates a key object and a value object; each file to be deleted is a key object, and each information to be deleted is a value object.
In some embodiments, traversing each file to be deleted according to a preset map corresponding to the initial application program to obtain information to be deleted corresponding to each file to be deleted, including:
traversing each key object in the mapping relation graph, determining a value object corresponding to each key object based on the association between the key object and the value object, and respectively determining the value object corresponding to each key object as the information to be deleted.
In some embodiments, further comprising:
calling the initial application program according to the starting instruction, and acquiring version attribute information of the initial application program;
if the version attribute information does not include a first identifier, acquiring a mapping map corresponding to the initial application program, wherein the first identifier is used for representing that the version of the initial application program is a gray level optimized version;
and if the version attribute information comprises the first identifier, starting the initial application program.
In some embodiments, further comprising:
acquiring initial files of the initial application program and initial information stored in each initial file;
and constructing the mapping map based on a preset gray optimization requirement, each initial file and each initial information.
In some embodiments, constructing the map based on a preset gray scale optimization requirement, each of the initial files, and each of the initial information includes:
determining each file to be deleted from each initial file based on the gray optimization requirement;
determining information to be deleted from each file to be deleted based on the gray optimization requirement;
and constructing the mapping map according to the files to be deleted and the information to be deleted.
In some embodiments, constructing the map according to each file to be deleted and each information to be deleted includes:
for any information to be deleted stored in any file to be deleted, if a key object corresponding to the any file to be deleted is already constructed, a value object corresponding to the key object corresponding to the any file to be deleted is constructed, and the any information to be deleted is stored in the value object corresponding to the key object corresponding to the any file to be deleted.
In some embodiments, further comprising:
if the key object corresponding to any file to be deleted is not constructed, constructing the key object corresponding to any file to be deleted, constructing a value object corresponding to the key object corresponding to any file to be deleted, and storing any information to be deleted into the value object corresponding to the key object corresponding to any file to be deleted.
In some embodiments, one key object may correspond to a plurality of pieces of information to be deleted, and one piece of information to be deleted corresponds to one key object.
In some embodiments, the second indicator is used to indicate that the version of the target application is a grayscale optimized version.
In a second aspect, an embodiment of the present application provides an apparatus for gray scale optimization, including:
the device comprises a receiving unit, a starting unit and a processing unit, wherein the receiving unit is used for receiving a starting instruction initiated by a user, and the starting instruction is used for indicating to start an initial application program;
the traversal unit is used for traversing each file to be deleted according to a preset mapping chart corresponding to the initial application program to obtain information to be deleted corresponding to each file to be deleted, wherein the mapping chart comprises a mapping relation between the file to be deleted and the information to be deleted;
the deleting unit is used for deleting the information to be deleted corresponding to each file to be deleted from the initial application program to obtain a target application program;
and the first starting unit is used for starting the target application program.
In some embodiments, the map is a container that associates a key object and a value object; each file to be deleted is a key object, and each information to be deleted is a value object.
In some embodiments, the traversal unit comprises:
the traversal subunit is used for traversing each key object in the mapping relation graph;
and the first determining subunit is used for determining the value object corresponding to each key object based on the association between the key object and the value object, and respectively determining the value object corresponding to each key object as the information to be deleted.
In some embodiments, further comprising:
the calling unit is used for calling the initial application program according to the starting instruction;
a first obtaining unit, configured to obtain version attribute information of the initial application program;
a second obtaining unit, configured to obtain a mapping map corresponding to the initial application program if the version attribute information does not include a first identifier, where the first identifier is used to represent that the version of the initial application program is a gray-scale optimized version;
and the second starting unit is used for starting the initial application program if the version attribute information comprises the first identifier.
In some embodiments, further comprising:
a third obtaining unit, configured to obtain initial files of the initial application program and initial information stored in each of the initial files;
and the construction unit is used for constructing the mapping map based on a preset gray optimization requirement, each initial file and each initial information.
In some embodiments, the building unit comprises:
the second determining subunit is used for determining each file to be deleted from each initial file based on the gray optimization requirement;
the third determining subunit is used for determining information to be deleted from each file to be deleted based on the gray optimization requirement;
and the construction subunit is used for constructing the mapping map according to each file to be deleted and each information to be deleted.
In some embodiments, the constructing subunit is configured to, for any piece of information to be deleted stored in any one of the files to be deleted, if a key object corresponding to the any one of the files to be deleted has already been constructed, construct a value object corresponding to the key object corresponding to the any one of the files to be deleted, and store the any piece of information to be deleted into the value object corresponding to the key object corresponding to the any one of the files to be deleted.
In some embodiments, the constructing subunit is configured to, if a key object corresponding to the any file to be deleted is not constructed, construct a key object corresponding to the any file to be deleted, construct a value object corresponding to the key object corresponding to the any file to be deleted, and store the any information to be deleted in the value object corresponding to the key object corresponding to the any file to be deleted.
In some embodiments, one key object may correspond to a plurality of pieces of information to be deleted, and one piece of information to be deleted corresponds to one key object.
In some embodiments, further comprising:
and the allocation unit is used for allocating a second identifier for the target application program, wherein the second identifier is used for indicating that the version of the target application program is a gray level optimized version.
In a third aspect, an embodiment of the present application provides an electronic device, including: a memory, a processor;
a memory; a memory for storing the processor-executable instructions;
wherein the processor is configured to perform the method of the first aspect as described above.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium, in which computer-executable instructions are stored, and when executed by a processor, the computer-executable instructions are configured to implement the method according to the first aspect.
In a fifth aspect, the present application provides a computer program product comprising a computer program which, when executed by a processor, implements the method of the first aspect.
The embodiment of the application provides: receiving a starting instruction initiated by a user, wherein the starting instruction is used for indicating to start an initial application program, traversing each file to be deleted according to a preset mapping chart corresponding to the initial application program to obtain information to be deleted corresponding to each file to be deleted, the mapping chart comprises a mapping relation between the file to be deleted and the information to be deleted, deleting the information to be deleted corresponding to each file to be deleted from the initial application program to obtain a target application program, and starting a technical scheme of the target application program, the information to be deleted corresponding to each file to be deleted is obtained through traversal based on the mapping chart, and each information to be deleted is deleted from the initial application program, so that the problem of low reliability of gray level optimization in the related technology can be avoided, the accuracy and reliability of gray level optimization are improved, and the flexibility and diversity of gray level optimization are improved, and the gray level optimization has no perception to the user, and the technical effect of the use experience of the user is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a schematic flow chart of a method for gray scale optimization according to an embodiment of the present application;
fig. 2 is a schematic view of an application scenario of a gray scale optimization method according to an embodiment of the present application;
FIG. 3 is a schematic flow chart illustrating a gray scale optimization method according to another embodiment of the present application;
FIG. 4 is a schematic diagram of a gray scale optimization apparatus according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a gray scale optimization apparatus according to another embodiment of the present application;
FIG. 6 is a block diagram of an electronic device of a method for gray scale optimization according to an embodiment of the present application
With the foregoing drawings in mind, certain embodiments of the disclosure have been shown and described in more detail below. These drawings and written description are not intended to limit the scope of the disclosed concepts in any way, but rather to illustrate the concepts of the disclosure to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The terms referred to in the embodiments of the present application are explained as follows:
gray level optimization: the method can also be called as gray level test, and refers to that before a certain product or application is officially released, a specific population is selected for trial use, and the number of trial users is gradually increased so as to find and correct problems in the product or application in time.
The application program comprises the following steps: the full name of english is Application, abbreviated as APP, and refers to a computer program for performing one or more specific tasks, which runs in a user mode, can interact with a user, and has a visual user interface.
Version: generally, the same object has different functions or performances in different versions.
With the increase of the number of the application programs, users also put forward higher and higher requirements on the quality of the application programs, in order to meet the use requirements of the users, before the providers of the application programs are online, namely before the providers distribute the application programs to application stores (network virtual stores) and the like for platforms for the users to download the application programs, the providers can realize gray level optimization of the application programs through technical means, and the application programs can determine possible problems of the application programs in the use process through gray level optimization, so that the application programs used by the users are the application programs with higher relative quality by timely finding and correcting the problems, and the use experience of the users is improved.
In the related art, two methods are generally used to perform gray scale optimization on an application program, one method is: and configuring an upgrade prompt through the server so that the user can upgrade directly in the application program.
For example, the user may send an instruction to start an application to the terminal device by means of a touch screen or by means of voice control.
And the terminal equipment sends a request for starting the application program to a server (or a background server) corresponding to the application program according to the instruction for starting the application program.
The server of the application program can send a pre-configured upgrade prompting message to the terminal equipment.
The terminal device can display the upgrade prompt message, and can send a corresponding interactive message to the server of the application program according to the relevant operation (such as clicking a virtual determination button and the like) of the user aiming at the upgrade prompt message, so that the gray scale of the application program in the local area is completely optimized.
Among other things, the terminal equipment may be mobile terminals such as mobile phones (or so-called "cellular" phones) and computers with mobile terminals, e.g., portable, pocket, hand-held, computer-included, or vehicle-mounted mobile devices, that exchange language and/or data with a radio access network; the terminal device may also be a Personal Communication Service (PCS) phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA), a tablet computer, a Wireless modem (modem), a handheld device (handset), a laptop computer (laptop computer), a Machine Type Communication (MTC) terminal, or the like; the Terminal Device may also be referred to as a system, a Subscriber Unit (Subscriber Unit), a Subscriber Station (Subscriber Station), a Mobile Station (Mobile), a Remote Station (Remote Station), a Remote Terminal (Remote Terminal), an Access Terminal (Access Terminal), a User Terminal (User Terminal), a User Agent (User Agent), a User Device or User Equipment, etc., and is not limited herein.
However, with the gray scale optimization method, part of logic in the application program, especially the one-time logic, may not be operated, such as user-guided logic, activation reporting logic, logging logic, etc., which results in incomplete coverage of gray scale optimization and causes a problem of low reliability of gray scale optimization.
Another method for gray scale optimization is as follows: an Application Package (APK) corresponding to the application is generated and issued to an application store, and a user can download the application package and perform gray level optimization on the application based on the application package.
However, with the mid-gray optimization method, since the application store may have a function of "mutually grabbing packages", that is, the application package may be grabbed and used by other merchants, on one hand, it is not beneficial to protect the labor achievement of the provider, and on the other hand, it is likely that the application package is modified, causing loss to the user, and the like.
In order to solve at least one of the problems occurring based on the above-described related art, the inventors of the present application have made creative efforts to obtain the inventive concept of the present application: and traversing each file to be deleted based on a pre-constructed mapping chart comprising the mapping relation between the file to be deleted and the information to be deleted to obtain and delete the information to be deleted from the application program.
The following describes the technical solutions of the present application and how to solve the above technical problems with specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Referring to fig. 1, fig. 1 is a schematic flow chart illustrating a gray scale optimization method according to an embodiment of the present application.
As shown in fig. 1, the method includes:
s101: and receiving a starting instruction initiated by a user.
The starting instruction is used for indicating the starting of the initial application program.
For example, the execution subject of this embodiment may be a device for gray scale optimization, and the device for gray scale optimization may be a terminal device, and for the description of the terminal device, reference may be made to the above embodiments, and details are not repeated here. The grayscale optimization apparatus may be specifically a processor disposed in the terminal device, or may also be a chip disposed in the terminal device, and the like, which is not limited in this embodiment.
It should be understood that "initial" in "initial application" in the present embodiment is used to distinguish from "target application" in the following, that is, the initial application may be understood as an application before the grayscale optimization, and the target application may be understood as an application after the grayscale optimization, but not as a limitation of the application itself.
The method for gray scale optimization of the present embodiment may be applied to the application scenario shown in fig. 2, and as shown in fig. 2, the terminal device 201 may be downloaded with a plurality of applications, such as application a and application B shown in fig. 2.
Illustratively, application A may be a shopping-related application, i.e., user 202 may make a purchase through application A; application B may be a reading-related application, i.e., user 202 may read through application B.
It should be noted that fig. 2 is only used to exemplarily show two different applications (i.e., application a and application B), and is not to be construed as limiting the kinds and numbers of applications.
In conjunction with the application scenario shown in fig. 2, the present embodiment can be understood as follows: the user 202 may initiate a start instruction to the terminal device 201 in a touch screen manner, for example, in a manner of clicking the application a, where the start instruction is used to instruct the terminal device 201 to start the application a.
Of course, the user 202 may also initiate a start instruction to the user by voice, such as "open application a" shown in fig. 2.
Specifically, the terminal device 201 may be provided with a sound collector and an analysis processor, and the terminal device 201 may collect the "open application a" of the user 202 through the sound collector, and perform operations such as semantic analysis on the "open application a" through the analysis processor, thereby completing the starting of the application a.
S102: and traversing each file to be deleted according to a preset mapping chart corresponding to the initial application program to obtain information to be deleted corresponding to each file to be deleted.
The mapping graph comprises a mapping relation between the file to be deleted and the information to be deleted.
By introducing the feature, the embodiment can traverse each file to be deleted to obtain the information to be deleted corresponding to each file to be deleted, so as to obtain all the information to be deleted, so that the obtained information to be deleted can be deleted from the initial application program in the following process, and thus, the gray scale optimization of the initial application program is realized.
It is worth to be noted that, in this embodiment, by introducing the mapping map and determining the information to be deleted based on the mapping map, the gray scale optimization of the initial application program is realized by deleting the information to be deleted from the initial application program, thereby avoiding the problem that the coverage of the gray scale optimization is not comprehensive and the reliability of the gray scale optimization is low due to the first gray scale optimization scheme in the related art, improving the accuracy and reliability of the gray scale optimization, further satisfying the user experience of the application program, and avoiding the defect that the application program package is captured due to the second gray scale optimization scheme in the related art, thereby causing unnecessary loss to the user, and realizing the flexibility and convenience of the gray scale optimization by directly completing the gray scale optimization based on the terminal device.
S103: and deleting the information to be deleted corresponding to each file to be deleted from the initial application program to obtain a target application program, and starting the target application program.
With reference to the foregoing embodiment and the application scenario shown in fig. 1, when determining to-be-deleted information corresponding to each to-be-deleted file, the terminal device may delete each determined to-be-deleted information from the initial application program, and obtain and start the target application program.
Based on the above analysis, the present embodiment provides a method for gray scale optimization, which includes: receiving a starting instruction initiated by a user, wherein the starting instruction is used for indicating the starting of an initial application program, traversing each file to be deleted according to a preset mapping chart corresponding to the initial application program, acquiring information to be deleted corresponding to each file to be deleted according to the mapping chart comprising the mapping relation between the file to be deleted and the information to be deleted, deleting the information to be deleted corresponding to each file to be deleted from the initial application program, acquiring a target application program, starting the target application program, acquiring the information to be deleted corresponding to each file to be deleted through traversal based on the mapping chart, deleting the information to be deleted from the initial application program, avoiding the problem of low reliability of gray scale optimization in the related technology, improving the accuracy and reliability of gray scale optimization, improving the flexibility and diversity of gray scale optimization, and ensuring that the gray scale optimization has no perception to the user, the technical effect of the use experience of the user is improved.
Referring to fig. 3, fig. 3 is a flowchart illustrating a gray scale optimization method according to another embodiment of the present application.
As shown in fig. 3, the method includes:
s301: initial files of the initial application program and initial information stored in each initial file are obtained.
Similarly, the "initial" in the "initial file" in the present embodiment is used for distinguishing from the "file to be deleted", and the "initial information" is used for distinguishing from (information to be transmitted), and cannot be understood as a limitation on the file content and the information content.
It should be understood that the number of the initial files may be plural, and a plurality of initial information may be included in one initial file, and the initial information may be understood as parameter information.
S302: and constructing a mapping map based on the preset gray optimization requirement, each initial file and each initial information.
Illustratively, the gray optimization requirement may be determined based on experience, history, and experiment, and the present embodiment is not limited thereto.
It should be noted that, in this embodiment, the map is constructed based on the gray scale optimization requirement, the initial file, and the initial information, so that the map can meet the gray scale optimization requirement, thereby improving the reliability and accuracy of the gray scale optimization.
It should be understood that the execution subject for constructing the map may be other devices having a connection relationship with the terminal device, such as a server (including a cloud server and a local server), and this embodiment is not limited.
For example, the server is connected to the terminal device, and the server may collect operation attribute information of the initial application (which may include related information in an operation process of the initial application itself, or may include related information such as an evaluation generated by a user with respect to the operation of the initial application).
And the server determines the gray optimization requirement according to the operation attribute information.
And the server constructs a mapping map according to the gray optimization requirement, the initial file and the initial information, and sends the mapping map to the terminal equipment.
In some embodiments, S302 may include the steps of:
step 1: and determining each file to be deleted from each initial file based on the gray optimization requirement.
Step 2: and determining information to be deleted from each file to be deleted based on the gray optimization requirement.
For example, in combination with the above embodiment, the server may select a file to be deleted (i.e., a file to be deleted) from a plurality of initial files according to the requirement for grayscale optimization, and after each file to be deleted is selected, for any file to be deleted, information to be deleted may be determined from any file to be deleted based on the requirement for grayscale optimization.
And step 3: and constructing a mapping chart according to each file to be deleted and each information to be deleted.
It should be noted that, in this embodiment, each file to be deleted is determined based on the gray-scale optimization requirement, and then each information to be deleted is determined based on the gray-scale optimization requirement, so that the constructed mapping graph has high integrity and comprehensive technical effects.
In some embodiments, the map is a container that associates a key object and a value object; each file to be deleted is a key object, and each information to be deleted is a value object.
In this embodiment, the map may be understood as a container for storing information based on a key-value pair manner, the file to be deleted may be a key object in the key-value pair, the information to be deleted may be a value object in the key-value pair, one file to be deleted may be a key object, and one information to be deleted may be a value object.
It is worth to say that, the object to be deleted and the information to be deleted are associated and stored in a key value pair mode, so that the storage efficiency can be improved, particularly when the corresponding value object is queried based on the object to be stored subsequently, the query efficiency can be improved, and the technical effects of good accuracy and reliability of the query can be improved.
In some embodiments, a key object may correspond to a plurality of pieces of information to be deleted, and one piece of information to be deleted corresponds to one key object.
It should be noted that one file to be deleted may correspond to multiple pieces of information to be deleted, and therefore, one key object may correspond to multiple pieces of information to be deleted, and on the contrary, one piece of information to be deleted corresponds to a unique key object.
By constructing each piece of information to be deleted belonging to a certain file to be deleted as a value object corresponding to a key object of the file to be deleted, all value objects corresponding to the key object can be determined more conveniently and quickly when the value object is queried based on the key object, and the technical effect of improving the efficiency of gray scale optimization is achieved.
On this basis, step 3 may comprise the following sub-steps:
substep 1: and for any information to be deleted stored in any file to be deleted, judging whether a key object corresponding to any file to be deleted is constructed, if so, executing a substep 2, and otherwise, executing a substep 3.
Substep 2: and constructing a value object corresponding to a key object corresponding to any file to be deleted, and storing any information to be deleted into the value object corresponding to the key object corresponding to any file to be deleted.
Substep 3: and constructing a key object corresponding to any file to be deleted, constructing a value object corresponding to the key object corresponding to any file to be deleted, and storing any information to be deleted into the value object corresponding to the key object corresponding to any file to be deleted.
Exemplarily, in general, if any file to be deleted is the first file to be deleted, the key object corresponding to the file to be deleted may be directly constructed, the value object corresponding to the key object corresponding to the file to be deleted may be constructed, and the information to be deleted of the file to be deleted may be stored in the corresponding value object; if any file to be deleted is a non-first file to be deleted, in order to avoid repeatedly constructing a key object of the same file to be deleted, the non-first file to be deleted and a previous file to be deleted can be compared, if the previous file to be deleted includes the file to be deleted, the key object does not need to be constructed again, but a value object can be constructed again on the basis of the key object, and information to be deleted is stored in the reconstructed value object.
Obviously, the information to be stored is respectively stored by the method, so that the key object of the same file to be deleted can be prevented from being repeatedly constructed, the storage space and resources are saved, and the technical effect of construction efficiency is provided.
S303: and receiving a starting instruction initiated by a user, wherein the starting instruction is used for indicating to start the initial application program.
For example, as described in relation to S303, reference may be made to S101, which is not described herein again.
S304: and calling the initial application program according to the starting instruction, and acquiring version attribute information of the initial application program.
S305: and judging whether the version attribute information comprises the first identifier or not, if not, executing S306, and if not, executing S310.
The first identification is used for representing that the version of the initial application program is a gray level optimized version.
S306: a map corresponding to the initial application is obtained.
S307: traversing each key object in the mapping relation graph, determining a value object corresponding to each key object based on the association between the key object and the value object, and respectively determining the value object corresponding to each key object as the information to be deleted.
Based on the above analysis, it can be known that there is a relationship between the key object and the value object, and a key object may correspond to a plurality of value objects.
It should be noted that, in this embodiment, each piece of information to be deleted is determined in a traversal manner, so that efficiency of determining each piece of information to be deleted can be improved, and accuracy and reliability of each piece of determined information to be deleted can be improved.
S308: and deleting the information to be deleted corresponding to each file to be deleted from the initial application program to obtain a target application program, and starting the target application program.
Exemplarily, the description about S308 may refer to the description about S303, which is not described herein again.
S309: and allocating a second identifier for the target application program, wherein the second identifier is used for indicating that the version of the target application program is the gray level optimized version.
The second identifier may be the same as the first identifier, or may be an identifier different from the first identifier, which is not limited in this embodiment.
It is worth to say that, in this embodiment, the second identifier is allocated to the target application program, so that the second identifier is used to indicate that the version of the target application program is the version after the grayscale optimization, and therefore, the target application program can be directly started subsequently, and repeated grayscale optimization is avoided, thereby achieving the technical effects of saving resources and cost, and improving the user experience.
S310: the initial application is started.
Based on the above analysis, in this embodiment, the identifier may represent different version attributes of the initial application program, and if there is no first identifier, it indicates that the initial application program is a version after the gray level optimization, and if there is the first identifier, it indicates that the initial application program is a version that is not gray level optimized.
Accordingly, the terminal device can perform the gradation optimization for the version of the initial application program that has not been gradation-optimized, and the terminal device can directly start the initial application program without the gradation optimization again for the version of the initial application program that has been gradation-optimized.
It should be noted that, in this embodiment, different methods are determined to be adopted through the version attribute information, or grayscale optimization is performed, or startup is performed, so that flexibility and diversity can be improved, repeated grayscale optimization is avoided, and a technical effect of saving resources is achieved.
Referring to fig. 4, fig. 4 is a schematic diagram of a gray scale optimization apparatus according to an embodiment of the present application.
As shown in fig. 4, the apparatus 400 for gray scale optimization includes:
a receiving unit 401, configured to receive a start instruction initiated by a user, where the start instruction is used to instruct to start an initial application.
The traversing unit 402 is configured to traverse each file to be deleted according to a preset mapping map corresponding to the initial application program to obtain information to be deleted corresponding to each file to be deleted, where the mapping map includes a mapping relationship between the file to be deleted and the information to be deleted.
A deleting unit 403, configured to delete the to-be-deleted information corresponding to each to-be-deleted file from the initial application program, so as to obtain the target application program.
A first starting unit 404, configured to start the target application.
Referring to fig. 5, fig. 5 is a schematic diagram of a gray scale optimization apparatus according to another embodiment of the present application.
As shown in fig. 5, the apparatus 500 for gray scale optimization includes:
a third obtaining unit 501, configured to obtain initial files of an initial application program and initial information stored in each of the initial files.
The construction unit 502 is configured to construct a map based on preset gray optimization requirements, each initial file, and each initial information.
As can be seen in conjunction with fig. 5, in some embodiments, the building unit 502 includes:
and a second determining subunit 5021, configured to determine, based on the requirement of grayscale optimization, each file to be deleted from each initial file.
A third determining subunit 5022, configured to determine information to be deleted from each file to be deleted based on the requirement of grayscale optimization.
A constructing subunit 5023, configured to construct a mapping map according to each file to be deleted and each information to be deleted.
In some embodiments, the map is a container that associates a key object and a value object; each file to be deleted is a key object, and each information to be deleted is a value object.
In some embodiments, a key object may correspond to a plurality of pieces of information to be deleted, and one piece of information to be deleted corresponds to one key object.
In some embodiments, the constructing subunit 5023 is configured to, for any piece of information to be deleted stored in any one of the files to be deleted, if a key object corresponding to any one of the files to be deleted has already been constructed, construct a value object corresponding to the key object corresponding to any one of the files to be deleted, and store any piece of information to be deleted into the value object corresponding to the key object corresponding to any one of the files to be deleted.
In some embodiments, the constructing subunit 5023 is configured to, if no key object corresponding to any file to be deleted is constructed, construct a key object corresponding to any file to be deleted, construct a value object corresponding to a key object corresponding to any file to be deleted, and store any information to be deleted in a value object corresponding to a key object corresponding to any file to be deleted.
A receiving unit 503, configured to receive a start instruction initiated by a user, where the start instruction is used to instruct to start an initial application.
And the calling unit 504 is used for calling the initial application program according to the starting instruction.
A first obtaining unit 505, configured to obtain version attribute information of the initial application program.
A second obtaining unit 506, configured to obtain a map corresponding to the initial application program if the version attribute information does not include the first identifier, where the first identifier is used to represent that the version of the initial application program is a gray-scale optimized version.
The traversing unit 507 is configured to traverse each file to be deleted according to a preset mapping map corresponding to the initial application program, where the mapping map includes a mapping relationship between the file to be deleted and the information to be deleted, and obtain information to be deleted corresponding to each file to be deleted.
In some embodiments, traversal unit 507 includes:
the traverse sub-unit 5071 is used for traversing each key object in the map.
The first determining subunit 5072 is configured to determine, based on the association between the key object and the value object, a value object corresponding to each key object, and determine the value object corresponding to each key object as information to be deleted.
A deleting unit 508, configured to delete the to-be-deleted information corresponding to each to-be-deleted file from the initial application program, so as to obtain the target application program.
An assigning unit 509, configured to assign a second identifier to the target application, where the second identifier is used to indicate that the version of the target application is the gray-level optimized version.
A first starting unit 510 for starting the target application.
The second starting unit 511 is configured to start the initial application program if the version attribute information includes the first identifier.
According to an embodiment of the present application, an electronic device and a readable storage medium are also provided.
There is also provided, in accordance with an embodiment of the present application, a computer program product, including: a computer program, stored in a readable storage medium, from which at least one processor of the electronic device can read the computer program, the at least one processor executing the computer program causing the electronic device to perform the solution provided by any of the embodiments described above.
Fig. 6 is a block diagram of an electronic device according to an embodiment of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application that are described and/or claimed herein.
As shown in fig. 6, the electronic apparatus includes: one or more processors 601, memory 602, and interfaces for connecting the various components, including a high-speed interface and a low-speed interface. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions for execution within the electronic device, including instructions stored in or on the memory to display graphical information of a GUI on an external input/output apparatus (such as a display device coupled to the interface). In other embodiments, multiple processors and/or multiple buses may be used, along with multiple memories and multiple memories, as desired. Also, multiple electronic devices may be connected, with each device providing portions of the necessary operations (e.g., as a server array, a group of blade servers, or a multi-processor system). In fig. 6, one processor 601 is taken as an example.
The memory 602 is a non-transitory computer readable storage medium as provided herein. Wherein the memory stores instructions executable by at least one processor to cause the at least one processor to perform the method of grayscale optimization provided herein. The non-transitory computer readable storage medium of the present application stores computer instructions for causing a computer to perform the method of grayscale optimization provided herein.
The memory 602, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the method of gray scale optimization in the embodiments of the present application. The processor 601 executes various functional applications of the server and data processing, i.e., a method of implementing gray scale optimization in the above-described method embodiments, by running non-transitory software programs, instructions, and modules stored in the memory 602.
The memory 602 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the electronic device of the method of gray scale optimization, and the like. Further, the memory 602 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 602 optionally includes memory remotely located from the processor 601, and these remote memories may be connected over a network to the electronics of the method of gray scale optimization. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The electronic device of the method of grayscale optimization may further include: an input device 603 and an output device 604. The processor 601, the memory 602, the input device 603 and the output device 604 may be connected by a bus or other means, and fig. 6 illustrates the connection by a bus as an example.
The input device 603 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device of the method of grayscale optimization, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, a pointer, one or more mouse buttons, a track ball, a joystick, etc. The output devices 604 may include a display device, auxiliary lighting devices (e.g., LEDs), and tactile feedback devices (e.g., vibrating motors), among others. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device can be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
These computer programs (also known as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented using high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, Programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (14)

1. A method of grayscale optimization, comprising:
receiving a starting instruction initiated by a user, wherein the starting instruction is used for indicating to start an initial application program;
traversing each file to be deleted according to a preset mapping chart corresponding to the initial application program to obtain information to be deleted corresponding to each file to be deleted, wherein the mapping chart comprises the mapping relation between the files to be deleted and the information to be deleted;
and deleting the information to be deleted corresponding to each file to be deleted from the initial application program to obtain a target application program, and starting the target application program.
2. The method of claim 1, wherein the map is a container that associates a key object and a value object; each file to be deleted is a key object, and each information to be deleted is a value object.
3. The method of claim 2, wherein traversing each file to be deleted according to a preset map corresponding to the initial application to obtain information to be deleted corresponding to each file to be deleted comprises:
traversing each key object in the mapping relation graph, determining a value object corresponding to each key object based on the association between the key object and the value object, and respectively determining the value object corresponding to each key object as the information to be deleted.
4. The method of any of claims 1 to 3, further comprising:
calling the initial application program according to the starting instruction, and acquiring version attribute information of the initial application program;
if the version attribute information does not include a first identifier, acquiring a mapping map corresponding to the initial application program, wherein the first identifier is used for representing that the version of the initial application program is a gray level optimized version;
and if the version attribute information comprises the first identifier, starting the initial application program.
5. The method of claim 2 or 3, further comprising:
acquiring initial files of the initial application program and initial information stored in each initial file;
and constructing the mapping map based on a preset gray optimization requirement, each initial file and each initial information.
6. The method of claim 5, wherein constructing the map based on a preset gray scale optimization requirement, each of the initial files, and each of the initial information comprises:
determining each file to be deleted from each initial file based on the gray optimization requirement;
determining information to be deleted from each file to be deleted based on the gray optimization requirement;
and constructing the mapping map according to the files to be deleted and the information to be deleted.
7. The method of claim 6, wherein constructing the map according to each file to be deleted and each information to be deleted comprises:
for any information to be deleted stored in any file to be deleted, if a key object corresponding to the any file to be deleted is already constructed, a value object corresponding to the key object corresponding to the any file to be deleted is constructed, and the any information to be deleted is stored in the value object corresponding to the key object corresponding to the any file to be deleted.
8. The method of claim 7, further comprising:
if the key object corresponding to any file to be deleted is not constructed, constructing the key object corresponding to any file to be deleted, constructing a value object corresponding to the key object corresponding to any file to be deleted, and storing any information to be deleted into the value object corresponding to the key object corresponding to any file to be deleted.
9. The method according to claim 2 or 3, wherein one key object may correspond to a plurality of pieces of information to be deleted, and one piece of information to be deleted corresponds to one key object.
10. The method of any of claims 1 to 3, further comprising:
and allocating a second identifier for the target application program, wherein the second identifier is used for indicating that the version of the target application program is a gray level optimized version.
11. An apparatus for gray scale optimization, comprising:
the device comprises a receiving unit, a starting unit and a processing unit, wherein the receiving unit is used for receiving a starting instruction initiated by a user, and the starting instruction is used for indicating to start an initial application program;
the traversal unit is used for traversing each file to be deleted according to a preset mapping chart corresponding to the initial application program to obtain information to be deleted corresponding to each file to be deleted, wherein the mapping chart comprises a mapping relation between the file to be deleted and the information to be deleted;
the deleting unit is used for deleting the information to be deleted corresponding to each file to be deleted from the initial application program to obtain a target application program;
and the first starting unit is used for starting the target application program.
12. An electronic device, comprising: a memory, a processor;
a memory; a memory for storing the processor-executable instructions;
wherein the processor is configured to perform the method of any one of claims 1 to 10.
13. A computer readable storage medium having stored therein computer executable instructions for implementing the method of any one of claims 1 to 10 when executed by a processor.
14. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 10.
CN202110298380.1A 2021-03-19 2021-03-19 Method and device for gray scale optimization Pending CN113778546A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110298380.1A CN113778546A (en) 2021-03-19 2021-03-19 Method and device for gray scale optimization

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110298380.1A CN113778546A (en) 2021-03-19 2021-03-19 Method and device for gray scale optimization

Publications (1)

Publication Number Publication Date
CN113778546A true CN113778546A (en) 2021-12-10

Family

ID=78835519

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110298380.1A Pending CN113778546A (en) 2021-03-19 2021-03-19 Method and device for gray scale optimization

Country Status (1)

Country Link
CN (1) CN113778546A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114756298A (en) * 2022-04-20 2022-07-15 广州博冠信息科技有限公司 Program instance management method and device, computer storage medium and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114756298A (en) * 2022-04-20 2022-07-15 广州博冠信息科技有限公司 Program instance management method and device, computer storage medium and electronic equipment
CN114756298B (en) * 2022-04-20 2024-06-04 广州博冠信息科技有限公司 Program instance management method and device, computer storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN110765024B (en) Simulation test method, simulation test device, electronic equipment and computer readable storage medium
WO2020207454A1 (en) Information pushing method and device
CN107277029B (en) Remote procedure call method and device and computer equipment
CN107656768B (en) Method and system for controlling page jump
US7747683B2 (en) Method and system for operating applications for remote terminal devices
US9875109B2 (en) Method and apparatus for generating user adaptive application in mobile terminal
CN111177112A (en) Database blocking method and device based on operation and maintenance management system and electronic equipment
WO2020057304A1 (en) Method for game running and related products
CN112506584B (en) Resource file loading method, device, equipment, storage medium and product
CN111330280A (en) Data processing method and device in game, storage medium and electronic equipment
CN111949314A (en) Method and device for generating application installation package, server and storage medium
CN110795205B (en) System and method for providing cloud service based on software container
CN113778546A (en) Method and device for gray scale optimization
CN113302585A (en) Accelerating applications and sub-packet installation
CN111615171B (en) Access method and device of wireless local area network
CN111414154A (en) Method and device for front-end development, electronic equipment and storage medium
CN111865676A (en) Configuration file update checking method, device, server and storage medium
CN113691937B (en) Method for determining position information, cloud mobile phone and terminal equipment
CN113612643B (en) Network configuration method, device and equipment of cloud mobile phone and storage medium
CN114880020A (en) Software development kit management method, related device and computer program product
CN111177558B (en) Channel service construction method and device
CN114253441A (en) Target function starting method and device, storage medium and electronic device
CN113617020A (en) Game control method, device, storage medium, server and terminal
CN111813407A (en) Game development method, game running device and electronic equipment
CN112559213B (en) Application communication method, device, computer equipment 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