CN108874466B - Control calling method, electronic device and computer readable storage medium - Google Patents

Control calling method, electronic device and computer readable storage medium Download PDF

Info

Publication number
CN108874466B
CN108874466B CN201810585990.8A CN201810585990A CN108874466B CN 108874466 B CN108874466 B CN 108874466B CN 201810585990 A CN201810585990 A CN 201810585990A CN 108874466 B CN108874466 B CN 108874466B
Authority
CN
China
Prior art keywords
control
called
version
controls
corresponding relation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810585990.8A
Other languages
Chinese (zh)
Other versions
CN108874466A (en
Inventor
孙建华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Oppo Chongqing Intelligent Technology Co Ltd
Original Assignee
Oppo Chongqing Intelligent 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 Oppo Chongqing Intelligent Technology Co Ltd filed Critical Oppo Chongqing Intelligent Technology Co Ltd
Priority to CN201810585990.8A priority Critical patent/CN108874466B/en
Publication of CN108874466A publication Critical patent/CN108874466A/en
Application granted granted Critical
Publication of CN108874466B publication Critical patent/CN108874466B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

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

Abstract

The embodiment of the application provides a control calling method, an electronic device and a computer readable storage medium, which relate to the technical field of communication, and the method comprises the following steps: when a control calling task is triggered, determining a control of a target version from preset controls to be called of a plurality of different versions by inquiring a corresponding relation table, wherein the control of the target version is compatible with a calling program, and the corresponding relation between a plurality of programs and the controls of respective compatible or incompatible versions is recorded in the corresponding relation table; and calling the control of the target version. The control calling method, the electronic device and the computer readable storage medium can solve the problems of program screen flashing, crash and the like caused by incompatible versions of the controls.

Description

Control calling method, electronic device and computer readable storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a control invoking method, an electronic device, and a computer-readable storage medium.
Background
With the development of mobile terminals and network technologies, the popularity of smart mobile terminals such as smart phones and tablet computers is increasing. A UI (User Interface) Interface is an Interface through which a User performs human-computer interaction with an intelligent mobile terminal. Currently, the UI interface uses WebView (web view) control. With the continuous improvement of the terminal operating system version, the application program is continuously upgraded. However, the upgrading of programs is fast or slow, which results in that the system versions corresponding to the programs installed in a terminal are often asynchronous, some programs may correspond to the early version, and some programs may correspond to the latest version. So that the problem of fragmentation of the terminal operating system is more and more serious. Along with this, the terminal starts to generate various problems of program flashing, crash (crash) and the like caused by the incompatibility of the WebView control versions. However, there is no effective method for solving the problems of program screen flashing and crashing caused by version incompatibility in the industry at present.
Disclosure of Invention
The embodiment of the application provides a control calling method, an electronic device and a computer readable storage medium, which can be used for solving the problems of program screen flashing, crash and the like caused by incompatible versions of the control.
An embodiment of the present application provides a control calling method, which is applied to an electronic device, and includes: when a control calling task is triggered, determining a control of a target version from preset controls to be called of a plurality of different versions by inquiring a corresponding relation table, wherein the control of the target version is compatible with a calling program, and the corresponding relation between a plurality of programs and the controls of respective compatible or incompatible versions is recorded in the corresponding relation table; and calling the control of the target version.
An aspect of an embodiment of the present application further provides an electronic device, including: the query module is used for determining a control of a target version from preset controls to be called of a plurality of different versions by querying a corresponding relation table when the control calling task is triggered, wherein the control of the target version is compatible with a calling program, and the corresponding relation table records the corresponding relation between a plurality of programs and the controls of respective compatible or incompatible versions; and the calling module is used for calling the control of the target version.
An aspect of an embodiment of the present application further provides an electronic device, including: the control calling method is characterized in that the control calling method provided by the embodiment of the application is realized when the processor executes the computer program.
An aspect of the present embodiment further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor, and the method for invoking a control is implemented.
In the embodiments, the controls of the plurality of different versions and the corresponding relationship table are preset in the electronic device, when the application program needs to call the controls, the controls of the target version compatible with the target program are inquired and called according to the corresponding relationship between the plurality of programs recorded in the corresponding relationship table and the controls of the respective compatible versions to be called by the application program, and the controls of the plurality of different versions are preset, so that the application program can call the appropriate controls in a targeted manner, thereby solving the problems of screen flashing and collapse of the program caused by the incompatibility of the control versions and improving the running stability of the program.
Drawings
Fig. 1 is a schematic diagram illustrating an implementation flow of a control calling method according to an embodiment of the present application;
fig. 2 is a schematic diagram illustrating an implementation flow of a control calling method according to another embodiment of the present application;
fig. 3 is a schematic diagram of a control selection interface in a control invoking method according to another embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to another embodiment of the present application;
fig. 6 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application
Fig. 7 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, features and advantages of the present invention more apparent and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Please refer to fig. 1, which is a schematic diagram illustrating an implementation flow of a control invoking method according to an embodiment of the present application. The control calling method provided by the embodiment can be applied to an electronic device provided with an application program which needs to call the control during running. As shown in fig. 1, the method mainly comprises the following steps:
101. when a control is triggered to call a task, determining a control compatible with a target version of a calling program from preset controls to be called of a plurality of different versions by inquiring a corresponding relation table;
the control is also called a component or a member, is commonly called a third-party development control, and is a reusable functional module in software. In this embodiment, the control triggered and invoked may be a WebView control. WebView is a control used to expose a Web (Web) page.
A plurality of WebView controls with different versions and a corresponding relation table can be preset in the electronic device. The corresponding relation table records the corresponding relation between a plurality of application programs and the WebView controls of the compatible or incompatible versions of the application programs. The electronic device may obtain the correspondence table from a data acquisition server or a server provided by a manufacturer.
Optionally, the correspondence relation between one or more applications and a plurality of different controls of respective compatible versions and storage locations thereof may be recorded in the correspondence relation table. In an actual application example, the form of the correspondence table may be a white list as shown in table 1 below.
TABLE 1
Program identification Control and compatible version number thereof Storage location
Application program 1 WebView 1.0 data/system/webview
Application program 1 TextView 2.0 data/system/TextView
Application 2 WebView 5.0 system/webview
Application 2 TextView 3.0 system/TextView
…… …… ……
The calling program is a program which needs to call the control to realize a corresponding function, such as various webpage client programs (such as a WeChat client and a Sina microblog client) which need to call the WebView control to display a webpage, a playing client program which needs to call the multimedia playing control, a searching client program which needs to call the searching control to provide a searching entry for a user, and the like.
When the calling program needs to realize the function corresponding to the control, the control calling task is triggered based on the preset triggering condition being met or the preset operation of the user, such as: the operation that a user clicks a certain network link, the operation that a calling program loads a home page after being started, and the like.
Specifically, when the correspondence between multiple programs and the respective compatible versions of the control are recorded in the correspondence table, the correspondence table may be regarded as a white list. When the control calling task is triggered, acquiring identification information of a calling program, such as: the name and version number of the calling program. And then, inquiring version identification information of the target control to be called corresponding to the identification information in a white list according to the acquired identification information. Further, the storage location of the target control is obtained by querying in a white list according to the version identification information. Optionally, the white list may also record correspondence between the plurality of applications and storage locations of the plurality of different controls of the respective compatible versions. And inquiring the corresponding relation according to the identification information of the calling program, and directly obtaining the storage position of the target control to be called.
When the correspondence between the plurality of programs and the respective incompatible versions of the control is recorded in the correspondence table, the correspondence table may be regarded as a blacklist. When the control calling task is triggered, acquiring identification information of a calling program, such as: the name and version number of the calling program. And then, inquiring the identification information of the control of the invokable version corresponding to the identification information in the blacklist according to the acquired identification information. Then, according to the identification information, the control of the invokable version is determined.
102. And calling the control of the target version.
According to the control calling method provided by the embodiment, the controls with different versions and the corresponding relation table are preset in the electronic device, when the application program needs to call the controls, the controls of the target version compatible with the target program are inquired and called according to the corresponding relation between the programs recorded in the corresponding relation table and the controls of the respective compatible versions to be called by the application program, and the controls with different versions are preset, so that the application program can call the appropriate controls in a targeted manner, the problems of screen flashing and collapse of the program caused by incompatibility of the control versions can be solved, and the running stability of the program is improved.
Please refer to fig. 2, which is a schematic diagram illustrating an implementation flow of a control invoking method according to another embodiment of the present application. The control calling method provided by the embodiment can be applied to an electronic device provided with an application program which needs to call the control during running. As shown in fig. 2, the method mainly includes the following steps:
201. when a control is triggered to call a task, determining a control compatible with a target version of a calling program from preset controls to be called of a plurality of different versions by inquiring a corresponding relation table;
202. calling the control of the target version;
step 201 and step 202 are the same as step 101 and step 102 in the embodiment shown in fig. 1, and are not described again here.
Optionally, the plurality of different versions of the control include: the control of the common version is stored in the storage space which is limited to be deleted, and the control of the non-common version is stored in the storage space which is not limited to be deleted. A universal version generally refers to a version that can be compatible with most applications. A non-generic version generally refers to a version that is only compatible with a portion of the widget application.
The deleted storage space is limited, that is, the data in the storage space cannot be deleted unless formatted, or can be deleted only by a program with a specific authority, such as a program with a supervisor or administrator authority. The deleted storage space is not limited, i.e. the data in the storage space can be deleted without specific rights. Taking Android System as an example, the deleted storage space is limited, such as System partition, and is not limited, such as Data partition.
Taking a WebView control as an example, in an actual application example, 5 mainstream versions of WebView controls can be built in a mobile phone, 2 of the WebView controls are built in a system partition, and the two are tested, so that the WebView controls can cover the WebView versions of most application programs on the market. The other 3 WebViews are built into the data partition, such as into the data/system/WebView directory.
In the test process, the related compatibility problem of the WebView can be written into the corresponding relation table for control, two WebView versions of the system partition are preferentially selected, and if the problem which cannot be solved by the two WebView versions, the path of the corresponding relation table is changed into the WebView version of the data partition.
Optionally, in another embodiment of the present application, when the control is triggered to invoke the task, the corresponding relationship table is obtained. If the correspondence table is obtained, the step 201 of determining the control compatible with the target version of the calling program from the preset controls to be called of the plurality of different versions by querying the correspondence table is executed. If the corresponding relation table is not obtained, sequentially calling a plurality of to-be-called controls of different versions according to the sequence that the deleted storage space is limited first and then the deleted storage space is not limited until finding the control of the version which can be normally called. And then, writing the corresponding relation between the calling program and the control of the version which can be normally called into the corresponding relation table. The control of the version which can be called normally refers to the control which can be called and the application program can not flash or crash after being called. In this way, under the scene without the corresponding relation table, different controls are switched and called automatically according to the size of the universality until a proper control is found, so that the flexibility of control calling can be improved, and even under the premise of no available corresponding relation table, the calling of the control with the best version can be realized, thereby further ensuring the stability of program operation and realizing the automatic improvement of the corresponding relation table.
Further, when the corresponding relationship between the calling program and the control of the version that can be normally called is written into the corresponding relationship table, the corresponding relationship may also be sent to the server, so that the server generates the update data of the corresponding relationship table according to the corresponding relationship, and pushes the update data to other electronic devices.
203. When the preset operation of a user is detected, if the current interface is the interface of the control to be called, outputting a control selection interface, and outputting a control list in the control selection interface;
specifically, in the interface of the control to be called, the user can select which version of the control to call through preset operation. Optionally, the interface of the control to be called may be opened in the calling program, or may be opened in a non-calling program, for example, opened on a desktop, according to an operation of a user clicking a shortcut setting menu or button or icon of the control to be called. The preset operation may be, for example, an operation of simultaneously pressing a volume up-down key. In practical application, the preset operation can be set according to a user-defined operation of a user.
The control selection interface is provided with option boxes of controls to be called of different versions, and a control list is output. The control list records description information of a plurality of different versions of controls to be called. The interface of the control to be called can be a calling interface or an interactive interface of the control. The description information of the control to be called may include, for example, version identification information of a plurality of different versions of the control to be called. Furthermore, description information and the like of application programs compatible with the control to be called of different versions can be included.
Optionally, the description information of the to-be-called control of each version may be sorted according to the compatibility relationship between the to-be-called control of each version and the application program that outputs the control selection interface recorded in the correspondence table, and then, according to the sorting result, each piece of description information is displayed in the control selection interface, for example: and displaying the description information of the to-be-called control with the version with the compatible relationship at the upper part, and displaying the description information of the to-be-called control with the version without the compatible relationship at the lower part. Or, highlighting the description information of the to-be-called control with the version having the compatible relationship in the control selection interface, such as highlighting, bolding or flashing.
204. Responding to a switching instruction triggered by the user on the control selection interface, and switching and calling the control of the version pointed by the switching instruction in the control list;
205. writing the corresponding relation of the control of the version pointed by the switching instruction triggered at the last time before the control selection interface is closed into the corresponding relation table;
taking the WebView control as an example, when detecting that the user presses the volume up-down key at the same time, the system identifies whether the current interface is the interface of the WebView control, if so, a control selection interface containing a WebView option box shown in figure 3 is popped up for the user to select the WebView control of the version to be switched and called. As shown in FIG. 3, a list of different WebView controls with different callable versions is also output in the control selection interface. The list may contain description information for different versions of WebView controls that were originally preset in the electronic device. And switching and calling the corresponding WebView controls of different versions according to each switching instruction triggered by the user on the control selection interface until the control selection interface is closed in response to the triggered instruction for closing the control selection interface. And simultaneously writing the corresponding relation between the version control pointed by the switching instruction triggered by the user for the last time before the control selection interface is closed and the application program (namely, a calling program) where the interface of the WebView control is located into the corresponding relation table.
It should be noted that fig. 3 is only an example, and in practical applications, the specific form of the control selection interface may not be limited thereto.
It can be understood that the list may be obtained from a server, or obtained by scanning each version of the to-be-called control stored in the storage space when the control calling method provided by the present application is executed for the first time.
206. And regularly detecting whether the control of the non-recorded version in the corresponding relation table exists in the controls to be called of the multiple different versions in the target storage space, and deleting the control of the non-recorded version from the target storage space.
The target storage space may be, for example, all storage spaces or a specified one or more storage spaces. Preferably, the target storage space is a storage space that is not limited to deletion. Taking a Data partition and a white list as an example, after the mobile phone runs for half a year, the system identifies whether the WebView controls of the multiple versions of the Data partition are used, namely whether the WebView controls are in the white list or not, and if the WebView controls are not in the white list, the system deletes the WebView controls, so that the Data partition space is saved. Like this, through waiting to transfer the control of idle version in regularly clearing up the memory space, can improve the utilization ratio of memory space.
Optionally, in another embodiment of the present application, it may also be periodically detected, in the target storage space, whether a control of an un-invoked version exceeding a preset time length exists in a plurality of different versions of controls to be invoked, and the control of the un-invoked version exceeding the preset time length is deleted from the target storage space.
Optionally, when the control determined to be invoked is invoked, if the control determined to be invoked is not obtained locally, the control determined to be invoked is downloaded from the server and invoked. And determining that the called control comprises the control of the target version and the control of the version pointed by the switching instruction. Optionally, the control invoked by the determination is stored in a storage space that does not limit deletion. The control determined to be called is stored in the non-system storage space which is not limited to be deleted, so that the influence of frequent writing and deletion of data on system data and system operation stability can be avoided.
It can be understood that, when the unused version of the control to be called is deleted from the target storage space, the control list is not modified correspondingly, that is, the description information of the deleted version of the control is still retained in the control list. Therefore, if a new application program which is not in the white list is installed in the system, the user can select the to-be-called control which is deleted in the calling control list for the newly installed application program in the control selection interface.
Optionally, the update data of the corresponding relationship table is obtained from the server, the update data is updated in the corresponding relationship table, and the data of the new version of the control to be called included in the update data is updated to the control list. For example, after a mobile phone of a manufacturer is on the market, if some problems are not tested completely, or problems such as program flashing or crash and the like of a new application program caused by compatibility of a WebView control appear in the market, the manufacturer can push update data of a WebView control white list to each electronic device in real time through a server, and the problem of compatibility of the new application program and the WebView control is solved in real time. Wherein the update data may include, but is not limited to: relationship adjustment data and relationship addition data. The relationship adjustment data is used for adjusting the recorded corresponding relationship in the corresponding relationship table. The relationship newly added data is used for adding the corresponding relationship between the new application program and the control of the compatible or incompatible version thereof in the corresponding relationship table, or adding the recorded corresponding relationship between the application program and the control of the compatible or incompatible new version thereof in the corresponding relationship table. And when the white list is updated, the related information data of the new version control in the newly added relation data can be updated in the control list so as to be used when the user switches and calls.
Preferably, in order to save space and traffic occupied by data transmission, when the update data of the corresponding relationship is pushed, the data of the new version of the control to be invoked is not pushed at the same time. And when the new version of the control to be called needs to be called, downloading the data of the new version of the control to be called from the server.
For example, assume that 5 versions of WebView controls are built in a mobile phone, and when update data of a white list pushed by a server is received, if the update data includes a 6 th version of WebView control, the relevant information of the 6 th version of WebView control is updated to a control list. When the preset operation of the user is detected, if the current interface is the interface of the WebView control, outputting a control selection interface, and outputting an updated control list in the control selection interface. And simultaneously, the control selection interface also has an option of the WebView control of the 6 th version, and after the user clicks the option, the version of the WebView control is downloaded and placed in a data/system/WebView directory of the mobile phone, so that the user can select and use the WebView control.
Similarly, after some WebView controls in the mobile phone of the user are deleted after half a year, when the compatibility problem of the WebView controls is encountered later, the WebView controls can be called in a downloading mode.
According to the control calling method provided by the embodiment, the controls with different versions and the corresponding relation table are preset in the electronic device, when the application program needs to call the controls, the controls of the target version compatible with the target program are inquired and called according to the corresponding relation between the programs recorded in the corresponding relation table and the controls of the respective compatible versions to be called by the application program, and the controls with different versions are preset, so that the application program can call the appropriate controls in a targeted manner, the problems of screen flashing and collapse of the program caused by incompatibility of the control versions can be solved, and the running stability of the program is improved.
Please refer to fig. 4, which is a schematic structural diagram of an electronic device according to an embodiment of the present application. The electronic device can be used for implementing the control calling method provided by the embodiment shown in fig. 1. As shown in fig. 4, the electronic device mainly includes: a query module 401 and a call module 402.
The query module 401 is configured to determine a control of a target version from preset controls to be called of multiple different versions by querying a corresponding relationship table when a control calling task is triggered, where the control of the target version is compatible with a calling program, and the corresponding relationship between multiple programs and the controls of respective compatible or incompatible versions is recorded in the corresponding relationship table;
and a calling module 402, configured to call the control of the target version.
It should be noted that, in the embodiment of the electronic device illustrated in fig. 4, the division of the functional modules is only an example, and in practical applications, the above functions may be distributed by different functional modules according to needs, for example, configuration requirements of corresponding hardware or convenience of implementation of software, that is, the internal structure of the electronic device is divided into different functional modules to complete all or part of the functions described above. In practical applications, the corresponding functional modules in this embodiment may be implemented by corresponding hardware, or may be implemented by corresponding hardware executing corresponding software. The above description principles can be applied to various embodiments provided in the present specification, and are not described in detail below.
For a specific process of each function module in the electronic device provided in this embodiment to implement each function, please refer to the specific content described in the embodiment shown in fig. 1, which is not described herein again.
According to the electronic device provided by the embodiment, the controls with different versions and the corresponding relation table are preset in the electronic device, when the application program needs to call the controls, the controls of the target version compatible with the target program are inquired and called according to the corresponding relation between the programs recorded in the corresponding relation table and the controls of the respective compatible versions to be called by the application program, and the controls with different versions are preset, so that the application program can call the appropriate controls in a targeted manner, the problems of screen flashing and collapse of the program caused by incompatibility of the control versions can be solved, and the running stability of the program is improved.
Please refer to fig. 5, which is a schematic structural diagram of an electronic device according to another embodiment of the present application. The electronic device can be used for implementing the control calling method provided by the embodiments shown in fig. 1 to 3. Unlike the embodiment shown in fig. 4, as shown in fig. 5, in the present embodiment:
further, the electronic device further includes:
the output module 501 is configured to, when a preset operation of a user is detected, if a current interface is an interface of the control to be called, output a control selection interface, and output a control list in the control selection interface, where the control list records description information of a plurality of controls to be called in different versions;
a switching and calling module 502, configured to respond to a switching instruction triggered by the user on the control selection interface, and switch and call a control of the version pointed by the switching instruction in the control list;
and an editing module 503, configured to write the correspondence between the version of the control pointed by the last triggered switching instruction and the calling program into the correspondence table before the control selection interface is closed.
Further, the plurality of different versions of controls include a plurality of different common versions of controls and a plurality of non-common versions of controls, the common versions of controls are stored in the storage space where deletion is limited, and the non-common versions of controls are stored in the storage space where deletion is not limited.
Further, the electronic device further includes:
an obtaining module 504, configured to obtain the correspondence table when the control is triggered to invoke the task;
the obtaining module 504 is further configured to, if the corresponding relationship table is obtained, trigger the querying module to execute a step of determining a control compatible with the target version of the calling program from a plurality of preset controls to be called of different versions by querying the corresponding relationship table;
the calling module 402 is further configured to, if the obtaining module 504 does not obtain the correspondence table, sequentially call a plurality of to-be-called controls of different versions according to an order of the storage space which is deleted in the limited manner and the storage space which is not deleted in the unlimited manner, until a control of a version which can be normally called is found;
the editing module 503 is further configured to write the correspondence between the calling program and the control of the version that can be called normally into the correspondence table.
Further, the electronic device further includes:
a detection module 505, configured to periodically detect, in a target storage space, whether a control of an unrecorded version in the correspondence table exists in a plurality of to-be-called controls of different versions, and delete the control of the unrecorded version from the target storage space; alternatively, the first and second electrodes may be,
the detecting module 505 is further configured to periodically detect, in the target storage space, whether a control of an un-invoked version exceeding a preset time length exists in the multiple different versions of the control to be invoked, and delete the control of the un-invoked version exceeding the preset time length from the target storage space.
Further, the electronic device further includes:
a downloading module 506, configured to, when the calling module 402 or the handover calling module 502 calls a control that is determined to be called, if the control that is determined to be called is not obtained locally, download the control that is determined to be called from a server and call the control, where the control that is determined to be called is stored in a storage space where deletion is not limited;
the updating module 507 is configured to obtain the update data of the corresponding relationship table from the server, update the update data in the corresponding relationship table, and update the data of the new version of the control to be called included in the update data into the control list.
For a specific process of each function module in the control invoking device provided in this embodiment to implement each function, please refer to the specific contents described in the embodiments shown in fig. 1 to fig. 4, which is not described herein again.
According to the electronic device provided by the embodiment, the controls with different versions and the corresponding relation table are preset in the electronic device, when the application program needs to call the controls, the controls of the target version compatible with the target program are inquired and called according to the corresponding relation between the programs recorded in the corresponding relation table and the controls of the respective compatible versions to be called by the application program, and the controls with different versions are preset, so that the application program can call the appropriate controls in a targeted manner, the problems of screen flashing and collapse of the program caused by incompatibility of the control versions can be solved, and the running stability of the program is improved.
Referring to fig. 6, fig. 6 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application.
The electronic apparatus described in this embodiment includes:
a memory 801, a processor 802, and a computer program stored on the memory 801 and executable on the processor 802, wherein the processor 802 implements the control calling method described in the embodiments of fig. 1 to 3 when executing the computer program.
Further, the electronic device further includes:
at least one input device 803 and at least one output device 804.
The memory 801, the processor 802, the input device 803, and the output device 804 are connected by a bus 805.
The input device 803 may be a camera, a touch panel, a physical button, or the like. The output device 804 may specifically be a display screen.
The Memory 801 may be a high-speed Random Access Memory (RAM) Memory or a non-volatile Memory (non-volatile Memory), such as a disk Memory. The memory 801 is used to store a set of executable program code, and the processor 802 is coupled to the memory 801.
Further, an embodiment of the present application also provides a computer-readable storage medium, where the computer-readable storage medium may be provided in an electronic device in the foregoing embodiments, and the computer-readable storage medium may be the memory in the foregoing embodiment shown in fig. 6. The computer readable storage medium has stored thereon a computer program, which when executed by a processor implements the control calling method described in the embodiments of fig. 1 to 3.
For example, the electronic device may be any of various types of computer system apparatuses that are mobile or portable and perform wireless communication. In particular, the electronic apparatus may be a mobile phone or a smart phone (e.g., iPhone (TM) -based phone), a Portable game device (e.g., Nintendo DS (TM), PlayStation Portable (TM), Gameboy Advance (TM), iPhone (TM)), a laptop, a PDA, a Portable internet appliance, a music player and a data storage device, other handheld devices and a head-mounted device (HMD) such as a watch, a headset, a pendant, a headset, etc., and other wearable devices (e.g., electronic glasses, electronic clothes, an electronic bracelet, an electronic necklace, an electronic tattoo, an electronic device, or a smart watch).
The electronic apparatus may also be any of a number of electronic devices including, but not limited to, cellular phones, smart phones, other wireless communication devices, personal digital assistants, audio players, other media players, music recorders, video recorders, cameras, other media recorders, radios, medical devices, vehicle transportation equipment, calculators, programmable remote controllers, pagers, laptop computers, desktop computers, printers, netbook computers, Personal Digital Assistants (PDAs), Portable Multimedia Players (PMPs), moving picture experts group (MPEG-1 or MPEG-2) audio layer 3(MP3) players, portable medical devices, and digital cameras and combinations thereof.
In some cases, the electronic device may perform a variety of functions (e.g., playing music, displaying video, storing pictures, and receiving and sending telephone calls). If desired, the electronic apparatus 0 may be a portable device such as a cellular telephone, media player, other handheld device, wristwatch device, pendant device, earpiece device, or other compact portable device.
As shown in fig. 7, the electronic device 10 may include control circuitry, which may include storage and processing circuitry 30. The storage and processing circuitry 30 may include memory, such as hard drive memory, non-volatile memory (e.g., flash memory or other electronically programmable erase limit memory used to form solid state drives, etc.), volatile memory (e.g., static or dynamic random access memory, etc.), and so forth, although the embodiments of the present application are not limited thereto. Processing circuitry in the storage and processing circuitry 30 may be used to control the operation of the electronic device 10. The processing circuitry may be implemented based on one or more microprocessors, microcontrollers, digital signal processors, baseband processors, power management units, audio codec chips, application specific integrated circuits, display driver integrated circuits, and the like.
The storage and processing circuitry 30 may be used to run software within the electronic device 10 such as, for example, an Internet browsing application, a Voice Over Internet Protocol (VOIP) telephone call application, an email application, a media playing application, operating system functions, etc. Such software may be used to perform control operations such as, for example, camera-based image capture, ambient light measurement based on an ambient light sensor, proximity sensor measurement based on a proximity sensor, information display functionality based on status indicators such as status indicator lights of light emitting diodes, touch event detection based on a touch sensor, functionality associated with displaying information on multiple (e.g., layered) displays, operations associated with performing wireless communication functions, operations associated with collecting and generating audio signals, control operations associated with collecting and processing button press event data, and other functions in the electronic device 10, and the like, without limitation of the embodiments of the present application.
The electronic device 10 may also include input-output circuitry 42. The input-output circuitry 42 may be used to enable the electronic device 10 to enable input and output of data, i.e., to allow the electronic device 10 to receive data from external devices and also to allow the electronic device 10 to output data from the electronic device 10 to external devices. The input-output circuitry 42 may further include the sensor 32. The sensors 32 may include ambient light sensors, optical and capacitive based proximity sensors, touch sensors (e.g., optical based touch sensors and/or capacitive touch sensors, where the touch sensors may be part of a touch display screen or may be used independently as a touch sensor structure), acceleration sensors, and other sensors, among others.
Input-output circuitry 42 may also include one or more displays, such as display 14. The display 14 may include one or a combination of liquid crystal displays, organic light emitting diode displays, electronic ink displays, plasma displays, displays using other display technologies. The display 14 may include an array of touch sensors (i.e., the display 14 may be a touch display screen). The touch sensor may be a capacitive touch sensor formed by a transparent touch sensor electrode (e.g., an Indium Tin Oxide (ITO) electrode) array, or may be a touch sensor formed using other touch technologies, such as acoustic wave touch, pressure sensitive touch, resistive touch, optical touch, and the like, and the embodiments of the present application are not limited thereto.
The electronic device 10 may also include an audio component 36. The audio component 36 may be used to provide audio input and output functionality for the electronic device 10. Audio components 36 in electronic device 10 may include speakers, microphones, buzzers, tone generators, and other components for generating and detecting sound.
The communication circuitry 38 may be used to provide the electronic device 10 with the ability to communicate with external devices. The communication circuit 38 may include analog and digital input-output interface circuits, and wireless communication circuits based on radio frequency signals and/or optical signals. The wireless communication circuitry in communication circuitry 38 may include radio-frequency transceiver circuitry, power amplifier circuitry, low noise amplifiers, switches, filters, and antennas. For example, the wireless Communication circuitry in Communication circuitry 38 may include circuitry to support Near Field Communication (NFC) by transmitting and receiving Near Field coupled electromagnetic signals. For example, the communication circuitry 38 may include a near field communication antenna and a near field communication transceiver. The communications circuitry 38 may also include a cellular telephone transceiver and antenna, a wireless local area network transceiver circuit and antenna, and the like.
The electronic device 10 may further include a battery, power management circuitry, and other input-output units 40. The input-output unit 40 may include buttons, joysticks, click wheels, scroll wheels, touch pads, keypads, keyboards, cameras, light emitting diodes and other status indicators, etc.
A user may enter commands through input-output circuitry 42 to control the operation of electronic device 10, and may use output data of input-output circuitry 42 to enable receipt of status information and other outputs from electronic device 10.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and in actual implementation, there may be other divisions, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a readable storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned readable storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
It should be noted that, for the sake of simplicity, the above-mentioned method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present application is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In view of the above description of the control invoking method, the electronic device and the computer readable storage medium provided by the present application, those skilled in the art will appreciate that the present application is not limited to the above description.

Claims (9)

1. A control calling method is applied to an electronic device and is characterized by comprising the following steps:
when a control calling task is triggered, determining a control of a target version from preset controls to be called of a plurality of different versions by inquiring a corresponding relation table, wherein the control of the target version is compatible with a calling program, and the corresponding relation between a plurality of programs and the controls of respective compatible or incompatible versions is recorded in the corresponding relation table;
calling the control of the target version;
detecting whether a control of a non-recorded version in the corresponding relation table exists in a plurality of controls to be called of different versions in a target storage space at regular intervals, and deleting the control of the non-recorded version from the target storage space; or, periodically detecting whether a control of a version which is not called and exceeds a preset time length exists in a plurality of different versions of controls to be called in the target storage space, and deleting the control of the version which is not called and exceeds the preset time length from the target storage space;
when the control which is determined to be called is called, if the control which is determined to be called cannot be obtained from the local, downloading the control which is determined to be called from a server and calling, wherein the control which is determined to be called is stored in a storage space which is not limited to be deleted; wherein the target storage space is the unlimited deleted storage space;
and acquiring the update data of the corresponding relation table from the server, updating the update data in the corresponding relation table, and updating the data of the new version of the control to be called contained in the update data into a control list.
2. The method of claim 1, wherein when a preset operation of a user is detected, if a current interface is the interface of the control to be called, a control selection interface is output, and a control list is output in the control selection interface, wherein the control list records description information of a plurality of different versions of the control to be called;
responding to a switching instruction triggered by the user on the control selection interface, and switching and calling the control of the version pointed by the switching instruction in the control list;
and writing the corresponding relation between the control of the version pointed by the switching instruction triggered at the last time and the calling program into the corresponding relation table before the control selection interface is closed.
3. The method of claim 1, wherein the plurality of different versions of controls include a plurality of different common versions of controls and a plurality of non-common versions of controls, the common versions of controls being stored in a storage space where deletion is limited, and the non-common versions of controls being stored in a storage space where deletion is not limited.
4. The method of claim 3, wherein the method further comprises:
when the control is triggered to call the task, acquiring the corresponding relation table;
if the corresponding relation table is obtained, executing the step of determining the control of the target version from the preset controls to be called of a plurality of different versions by inquiring the corresponding relation table;
if the corresponding relation table is not obtained, sequentially calling a plurality of to-be-called controls of different versions according to the sequence of the storage space which is limited to be deleted and the storage space which is not limited to be deleted, until finding the control of the version which is normally called;
and writing the corresponding relation between the calling program and the control of the normally called version into the corresponding relation table.
5. An electronic device, comprising:
the query module is used for determining a control of a target version from preset controls to be called of a plurality of different versions by querying a corresponding relation table when the control calling task is triggered, wherein the control of the target version is compatible with a calling program, and the corresponding relation table records the corresponding relation between a plurality of programs and the controls of respective compatible or incompatible versions;
the calling module is used for calling the control of the target version;
the detection module is used for periodically detecting whether the control of the version without record in the corresponding relation table exists in the controls to be called of a plurality of different versions in the target storage space and deleting the control of the version without record from the target storage space; alternatively, the first and second electrodes may be,
the detection module is further configured to periodically detect whether a control of an un-invoked version exceeding a preset time length exists in a plurality of different versions of controls to be invoked in the target storage space, and delete the control of the un-invoked version exceeding the preset time length from the target storage space;
the electronic device further includes:
the downloading module is used for downloading the control which is determined to be called from a server and calling the control if the control which is determined to be called is not obtained from the local place when the calling module calls the control which is determined to be called, and the control which is determined to be called is stored in a storage space which is not limited to be deleted; wherein the target storage space is the unlimited deleted storage space;
and the updating module is used for acquiring the updating data of the corresponding relation table from the server, updating the updating data in the corresponding relation table, and updating the data of the new version of the control to be called contained in the updating data into a control list.
6. The electronic device of claim 5, wherein the electronic device further comprises:
the output module is used for outputting a control selection interface and outputting a control list in the control selection interface if the current interface is the interface of the control to be called when the preset operation of the user is detected, wherein the control list records the description information of a plurality of different versions of the control to be called;
the switching and calling module is used for responding to a switching instruction triggered by the user on the control selection interface and switching and calling the control of the version pointed by the switching instruction in the control list;
and the editing module is used for writing the corresponding relation between the version of the control pointed by the switching instruction triggered at the last time and the calling program into the corresponding relation table before the control selection interface is closed.
7. The electronic device of claim 6, wherein the plurality of different versions of controls include a plurality of different generic versions of controls and a plurality of non-generic versions of controls, the generic version of controls being stored in a storage space that restricts deletion and the non-generic version of controls being stored in a storage space that does not restrict deletion;
the electronic device further includes:
the acquisition module is used for acquiring the corresponding relation table when the control is triggered to call the task;
the obtaining module is further configured to trigger the query module to execute the step of determining a control of a target version from a plurality of preset controls to be called of different versions by querying the corresponding relationship table if the corresponding relationship table is obtained;
the calling module is further configured to, if the obtaining module does not obtain the correspondence table, sequentially call a plurality of to-be-called controls of different versions according to the sequence of the storage space with limited deletion first and the storage space with unlimited deletion later until the control of the version which is normally called is found;
the editing module is further configured to write the correspondence between the calling program and the normally called version of the control into the correspondence table.
8. An electronic device, comprising: memory, processor and computer program stored on the memory and executable on the processor, characterized in that the processor implements the control invocation method according to any of claims 1 to 4 when executing the computer program.
9. A computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements a control invocation method according to any of claims 1-4.
CN201810585990.8A 2018-06-08 2018-06-08 Control calling method, electronic device and computer readable storage medium Active CN108874466B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810585990.8A CN108874466B (en) 2018-06-08 2018-06-08 Control calling method, electronic device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810585990.8A CN108874466B (en) 2018-06-08 2018-06-08 Control calling method, electronic device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN108874466A CN108874466A (en) 2018-11-23
CN108874466B true CN108874466B (en) 2021-10-29

Family

ID=64338559

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810585990.8A Active CN108874466B (en) 2018-06-08 2018-06-08 Control calling method, electronic device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN108874466B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110764789B (en) * 2019-10-09 2023-07-18 Oppo(重庆)智能科技有限公司 Process control method and device, storage medium and electronic equipment
CN110852259A (en) * 2019-11-08 2020-02-28 深圳前海微众银行股份有限公司 Living body identification method, living body identification system, living body identification apparatus, living body identification device, and computer-readable storage medium
CN111192578B (en) * 2019-12-28 2023-04-07 惠州Tcl移动通信有限公司 Application control method and device, storage medium and electronic equipment
CN112152839A (en) * 2020-08-21 2020-12-29 厦门汉印电子技术有限公司 Method, device, equipment and storage medium for communicating with electronic scale
CN112698885B (en) * 2021-01-04 2023-07-21 联想(北京)有限公司 Method and device for operating
CN113805797B (en) * 2021-06-17 2023-04-28 荣耀终端有限公司 Processing method of network resource, electronic equipment and computer readable storage medium
CN113836540A (en) * 2021-09-02 2021-12-24 青岛海信移动通信技术股份有限公司 Method, apparatus, storage medium, and program product for managing application rights
CN114780190B (en) * 2022-04-13 2023-12-22 脸萌有限公司 Message processing method, device, electronic equipment and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1424244B1 (en) * 2002-11-29 2010-05-26 Xanavi Informatics Corporation Data access method and data access system for accessing data at on-vehicle information device, a computer program causing the device to carry out the method, a computer readable medium or a signal carrying a respective computer program, a respective device for performing the method and a respective device operable in the system
CN103235722A (en) * 2013-04-19 2013-08-07 南京莱斯信息技术股份有限公司 ActiveX control framework technology achieving method
CN103353836A (en) * 2013-04-01 2013-10-16 深圳市东微智能科技有限公司 Method for realizing functions of programmable reusable control
CN103823671A (en) * 2013-12-26 2014-05-28 远光软件股份有限公司 Control establishing method, control invoking method and control invoking system
CN104714827A (en) * 2015-03-31 2015-06-17 北京奇虎科技有限公司 Plug-in update method and device
CN104717301A (en) * 2015-03-27 2015-06-17 北京奇虎科技有限公司 Plug-in download method and device
CN106775754A (en) * 2016-12-30 2017-05-31 百度在线网络技术(北京)有限公司 The compatible processing method and processing device of application
CN107506118A (en) * 2017-08-09 2017-12-22 广州市动景计算机科技有限公司 Feature card arrangement collocation method, device and terminal device
WO2018018694A1 (en) * 2016-07-29 2018-02-01 宇龙计算机通信科技(深圳)有限公司 Control method of application program, control device and terminal
CN108021583A (en) * 2016-10-28 2018-05-11 阿里巴巴集团控股有限公司 Page loading method, the processing method and client of page operation instruction

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1424244B1 (en) * 2002-11-29 2010-05-26 Xanavi Informatics Corporation Data access method and data access system for accessing data at on-vehicle information device, a computer program causing the device to carry out the method, a computer readable medium or a signal carrying a respective computer program, a respective device for performing the method and a respective device operable in the system
CN103353836A (en) * 2013-04-01 2013-10-16 深圳市东微智能科技有限公司 Method for realizing functions of programmable reusable control
CN103235722A (en) * 2013-04-19 2013-08-07 南京莱斯信息技术股份有限公司 ActiveX control framework technology achieving method
CN103823671A (en) * 2013-12-26 2014-05-28 远光软件股份有限公司 Control establishing method, control invoking method and control invoking system
CN104717301A (en) * 2015-03-27 2015-06-17 北京奇虎科技有限公司 Plug-in download method and device
CN104714827A (en) * 2015-03-31 2015-06-17 北京奇虎科技有限公司 Plug-in update method and device
WO2018018694A1 (en) * 2016-07-29 2018-02-01 宇龙计算机通信科技(深圳)有限公司 Control method of application program, control device and terminal
CN108021583A (en) * 2016-10-28 2018-05-11 阿里巴巴集团控股有限公司 Page loading method, the processing method and client of page operation instruction
CN106775754A (en) * 2016-12-30 2017-05-31 百度在线网络技术(北京)有限公司 The compatible processing method and processing device of application
CN107506118A (en) * 2017-08-09 2017-12-22 广州市动景计算机科技有限公司 Feature card arrangement collocation method, device and terminal device

Also Published As

Publication number Publication date
CN108874466A (en) 2018-11-23

Similar Documents

Publication Publication Date Title
CN108874466B (en) Control calling method, electronic device and computer readable storage medium
CN109388453B (en) Application page display method and device, storage medium and electronic equipment
CN107402835B (en) Application program exception handling method and device, storage medium and mobile terminal
US10775979B2 (en) Buddy list presentation control method and system, and computer storage medium
CN109495871B (en) Bluetooth connection control method, electronic device and computer readable storage medium
CN109067984B (en) Data transmission method, electronic device and computer readable storage medium
CN110109759B (en) Catton optimization method, server, electronic device and computer-readable storage medium
CN109348467B (en) Emergency call implementation method, electronic device and computer-readable storage medium
US20230129384A1 (en) Method for Browsing Application Folder and Electronic Device
EP3731077A1 (en) Method for editing text, and mobile device
CN103455330A (en) Application program management method, terminal, equipment and system
US11290591B2 (en) Dialing method and mobile terminal
CN109983428B (en) Application operation method and device
CN109684011B (en) Interface display control method, electronic device and computer readable storage medium
CN109348062B (en) Emergency call implementation method, electronic device and computer-readable storage medium
CN108604331A (en) A kind of information prompting method and mobile device
US20200310771A1 (en) Application Processing Method for Terminal Device, and Terminal Device
WO2020052354A1 (en) Game loading method and related products
CN110287443B (en) Page data display method and related device
CN109782960B (en) Touch screen point reporting area switching method, electronic device and computer readable storage medium
CN108196965B (en) Data processing method and device
CN113204689A (en) Web front-end visual packaging deployment method and related products
CN110874143A (en) Sensor data acquisition method, intelligent terminal, storage medium and electronic device
CN108762643B (en) Control bar display method, electronic device and computer readable storage medium
CN110928597B (en) Game running method and related product

Legal Events

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