Disclosure of Invention
Based on this, it is necessary to provide a control attribute reading method, an apparatus, a terminal and a readable storage medium for solving the problem of high development cost caused by a large number of logic judgments involved in the control attribute reading.
A control attribute reading method, the method comprising:
acquiring a configuration file identifier of a control from a server;
when the configuration file identification of the control represents the change of the configuration file, downloading the configuration file of the control from a server;
reading the resource files according to the names of the resource files in the configuration files and the reading sequence of the resource files;
acquiring a control attribute corresponding to the direction of the current screen from the read current resource file;
and when the control attribute corresponding to the direction of the current screen is not acquired from the read current resource file, continuously reading the next resource file according to the reading sequence of the resource files in the configuration file until the control attribute is acquired.
In one embodiment, before the step of reading the resource files according to the names of the resource files in the configuration file and the reading sequence of the resource files, the method further includes:
acquiring a resource file list from the server;
judging whether the local resources files related to the resource file list are lacked;
when the resource files related in the resource file list are lacking locally, downloading the lacking resource files from the server;
when the resource files related in the resource file list are not lacked locally, judging whether the resource files which are the same as the names of the resource files related in the resource file list and have different hash values exist locally;
and when the resource files which have the same names and different hash values with the resource files related in the resource file list locally exist, downloading the resource files which have the same names and different hash values with the resource files related in the resource file list from the server.
In one embodiment, the step of reading the resource files according to the names of the resource files in the configuration file and the reading sequence of the resource files includes:
obtaining the effective time of the resource file with the effective time in the configuration file;
if the current time is within the effective time of the resource file, preferentially reading the resource file corresponding to the effective time;
and if the current time is not within the valid time of the resource file, reading the resource file without valid time according to the name of the resource file in the configuration file and the reading sequence of the resource file.
In one embodiment, after the step of downloading the configuration file of the control from the server, the method further includes:
acquiring the changed resource file in the configuration file, and displaying the time configuration prompt of the changed resource file;
receiving an adjustment instruction corresponding to the time configuration prompt and aiming at the effective time of the changed resource file;
and adjusting the effective time of the resource file according to the adjusting instruction.
In one embodiment, the step of obtaining the control attribute corresponding to the direction of the current screen from the read current resource file includes:
acquiring the direction of a current screen;
when the direction of the current screen is horizontal, acquiring the control attribute when the current screen is horizontal from the read current resource file;
when the direction of the current screen is vertical, acquiring the control attribute when the current screen is vertical from the read current resource file;
and when the control attribute when the current screen is horizontal and the control attribute when the current screen is vertical are not acquired from the read current resource file, the control attribute corresponding to the direction of the current screen is not acquired from the read current resource file.
A control property reading apparatus, the apparatus comprising:
the downloading module is used for acquiring the configuration file identifier of the control from the server; and when the configuration file identification of the control represents the change of the configuration file, downloading the configuration file of the control from a server.
The reading module is used for reading the resource files according to the names of the resource files in the configuration files and the reading sequence of the resource files;
the acquisition module is used for acquiring the control attribute corresponding to the direction of the current screen from the read current resource file; and when the control attribute corresponding to the direction of the current screen is not acquired from the read current resource file, continuously reading the next resource file according to the reading sequence of the resource files in the configuration file until the control attribute is acquired.
In one embodiment, the downloading module is further configured to obtain a resource file list from the server;
the device further comprises:
the first judgment module is used for judging whether the resource files related in the resource file list are lacking locally; when the resource files related in the resource file list are lacking locally, downloading the lacking resource files from the server;
the second judging module is used for judging whether a resource file with the same name and different hash value as the resource file related in the resource file list exists locally or not when the resource file related in the resource file list is not lacked locally; and when the resource files which have the same names and different hash values with the resource files related in the resource file list locally exist, downloading the resource files which have the same names and different hash values with the resource files related in the resource file list from the server.
In one embodiment, the reading module comprises:
the effective time acquisition unit is used for acquiring the effective time of the resource file with the effective time in the configuration file;
the reading unit is used for preferentially reading the resource file corresponding to the effective time if the current time is within the effective time of the resource file; and if the current time is not within the valid time of the resource file, reading the resource file without valid time according to the name of the resource file in the configuration file and the reading sequence of the resource file.
A terminal comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the above method when executing the computer program.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method.
According to the control attribute reading method, device, terminal and readable storage medium, when the control attribute needs to be changed, the corresponding configuration file is modified in the server, the configuration file is indicated to be changed through the configuration file identifier, then the configuration file is issued to the terminal, the terminal can read the corresponding resource file according to the name of the resource file in the configuration file and the reading sequence of the resource file, the corresponding control attribute is read from the resource file, a large amount of logic judgment is not needed, and the research and development cost is low.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Before describing in detail embodiments that are in accordance with the present invention, it should be observed that the embodiments reside primarily in combinations of steps and system components related to control property reading methods, apparatus, terminals, and readable storage media. Accordingly, the system components and method steps have been represented where appropriate by conventional symbols in the drawings, showing only those details that are pertinent to understanding the embodiments of the present invention so as not to obscure the disclosure with details that will be readily apparent to those of ordinary skill in the art having the benefit of the description herein.
In this document, relational terms such as left and right, top and bottom, front and back, first and second, and the like may be 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. 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.
Referring to fig. 1, fig. 1 is an application environment diagram of a control attribute reading method in an embodiment, where the application environment diagram includes a plurality of terminals and a server, where the terminals may be a mobile phone, a tablet, a vehicle-mounted terminal, and the like of a user, the server may be in communication with the terminals, and a configuration file and a resource file of each terminal are stored in the server, and the terminals may download the configuration file and the resource file from the server through communication with the server, so as to read corresponding control attributes according to the configuration file and the resource file.
Referring to fig. 2, in an embodiment, a method for reading control attributes is provided, and the embodiment is exemplified by applying the method to a terminal in the control attribute reading system in fig. 1. The terminal runs a control attribute reading program, and the control attribute reading method is implemented through the control attribute reading program. The method specifically comprises the following steps:
s202: and acquiring the configuration file identification of the control from the server.
Specifically, the control refers to a client APP installed on the terminal, for example, a panning APP, a kyoto APP, a payment APP, and the like. The configuration file refers to a resource file for configuring the control and a reading sequence of the resource file, and the configuration file identifier is an identifier used to indicate whether the configuration file is changed, and may be represented by an identifier bit, for example, when the identifier bit is 0, the configuration file is not changed, and when the identifier bit is 1, the configuration file is changed. Or, the configuration file may be represented by a random number or the like, for example, when the last random number is different from the current random number, the configuration file is modified, otherwise, the configuration file is not modified.
S204: and when the configuration file identification of the control represents the change of the configuration file, downloading the configuration file of the control from the server.
Specifically, when the configuration file identifier of the control indicates that the configuration file is changed, that is, the control has a new configuration file, the terminal downloads the configuration file of the control from the server, so that the configuration file of the terminal is ensured to be consistent with the configuration file stored in the server.
S206: and reading the resource files according to the names of the resource files in the configuration files and the reading sequence of the resource files.
Specifically, the resource file refers to a file storing control attributes, and may be a device name resource file, a screen size resource file, a universal resource file, or the like, where the name of the resource file may be named by an operating system, a device type, a resource file type, or the like, and a suffix name may be added, for example: the operating system (iOS, Android) _ device type (Phone, Pad, Watch) _ device name/screen size/universal _ suffix name ", the suffix name may be null, and the name of the resource file may be iOS _ Phone _6, iOS _ Pad _1024X768_ native day, Android _ Phone _1920X1080, or the like.
The configuration file stores the reading sequence of the resource files, for example, the configuration file can be set to read the device name resource file first, then read the screen size resource file, and finally read the universal resource file; the configuration file can also be set to read the screen size resource file, the equipment name resource file, the universal resource file and the like. Therefore, the terminal can read the resource files in sequence according to the reading of the resource files in the configuration file.
S208: and acquiring the control attribute corresponding to the direction of the current screen from the read current resource file.
Specifically, the control attribute refers to the shape, size, color and the like of a display interface of the client APP on the terminal. When a terminal downloads a configuration file from a server, the resource file is read according to the name of the resource file in the configuration file and the reading sequence of the resource file, and because the resource file stores both the attribute of a horizontal screen time control and the attribute of a vertical screen time control, the corresponding control attribute needs to be obtained according to the direction of the current screen, for example, whether the terminal is a horizontal screen or a vertical screen can be indicated through a flag bit, and whether the terminal is a horizontal screen or a vertical screen can also be detected through a position sensor arranged in the terminal, for example, a gyroscope and the like, when the terminal is a horizontal screen, the attribute of the horizontal screen control in the resource file is read, and when the terminal is a vertical screen, the attribute of the vertical screen control in the resource file is read.
S210: and when the control attribute corresponding to the direction of the current screen is not acquired from the read current resource file, continuously reading the next resource file according to the reading sequence of the resource files in the configuration file until the control attribute is acquired.
Specifically, for example, when the reading order of the resource files set in the configuration file is: the method comprises the steps of firstly reading a device name resource file, then reading a screen size resource file, and finally reading a universal resource file. The terminal reads the resource file of the device name according to the name of the resource file in the configuration file and the reading sequence of the resource file, then reads the control attribute from the resource file of the device name, if the control attribute of the horizontal screen does not exist, and the control attribute of the vertical screen does not exist, the control attribute is continuously read according to the resource file of the screen size in the configuration file, and when the control attribute of the horizontal screen exists in the resource file of the screen size, the control attribute of the horizontal screen is read, namely the control attribute of the horizontal screen is displayed on the screen of the terminal and is the control of the control attribute in the resource file of the screen size.
According to the control attribute reading method, when the control attribute needs to be changed, the corresponding configuration file is modified in the server, the configuration file is represented to be changed through the configuration file identification, then the configuration file is issued to the terminal, the terminal can read the corresponding resource file according to the name of the resource file in the configuration file and the reading sequence of the resource file, the corresponding control attribute is read from the resource file, a large amount of logic judgment is not needed, and the research and development cost is low.
In one embodiment, referring to fig. 3, fig. 3 is a flowchart of a resource file downloading step in an embodiment, where the resource file downloading step may be executed before step S206 in the embodiment shown in fig. 2, that is, before the step of reading the resource file according to the name of the resource file in the configuration file and the reading sequence of the resource file, a resource file downloading step is further included, and the resource file downloading step may include:
s302: a resource file list is obtained from a server.
Specifically, the resource file list is generated according to the configuration file when the configuration file is changed, for example, when the configuration file relates to a device name resource file, a screen size resource file, and a universal resource file, the configuration file list includes names of three resource files, i.e., the device name resource file, the screen size resource file, and the universal resource file.
S304: and judging whether the local resources files related to the resource file list are lacked.
Specifically, when the terminal comes from the server to the resource file list, it is determined whether the local area lacks a corresponding resource file according to the resource file list, for example, it may be determined whether the local area lacks a corresponding resource file by name, for example, it may be determined whether the local area lacks a device name resource file according to the name, and if the local area lacks a device name resource file, the resource file is downloaded from the server.
S306: when the resource files related in the resource file list are locally absent, the absent resource files are downloaded from the server.
Specifically, when the terminal lacks a resource file related in the resource file list, the terminal downloads the lacking resource file from the server, for example, the terminal first sends a resource file acquisition request to the server, then the server queries a corresponding resource file according to the resource file acquisition request of the terminal, and finally the server sends the resource file to the terminal. Before the server sends the resource file to the terminal, the resource file can be packed first, and the packed resource file is sent to the terminal, so that the transmission quantity of data can be reduced.
S308: and when the resource files related in the resource file list are not lacked locally, judging whether the resource files with the same names and different hash values as the resource files related in the resource file list exist locally.
In particular, the hash value may refer to the MD5 value, and the MD5 value of a resource file is like a "digital fingerprint" for this resource file. The MD5 value for each resource file is different, and if anyone makes any changes to the resource file, the MD5 value of the resource file, i.e., the corresponding "digital fingerprint," changes. For example, the download server provides an MD5 value in advance for a resource file, after the terminal has downloaded the resource file, the MD5 value of the downloaded resource file is recalculated according to the algorithm agreed with the server, and by comparing whether the two values are the same, it can be determined whether the downloaded file is erroneous, or whether the downloaded file is tampered, and similarly, it can also be determined whether the resource file already stored in the terminal is tampered.
When the terminal does not lack the corresponding resource file, whether the resource file with the same name and different hash value as the resource file in the resource file list exists locally or not is judged, namely whether the locally stored resource file is tampered or not is judged.
S310: and when the resource files with the same names and different hash values as the resource files related in the resource file list exist locally, downloading the resource files with the same names and different hash values as the resource files related in the resource file list from the server.
Specifically, when a resource file with the same name and a different hash value as the resource file in the resource file list is locally stored, that is, the resource file locally stored has been tampered, the resource file needs to be downloaded from the server again, and after the resource file is downloaded, whether the downloaded resource file is the same as the resource file stored in the server can be determined through the hash value, so as to ensure the security of the resource file of the terminal.
In the above embodiment, whether the resource file stored locally in the terminal is absent or tampered is determined through the resource file list, and when the resource file is absent locally or the local resource file is tampered, the corresponding resource file is directly downloaded from the server, so that the security of the resource file of the terminal can be ensured.
In one embodiment, according to the name of the resource file in the configuration file and the reading order of the resource file, the step of reading the resource file may include: obtaining the effective time of the resource file with the effective time in the configuration file; if the current time is within the effective time of the resource file, preferentially reading the resource file corresponding to the effective time; and if the current time is not within the effective time of the resource file, reading the resource file without the effective time according to the name of the resource file in the configuration file and the reading sequence of the resource file.
In one embodiment, after the step of downloading the configuration file of the control from the server, the method further includes: acquiring a changed resource file in the configuration file, and displaying a time configuration prompt of the changed resource file; receiving an adjustment instruction corresponding to the time configuration prompt and aiming at the effective time of the changed resource file; and adjusting the effective time of the resource file according to the adjusting instruction.
Specifically, when a holiday occurs, a provider of the client APP may adjust the display form of the icon of the client APP as needed, for example, a holiday graphic is added, or when a holiday does not occur, a user may need to adjust the display form of the icon of the client APP according to different situations, for example, when a displayed theme changes, the user may need to select the display form of the icon related to the theme, so that the whole display form of the terminal is harmonious.
For example, the provider of the client APP adjusts the display form of the icon of the client APP when october is in progress, but since the undecency is only 7 days, the display form of the icon of the client APP only needs to be adjusted within the seven days, and therefore the effective time of the resource file of the undecency in the server adjustment configuration file is from half october to twelve o.ten.seven evenings. The terminal downloads the configuration file from the server and obtains the effective time of the resource file in the configuration file, if the current time is within the effective time of the resource file, for example, the current time is october II.p.m., the terminal preferentially reads the resource file and displays a corresponding control according to the control attribute in the resource file. And if the current time is not within the effective time of the resource file, for example, the current time is October, eight and six night, reading other resource files in the configuration file by the terminal, and displaying corresponding controls according to the control attributes in the read resource files.
In addition, when the configuration file is changed, the terminal can also acquire the configuration file and the changed resource file and display a time configuration prompt of the changed resource file, for example, when the terminal downloads the resource file related to holidays from the server, the terminal can configure a time configuration option related to the resource file, when a user opens the option, the time configuration prompt of the resource file is displayed, the user can select the effective time of the resource file, for example, the effective time of the resource file with the effective time from half of october one to half of october seven in twelve nights can be modified into the effective time from half of october one to half of october ten in twelve nights, and the user can adjust the time according to the needs of the user, and the limitation is not performed. After the user inputs the effective time of the resource file, the input effective time can be stored according to the adjusting instruction, so that the purpose of adjusting the effective time of the resource file is achieved.
In the above embodiment, by configuring the effective time of the resource file, it can be ensured that the control attribute is preferentially read according to the resource file such as holidays only when the holidays are finished, and after the holidays are finished, the server is not required to issue the configuration file again, and only whether the effective time of the resource file is expired is required to be judged, and if the current time is not the effective time of the resource file, the control attribute is read according to other resource files in the configuration file.
In one embodiment, referring to fig. 4, fig. 4 is a flowchart of step S208 in the embodiment shown in fig. 2, and the step S208 of obtaining the control attribute corresponding to the direction of the current screen from the read current resource file may include:
s402: and acquiring the direction of the current screen.
Specifically, the direction of the current screen may be represented by an identification bit, for example, when the flag bit is 1, the current screen is identified as the horizontal direction, and when the flag bit is 0, the current screen is identified as the vertical direction. Or the direction of the current screen may also be acquired by a position sensor installed at the terminal, for example, by a gyroscope or the like.
S404: and when the direction of the current screen is horizontal, acquiring the control attribute when the current screen is horizontal from the read current resource file.
Specifically, when the direction of the current screen is horizontal, the control attribute when the current screen is horizontal is obtained from the read resource file, so that the icon of the control when the screen of the terminal is horizontal can be displayed according to the control attribute.
S406: and when the direction of the current screen is vertical, acquiring the control attribute when the current screen is vertical from the read current resource file.
Specifically, when the direction of the current screen is vertical, the control attribute when the current screen is vertical is obtained from the read resource file, so that the icon of the control when the screen of the terminal is vertical can be displayed according to the control attribute.
S408: and when the control attribute when the current screen is horizontal and the control attribute when the current screen is vertical are not acquired from the read current resource file, the control attribute corresponding to the direction of the current screen is not acquired from the read current resource file.
Specifically, when the control attribute when the current screen is horizontal is not obtained from the read current resource file, and the control attribute when the current screen is vertical is not obtained, the result shows that the current resource file is incomplete, the terminal continues to read the next resource file according to the configuration file, and obtains the control attribute when the current screen is horizontal or the control attribute when the current screen is vertical from the next resource file until the control attribute corresponding to the current screen direction is obtained from the resource file.
In the above embodiment, the corresponding control attribute may be read from the resource file according to the direction of the current screen, when the direction of the current screen is horizontal, the control attribute when the current screen is horizontal is obtained from the read current resource file, and when the direction of the current screen is vertical, the control attribute when the current screen is vertical is obtained from the read current resource file, which is simple in logic and convenient to operate.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a control attribute reading apparatus according to an embodiment, where the control attribute reading apparatus includes:
adownloading module 100, configured to obtain a configuration file identifier of a control from a server; and when the configuration file identification of the control represents the change of the configuration file, downloading the configuration file of the control from the server.
Thereading module 200 is configured to read the resource files according to the names of the resource files in the configuration file and the reading sequence of the resource files.
An obtainingmodule 300, configured to obtain a control attribute corresponding to a current screen direction from the read current resource file; and when the control attribute corresponding to the direction of the current screen is not acquired from the read current resource file, continuously reading the next resource file according to the reading sequence of the resource files in the configuration file until the control attribute is acquired.
In one embodiment, the downloading module may be further configured to obtain a resource file list from the server;
the control attribute reading device may further include:
the first judgment module is used for judging whether the local resources are lack of the resource files related in the resource file list or not; when the resource files related in the resource file list are locally absent, the absent resource files are downloaded from the server.
The second judgment module is used for judging whether a resource file with the same name and different hash value as the resource file related in the resource file list exists locally or not when the resource file related in the resource file list is not lacked locally; and when the resource files with the same names and different hash values as the resource files related in the resource file list exist locally, downloading the resource files with the same names and different hash values as the resource files related in the resource file list from the server.
In one embodiment, the reading module may include:
and the valid time acquiring unit is used for acquiring the valid time of the resource file with the valid time in the configuration file.
The reading unit is used for preferentially reading the resource file corresponding to the effective time if the current time is within the effective time of the resource file; and if the current time is not within the effective time of the resource file, reading the resource file without the effective time according to the name of the resource file in the configuration file and the reading sequence of the resource file.
In one embodiment, the control attribute reading device may further include:
and the display module is used for acquiring the changed resource files in the configuration files and displaying the time configuration prompts of the changed resource files.
And the receiving module is used for receiving an adjusting instruction which corresponds to the time configuration prompt and aims at the effective time of the changed resource file.
And the adjusting module is used for adjusting the effective time of the resource file according to the adjusting instruction.
In one embodiment, the obtaining module may include:
and the screen direction acquiring unit is used for acquiring the direction of the current screen.
The attribute acquisition unit is used for acquiring the control attribute of the current screen in the transverse direction from the read current resource file when the direction of the current screen is in the transverse direction; when the direction of the current screen is vertical, acquiring the control attribute when the current screen is vertical from the read current resource file; and when the control attribute when the current screen is horizontal and the control attribute when the current screen is vertical are not acquired from the read current resource file, the control attribute corresponding to the direction of the current screen is not acquired from the read current resource file.
The above definition of the control attribute reading device can be referred to the above definition of the control attribute reading method, and is not described herein again.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a terminal in an embodiment, where the terminal may be a conventional terminal or any other computer device, and includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the memory may include a nonvolatile storage medium and an internal memory, and the computer program may be stored in the nonvolatile storage medium, and when the processor executes the computer program, the processor implements the following steps: acquiring a configuration file identifier of a control from a server; when the configuration file identification of the control represents the change of the configuration file, downloading the configuration file of the control from the server; reading the resource files according to the names of the resource files in the configuration files and the reading sequence of the resource files; acquiring a control attribute corresponding to the direction of the current screen from the read current resource file; and when the control attribute corresponding to the direction of the current screen is not acquired from the read current resource file, continuously reading the next resource file according to the reading sequence of the resource files in the configuration file until the control attribute is acquired.
In one embodiment, the processor when executing the program may further implement the following steps: acquiring a resource file list from a server; judging whether the local resources files related to the resource file list are lacked; when the resource files related in the resource file list are lacking locally, downloading the lacking resource files from the server; when the resource files related in the resource file list are not lacked locally, judging whether the resource files with the same names and different hash values as the resource files related in the resource file list exist locally or not; and when the resource files with the same names and different hash values as the resource files related in the resource file list exist locally, downloading the resource files with the same names and different hash values as the resource files related in the resource file list from the server.
In one embodiment, the processor when executing the program may further implement the following steps: obtaining the effective time of the resource file with the effective time in the configuration file; if the current time is within the effective time of the resource file, preferentially reading the resource file corresponding to the effective time; and if the current time is not within the effective time of the resource file, reading the resource file without the effective time according to the name of the resource file in the configuration file and the reading sequence of the resource file.
In one embodiment, the processor when executing the program may further implement the following steps: the step of acquiring the input application information comprises: acquiring a changed resource file in the configuration file, and displaying a time configuration prompt of the changed resource file; receiving an adjustment instruction corresponding to the time configuration prompt and aiming at the effective time of the changed resource file; and adjusting the effective time of the resource file according to the adjusting instruction.
In one embodiment, the processor when executing the program may further implement the following steps: acquiring the direction of a current screen; when the direction of the current screen is horizontal, acquiring the control attribute when the current screen is horizontal from the read current resource file; when the direction of the current screen is vertical, acquiring the control attribute when the current screen is vertical from the read current resource file; and when the control attribute when the current screen is horizontal and the control attribute when the current screen is vertical are not acquired from the read current resource file, the control attribute corresponding to the direction of the current screen is not acquired from the read current resource file.
The above definition of the terminal may refer to the above specific definition of the control attribute reading method, and is not described herein again.
With continuing reference to fig. 6, there is also provided a computer readable storage medium having stored thereon a computer program, such as the non-volatile storage medium shown in fig. 6, wherein the program when executed by a processor implements the steps of: acquiring a configuration file identifier of a control from a server; when the configuration file identification of the control represents the change of the configuration file, downloading the configuration file of the control from the server; reading the resource files according to the names of the resource files in the configuration files and the reading sequence of the resource files; acquiring a control attribute corresponding to the direction of the current screen from the read current resource file; and when the control attribute corresponding to the direction of the current screen is not acquired from the read current resource file, continuously reading the next resource file according to the reading sequence of the resource files in the configuration file until the control attribute is acquired.
In one embodiment, the program when executed by the processor further performs the steps of: acquiring a resource file list from a server; judging whether the local resources files related to the resource file list are lacked; when the resource files related in the resource file list are lacking locally, downloading the lacking resource files from the server; when the resource files related in the resource file list are not lacked locally, judging whether the resource files with the same names and different hash values as the resource files related in the resource file list exist locally or not; and when the resource files with the same names and different hash values as the resource files related in the resource file list exist locally, downloading the resource files with the same names and different hash values as the resource files related in the resource file list from the server.
In one embodiment, the program when executed by the processor further performs the steps of: obtaining the effective time of the resource file with the effective time in the configuration file; if the current time is within the effective time of the resource file, preferentially reading the resource file corresponding to the effective time; and if the current time is not within the effective time of the resource file, reading the resource file without the effective time according to the name of the resource file in the configuration file and the reading sequence of the resource file.
In one embodiment, the program when executed by the processor further performs the steps of: the step of acquiring the input application information comprises: acquiring a changed resource file in the configuration file, and displaying a time configuration prompt of the changed resource file; receiving an adjustment instruction corresponding to the time configuration prompt and aiming at the effective time of the changed resource file; and adjusting the effective time of the resource file according to the adjusting instruction.
In one embodiment, the program when executed by the processor further performs the steps of: acquiring the direction of a current screen; when the direction of the current screen is horizontal, acquiring the control attribute when the current screen is horizontal from the read current resource file; when the direction of the current screen is vertical, acquiring the control attribute when the current screen is vertical from the read current resource file; and when the control attribute when the current screen is horizontal and the control attribute when the current screen is vertical are not acquired from the read current resource file, the control attribute corresponding to the direction of the current screen is not acquired from the read current resource file.
The above definition of the computer-readable storage medium can refer to the above specific definition of the control attribute reading method, and is not described herein again.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. The storage medium may be a magnetic disk, an optical disk, a Read-only memory (ROM), or the like.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.