Data filling method and device, terminal equipment and medium
By obtaining and replacing the original data of the data-filling area and finding and displaying fillable data, the problem that existing automatic filling service cannot automatically fill when repeated editing of the data-filling area is solved, and multiple automatic filling and data of the data-filling area are realized Saving flexibility improves user experience and interface customization.
Patent Information
- Application Number
- CN202310811125.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-03
- Publication Date
- 2025-01-03
AI Technical Summary
The existing automatic filling service cannot continue to use the automatic filling function when repeated editing in the data filling area, and the data storage logic conditions are harsh, the user interface customization level is low, and the user experience is poor.
By obtaining the original fill data of the current fill area, finding fillable data according to the data type, and replacing the original data in the fill area, realizing a non-native fill process, expanding the triggering timing of the automatic fill function, customizing the user interface, improving data fill and Flexibility to save.
It realizes automatic filling of the data filling area when editing multiple times, improves the user experience, provides a more convenient and beautiful user interface, and meets users' diverse needs for data filling and storage.
Smart Images

Figure CN119250042A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of terminal technology, and in particular, relates to a data filling method, device, terminal equipment and medium. Background Art
[0002] With the continuous development of Internet platforms and mobile terminal technologies, users are often required to manually fill in data when using electronic devices. For example, users often need to fill in data forms when using related application software such as travel, online shopping, finance, government affairs, and hospital registration. Storing, searching, copying, and pasting data have become trivial daily routines. When filling in data, if an automatic filling service can be provided and the terminal device automatically fills in the data, it can save users time in entering data, thereby bringing convenience to users.
[0003] However, most of the currently provided auto-fill services are implemented based on the system's own auto-fill framework, and the auto-fill framework can provide relatively limited automatic functions. For example, currently, when performing auto-fill, the input box can only be automatically filled using the terminal device when the input box is edited by the user for the first time, and the input box cannot be automatically filled using the terminal device when the output box is edited repeatedly. Summary of the invention
[0004] In view of this, embodiments of the present application provide a data filling method, apparatus, terminal device and medium to extend the triggering timing of data filling, so that the same data filling area can be filled with data multiple times using the automatic filling function.
[0005] A first aspect of an embodiment of the present application provides a data filling method, including:
[0006] Acquire the current filling area and the original filling data of the current filling area;
[0007] According to the data type of the original filling data, searching for fillable data corresponding to the data type;
[0008] The original filling data is replaced with the fillable data, and the fillable data is displayed in the current filling area.
[0009] A second aspect of an embodiment of the present application provides a data filling device, including:
[0010] A determination module, used for obtaining a current filling area and original filling data of the current filling area;
[0011] A search module, configured to search for fillable data corresponding to the data type according to the data type of the original fill data;
[0012] A replacement module is used to replace the original filling data with the fillable data and display the fillable data in the current filling area.
[0013] A third aspect of an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method as described in the first aspect when executing the computer program.
[0014] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method as described in the first aspect is implemented.
[0015] A fifth aspect of an embodiment of the present application provides a computer program product. When the computer program product runs on a terminal device, the terminal device executes the method of the first aspect.
[0016] Compared with the prior art, the embodiments of the present application have the following advantages:
[0017] The embodiment of the present application can realize automatic filling of a data fill area that has been edited multiple times. When the data fill area is repeatedly edited, the data fill area that is currently being edited is the current fill area. The current fill area contains the original fill data that was previously filled. According to the data type of the original fill data, the fillable data of the current fill area can be found. Based on the fillable data found, the data that has been filled in the current fill area can be replaced, and the fillable data can be displayed in the current fill area. In the embodiment of the present application, automatic filling of data can also be realized when the data fill area is edited multiple times, which is equivalent to extending the triggering timing of the data filling service, thereby providing users with more convenience and improving the user experience when using the data filling service. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art.
[0019] Figure 1 This is a schematic diagram of the steps of a data filling method provided in an embodiment of the present application;
[0020] Figure 2 is a schematic diagram of an application interface provided in an embodiment of the present application;
[0021] Figure 3 This is a schematic diagram of a filling scenario provided in an embodiment of the present application;
[0022] Figure 4This is a schematic diagram of the steps of another data filling method provided in an embodiment of the present application;
[0023] Figure 5 This is a schematic diagram of a storage scenario provided in an embodiment of the present application;
[0024] Figure 6 This is an application scenario diagram of an automatic filling service provided by an embodiment of the present application;
[0025] Figure 7 is a schematic diagram of a data filling device provided in an embodiment of the present application;
[0026] Figure 8 It is a schematic diagram of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0027] In the following description, specific details such as specific system structures, technologies, etc. are proposed for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from hindering the description of the present application.
[0028] Google added the Autofill Framework to the Android 8.0 system. The Autofill Framework can be combined with an Autofill service to implement the autofill function. Currently, the implementation of the autofill function is completely based on the autofill service of the native autofill framework. These autofill service processes are consistent with the native autofill framework. The data filling process and the saving process have many restrictions and can only complete the most basic autofill function. It cannot meet the filling and saving requirements of large form data, and the filling interface is not customizable and the user interface is simple. Specifically, the current autofill has the following disadvantages:
[0029] The timing of triggering data filling cannot be customized. Currently, when performing auto-fill, after the user has used auto-fill in the same input box, they cannot continue to use auto-fill to change the fill content.
[0030] The timing of triggering data saving cannot be customized. The data for auto-fill can come from the data previously entered by the user. Therefore, when the user exits the form interface, the content filled in by the user can be saved. However, currently, when saving data, the auto-fill framework judges the content of the page according to the needs of the auto-fill service. When the page content reaches the data saving conditions defined by the auto-fill service, the data saving logic of the auto-fill service can be triggered. For example, the auto-fill service can send one or more specific input box type information to the auto-fill framework. When saving data, the auto-fill framework can determine whether the corresponding input boxes in the interface have content changes based on the input box type information sent by the auto-fill service; if there is a content change in the corresponding input box in the interface, onSaveRequest will be called back to trigger data saving. In other words, when saving data, the auto-fill service decides in advance which types or input boxes to save, and the data saving logic will be triggered only when the content of these input boxes has information changes when the user exits the form interface. It can be seen that the current conditions for triggering the data saving logic are too harsh, and the user's opinions are not taken into account when saving data.
[0031] When the autofill framework displays the content that can be filled into the input box to the user, the user interface (UI) needs to be filled. Currently, the autofill service passes RemoteViews to the system framework to fill the UI, and then the system framework displays the interface. RemoteViews is an interface display-related class in Android that allows applications to display their layouts and UI elements in other applications. It can be used for cross-process transmission. The native autofill framework can use RemoteViews to achieve communication between the autofill service and the system framework. On the one hand, RemoteViews only supports limited native layouts and native controls, and does not support custom Views, which leads to a relatively simple user interface and poor user experience; on the other hand, using RemoteViews to implement interface display requires cross-process, which brings inconvenience to data processing. Among them, in Android, View is one of the basic components that constitute the user interface. It can be a rectangular area used to display interactive content on the screen and respond to user events. Each View has its own life cycle and state, and can contain other Views as its child elements to build a complex user interface.
[0032] Based on this, an embodiment of the present application provides a data filling method to expand the automatic filling function to improve the user experience.
[0033] The data filling method in the embodiment of the present application can be applied to terminal devices, wherein the terminal devices can be mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPC), netbooks, personal digital assistants (PDA), smart home devices, etc. The terminal device can include a user interaction interface, and the terminal device can display the page to be filled to the user through the user interaction interface, and the user can also fill in data based on the user interaction interface of the terminal device.
[0034] The terminal device may include an autofill framework. For example, the terminal device may be equipped with an Android 8.0 or higher system, so that the system framework can support autofill. The autofill framework is an Android-side infrastructure that defines workflows and provides an infrastructure that enables the autofill service and client applications (Application, APP) to work together. It is responsible for managing the communication between the application and the autofill service.
[0035] The method in the embodiment of the present application can be integrated into an automatic filling service and deployed in a terminal device. The terminal device can implement data filling based on the automatic filling framework and the automatic filling service.
[0036] The technical solution of the present application is described below through specific embodiments.
[0037] Reference Figure 1 , shows a schematic flow chart of a data filling method provided in an embodiment of the present application, which may specifically include the following steps:
[0038] When the target filling area is in an editing state, the target filling area is used as the current filling area and a non-native filling process is performed, wherein the data filling area is a data filling area with existing data.
[0039] The above-mentioned data filling area can be an editable area on the user interface of the terminal device, such as an input box, an edit box, etc. When the user uses the terminal device and needs to fill in data, the user interface of the terminal device can display one or more data filling areas, and the data filling areas need to be filled in by the user.
[0040] For example, when a user opens a ticket booking software on a personal terminal to book a ticket, if personal identity information needs to be filled in, the user interaction interface of the personal terminal may display two input boxes, each of which may have prompt information for prompting the user to fill in the name or ID number in the input box.
[0041] The data filling area may be a blank area, that is, the data filling area has not been filled before; the data filling area may also be an area with existing data, that is, the data filling area may be an area that has been filled with data by the user before.
[0042] For a data-filling area that already has data, when it is in the editing state, it means that the user has repeatedly edited the data-filling area. At this time, the data-filling area can be used as the above-mentioned target filling area, that is, the above-mentioned current filling area, and then the non-native filling process is executed to fill the data in the repeatedly edited current data-filling area. For example, after the user has entered data in the name input box and exited the editing of the input box, he started editing the name input box again. At this time, the name input box is the above-mentioned target filling area or the current filling area, and then the non-native filling process is executed to fill the data in the name input box again.
[0043] The above-mentioned non-native filling process is a data filling process customized by the automatic filling service, and the native filling process corresponding to the non-native filling process is a data filling process defined by the automatic filling framework. In an embodiment of the present application, the automatic filling function of the system can be expanded through a customized non-native filling process. For example, in the native filling process, the data filling area can only be automatically filled with data when it is edited for the first time. In an embodiment of the present application, the data filling area can execute a non-native filling process to fill data when it is not edited for the first time.
[0044] When a user edits a data-filled area that has been filled with data, the terminal device can detect that the data-filled area that has been filled with data is in an editing state. At this time, the terminal device can execute a non-native filling process to automatically fill the data-filled area. The non-native filling process can be as follows S101-S103:
[0045] S101, obtaining a current filling area and original filling data of the current filling area.
[0046] The above-mentioned current fill area is a data fill area that has been filled with data and is in an editing state. Therefore, there is original fill data in the current fill area. The original fill data may be the data filled when the current fill area was last edited. Exemplarily, the initial state of the data fill area may be a blank fill area, that is, there is no data filled in by the user in the data fill area. When the user edits the data fill area for the first time, the native fill process or the non-native fill process may be called to automatically fill in the data, and the user may also manually edit the data fill area so that data is displayed in the data fill area. When the data fill area is triggered for editing again, the data currently displayed in the data fill area is the above-mentioned original fill data.
[0047] The data to be filled in the current fill area may have a corresponding data type. The data type may be used to describe the attributes corresponding to the data. For example, for a name input box, the corresponding data type is name; for an address input box, the corresponding data type is address.
[0048] After determining the current filling area, the data type corresponding to the current filling area can be determined. The data type of the original filling data is the data type corresponding to the data to be filled in the current filling area. In a possible implementation, the current filling area can also include description information of the data type, so that the data type of the current filling area can be determined based on the description information.
[0049] S102: According to the data type of the original filling data, search for fillable data corresponding to the data type.
[0050] A database may exist in the terminal device, and the database may store data for automatic filling. The data in the database may be obtained by user input, or may be obtained by saving data that the user has input on the application interface. When performing automatic filling, the data that can be selected to fill in the current filling area may be searched from the database.
[0051] In a possible implementation, the data in the database may be stored in an encrypted form. Therefore, when querying fillable data, the data in the database may be decrypted first, and then the data may be queried from the database.
[0052] The data stored in the database also has a data type. Exemplarily, multiple data types can be set in the database, and each data type can be associated with storing multiple data. For example, the database can include multiple name data, multiple address data, and multiple contact information data. In one possible implementation, a corresponding data table can be created for each data type in the database, and the data table corresponding to the data type can store data of the corresponding data type. When the original fill data is of this data type, all the data in the data table corresponding to this data type can be found. In another possible implementation, each data in the database can have an associated field, and the value of this field can describe the data type of the data. For example, if the field value is 1, the data type is name; if the field value is 2, the data type is address.
[0053] When querying data from a database, it can be determined whether the data type corresponding to the current filling area exists in the database. If the data type corresponding to the current filling area does not exist in the database, it can be determined that there is no fillable data for the current filling area in the database.
[0054] If the data type corresponding to the current fill area exists in the database, the data corresponding to the data type can be used as fillable data for the current fill area. For example, if the data type corresponding to the current fill area is a name, the data associated with the name can be searched from the database, and the data associated with the name is the fillable data. For example, the fillable data can include the names existing in the database: Zhang San, Li Si, Wang Wu.
[0055] S103: Replace the original filling data with the fillable data, and display the fillable data in the current filling area.
[0056] The found fillable data may include one or more. In a possible implementation, the fillable data may be directly used to replace the data already filled in the current filling area. For example, if there is only one fillable data, the fillable data may be directly replaced in the current filling area; if there are multiple fillable data, the first data in the fillable data may be replaced in the current filling area.
[0057] In another possible implementation, the terminal device may display fillable data to the user through a user interaction interface, and then determine the data that can be filled in the current fill area based on the user interaction result. Exemplarily, the terminal device may display a fill control on the user interaction interface. The fill control includes fillable data, and the fill control may be triggered by the user. For example, the fill control includes a drop-down box that can be selected. When the user pulls down the fill control, various fillable data may be displayed on the user interaction interface, and then the user may select the data that he wishes to fill in the current fill area. The terminal device may identify the instruction acting on the fill control based on the user's selection. Then, the target data may be determined from the fillable data based on the instruction acting on the fill control. The target data is the data selected by the user to be filled. After the target data is determined, the target data may be used to replace the data already filled in the current fill area.
[0058] In order to more clearly illustrate the solution in the present application, the solution in the present application is described below with a specific embodiment. Figure 2 is a schematic diagram of an application interface provided by an embodiment of the present application. Figure 2 As shown, the application interface may include data filling areas 21, 22, 23, 24, 25, and 26. The data types corresponding to the data filling areas 21, 22, 23, 24, 25, and 26 are name, ID number, hobbies, occupation, and work experience. 21 and 22 are data filling areas that have been filled with data, and 23, 24, 25, and 26 are blank filling areas. Figure 2 As shown, when the data filling area 21 is triggered, the data filling area 21 can be the current filling area. The original filling data of the current filling area is Zhang San, and the data type of the original filling data Zhang San is name, so the data with the data type of name can be found from the database. Then the data of each name found is displayed in the application interface, waiting for the user to select, and the user can click the screen of the terminal device to select the name to be filled. For example, if the user selects Wang Wu, Zhang San can be replaced with Wang Wu, that is, Wang Wu is displayed in the data filling area 21. In the native filling system, when the data filling area is filled with Zhang San for the first time, the automatic filling function can be used; but when the data filling area is edited again, the automatic filling function cannot be used. Based on the method in this application, a non-native filling process can be executed based on a custom automatic filling function, so that automatic filling can be performed when the data filling area is edited multiple times. In other words, the data filling area can be automatically filled whether it is edited for the first time or edited multiple times.
[0059] In a possible implementation, the data filling areas on the application interface may be associated. For example, when purchasing a ticket, the application interface for filling in personal information may include a name filling area and an ID number filling area. In the personal information, the ID number corresponding to the name is unique. If the name in the name filling area is determined, the corresponding ID number filling area has unique correct filling content. In this case, the name filling area and the ID number filling area can be considered to be associated filling areas. Since the data filled in the current filling area corresponds one-to-one to the data filled in its associated filling area, when filling the current filling area with data, the associated filling area of the current filling area can be filled with data at the same time.
[0060] The data filling area that is associated with the current filling area is the associated filling area of the current filling area. The data in the associated filling area has a one-to-one correspondence with the data in the current filling area. Therefore, when replacing the already filled data in the current filling area, it is also possible to determine whether the current filling area has an associated filling area. If the current filling area has an associated filling area, the data in the associated filling area can also be automatically filled or automatically replaced. For example, when Figure 2 When the name in the ID card is changed from Zhang San to Wang Wu, the data filling area 22 corresponding to the ID card number needs to be replaced accordingly.
[0061] In a possible implementation, the terminal device can analyze the association relationship of the data filling area based on the data types of all data filling areas in the user interface, so as to determine the associated filling area of the current filling area. The terminal device can determine whether the data type of the current filling area has other data types with an associated relationship. If the data type of the current filling area has other data types with an associated relationship, it is determined whether there are other data types with an associated relationship with the data type of the current filling area in the user interface. If there are other data types with an associated relationship with the data type of the current filling area in the user interface, the data filling area corresponding to the other data types in the user interface is used as the associated filling area of the current filling area. For example, if the data type of the current filling area is a name, the terminal device can determine whether there is an associated data type for the name. Since the name and the ID card number correspond one to one, the data type name and the data type ID card number can be marked in the database of the terminal device as having an associated relationship. After determining that the data type associated with the name is the ID card number in the terminal device, it can be determined whether there is an ID card number filling area in the user interface. If the ID card number filling area exists in the user interface, it is determined that there is an associated filling area for the current data filling area, and the associated filling area is the ID card number filling area in the user interface.
[0062] In a possible implementation method, when the associated fill area is automatically filled with data, the associated data of the associated fill area can be directly determined according to the target data corresponding to the current fill area. Exemplarily, the target data of the current fill area can be determined from the fillable data according to the instruction acting on the fill control. Then the data associated with the target data is found from the database, and the data associated with the target data is filled into the associated fill area. Exemplarily, in the database, for a piece of data, it can include multiple fields, each of which can correspond to a data type. For example, for a piece of data, it can include a name field, an ID number field, an address field, a contact information field, etc. If the data type of the current fill area is a name, and the associated fill area of the current fill area is an ID number fill area, then after determining the name in the current fill area, the ID number field of the data corresponding to the name is also determined, and the corresponding identity account can be directly displayed in the associated fill area.
[0063] In another possible implementation, if there is an associated filling area in the current filling area, the data corresponding to the data type and the associated data in the database are used as fillable data, and the associated data is associated with the data corresponding to the data type, and the data type of the associated data is the same as the data type of the associated filling area. For example, when the current filling area is a name filling area, the associated filling area of the current filling area can be an ID card number filling area. When searching for fillable data from the database, name data of the data type name and ID card number data stored in association with the name data can be searched, and then the name data and ID card number data are combined into one fillable data. For example, the fillable data can be: Wang Wu / 163232195501400762. When using fillable data for data replacement, the name data can be directly replaced with Wang Wu, and the ID card number data can be replaced with 163232195501400762.
[0064] Exemplarily, when filling data based on target data, if there is an associated filling area in the current filling area, there may be associated data corresponding to the associated filling area in the target data. Therefore, there may be a situation where multiple data filling areas are filled at the same time. Based on this, when filling data, it can be determined whether the target data includes associated data. If the target data does not include associated data, the target data can be directly filled into the current filling area, that is, the target data is displayed in the current filling area of the user interface. Determine whether the data type has associated stored data in the database; if the data type has associated stored data in the database, determine that there is fillable data corresponding to the current filling area in the database; if the data type does not have associated stored data in the database, determine that there is no fillable data in the current filling area in the database. If there is no fillable data in the current filling area in the database, the data filling process can be terminated and the user can input data.
[0065] In a possible implementation, the data in the database can be marked as private data. For example, information such as ID numbers and passwords in the database can be marked as private data, thereby strengthening the protection of user personal information. When private data is needed for data filling, identity verification can be performed to determine whether the user has the authority to use the private data. Therefore, before executing step S103, the following steps can also be performed:
[0066] Determine whether the fillable data is private data. The private data in the database may have a specific privacy identifier, or the database may specify which data types correspond to private data. Therefore, whether the fillable data is private data may be determined based on whether the fillable data carries a privacy identifier or the data type of the fillable data.
[0067] If the fillable data is private data, in order to strengthen the protection of user information, the user who is currently filling in the data may be authenticated. In a possible implementation, specific information may be requested from the user for identity authentication. For example, the user may be authenticated by face recognition, fingerprint verification, or password verification.
[0068] After the identity authentication is passed, the step S103 can be executed to continue data filling. When the identity authentication is not passed, the data filling can be terminated.
[0069] In this embodiment, based on the non-native filling process, data can be automatically filled when the user is not editing the data filling area for the first time. Of course, when the user edits the data filling area for the first time, the non-native filling process can also be used to automatically fill the data. When the user edits the data filling area for the first time, the steps of automatically filling the data using the non-native filling process are similar to the above steps and are not repeated here.
[0070] In this embodiment, the terminal device may use the auto-fill framework and the auto-fill service to perform data auto-fill. Figure 3 Schematic diagram of a data filling scenario provided by an embodiment of the present application. The data filling scenario may include a foreground application 31, an automatic filling framework 32, and an automatic filling service 33. Figure 3 The auto-fill service 33 in the system can provide a data filling service, and the auto-fill framework 32 can call onFillRequest to call the data filling service of the auto-fill service. When the auto-fill framework calls back onFillRequest, the data filling process can be triggered, so that the system can call the data filling interface of the auto-fill service to fill the data. Figure 3 As shown, in the embodiment of the present application, the logical conditions for the automatic filling framework to initiate a fill request (FillRequest) can be extended, and the data structure of FillRequest can be extended. That is, the embodiment of the present application can customize the triggering time of data filling and the data type that can be filled with data.
[0071] The auto-fill framework 32 can customize the execution logic in the data filling process together with the auto-fill service 33 based on the custom identifier. Generally, when data is filled for the first time, the auto-fill framework can call the auto-fill service. When the auto-fill service responds to the call of the auto-fill framework, it can return a custom flag and flag value to the auto-fill framework. Based on the custom flag, the auto-fill framework can agree with the auto-fill service on the triggering timing and identifier of the data service. Exemplarily, a custom flag OPLUS_AUTOFILL_SHOULD_REQUEST_NEW_FILL_RESPONSE for identifying the triggering timing of the data service can be agreed in advance. When the value of the flag is 1, it means that data filling can be triggered based on a custom triggering timing, for example, data filling can be triggered by repeatedly editing the data filling area. When the value of the flag is 0, data filling can be triggered based on the native triggering timing, for example, data filling can only be triggered when the data filling area is edited for the first time. For example, the autofill framework and the autofill service can agree on a custom flag OPLUS_AUTOFILL_DATASET_FLAG for identification. When the value of the flag is 1, it indicates that the autofill service performs UI display and the auto-native framework needs to skip the native UI display step. When the value of the flag is 0, it indicates that the auto-native framework performs UI display.
[0072] The auto-fill framework 32 can determine whether the triggering time for data filling is a native triggering time or a custom triggering time according to the flag value of the received custom flag. When the triggering time is a custom triggering time, when the user repeatedly edits the data filling area through the foreground application, the auto-fill framework can trigger the Fill request based on the custom triggering time. The Fill request is then sent to the auto-fill service 33, and the auto-fill service can perform the following steps: querying fillable data 331, receiving a receipt and displaying UI 332, interacting with the user 333, and data packaging 334. Specifically, the auto-fill service can search for fillable data from the database based on the Fill request, and the auto-fill service draws and displays the UI on the user interaction interface. After that, the auto-fill service interacts with the user based on the UI, and the user selects the target data to be filled in the current filling area. After the target data is determined according to the user interaction result, the auto-fill service can package the target data and send it to the auto-fill framework. The auto-fill framework can determine whether to perform UI display based on the flag value of the received custom flag. When the auto-fill framework determines that the value of OPLUS_AUTOFILL_DATASET_FLAG is 1, it can skip the native UI display step and directly fill the data into the current fill area, thereby completing the automatic filling of data.
[0073] In the embodiment of the present application, the terminal device can expand the triggering time of data filling based on the non-native filling process, so that data filling can be automatically performed when the data filling area is repeatedly edited, expanding the application scenarios of data filling. In this embodiment, the auto-fill service can also customize the execution logic of the UI display with the auto-fill framework, and the UI display can be performed by the auto-fill service, thereby providing a more beautiful interface and a better user interaction experience.
[0074] When filling data automatically, a database is needed. The data stored in the database can be updated based on the data entered by the user on the application interface. Therefore, when filling data, the data needs to be saved.
[0075] Reference Figure 4 , shows a schematic flow chart of a data storage method provided in an embodiment of the present application, which may specifically include the following steps:
[0076] When a closing instruction of an application interface is detected, a non-native saving process is executed, wherein the application interface is the interface where the current filling area is located.
[0077] The above non-native saving process is a data saving process customized by the auto-fill service, and the native saving process corresponding to the non-native saving process is a data saving process defined by the auto-fill framework.
[0078] Closing the application interface can trigger data saving. In the non-native saving process, when the terminal device detects that the application interface is closed, it can call the autofill service to save the data.
[0079] Activity Finish is the last link in the life cycle of a basic interface in an Android application that is triggered, that is, the last link before the interface is completely destroyed. When the terminal device detects Activity Finish, onSaveRequest can be triggered to execute the non-native save process.
[0080] The non-native storage process may include S401-S402:
[0081] S401, when a closing instruction of an application interface is detected, determining whether there is new data in the application interface that is not stored in a database, the application interface being the interface where the current filling area is located.
[0082] The terminal device can parse the data in the application interface to determine whether there is new data. For example, if the terminal device detects that the data filling area in the application interface has a new data type that does not exist in the database, it can be determined that the application interface has new data that is not stored in the database. The terminal device can also determine that there is no data filling area in the application interface that is automatically filled with data, and then determine whether the data in the data filling area exists in the database. The data filling area that is not automatically filled with data can be a data filling area that is manually edited by the user, and the data manually edited by the user may be new data.
[0083] S402: If there is new data in the application interface, save the new data.
[0084] In a possible implementation, the terminal device can directly save all new data, which is equivalent to saving all new data in the database.
[0085] In another possible implementation, the terminal device may save the new data according to the user's selection. Exemplarily, the terminal device may display a save control on the user interaction interface, and the save control includes the new data; the save control may be used to display all the new data to the user. The user may trigger the saving of the new data by clicking the control. For example, all the new data may be displayed on the user interface, and each new data may correspond to a selection button, and the user may decide whether to save the new data by using the corresponding selection button.
[0086] According to the instruction acting on the save control, the new data selected in the save control can be determined as the data to be saved. The data to be saved is the new data selected by the user to be saved; then the data to be saved is saved in the database.
[0087] The data on the application interface can have different data types, some of which may exist in the database, while some may not exist in the database.
[0088] If there is a target type consistent with the type of the new data in the existing types in the database, the new data is associated with the target type, and the new data is stored in the database. Associating the new data with the data type is equivalent to being able to find the new data from the database based on the data type. For example, when a new name data Lin Si needs to be saved, Lin Si can be saved in the data table corresponding to the name in the database, so that Lin Si is associated with the data type name, that is, when searching for the name, Lin Si can be found in the data table. Alternatively, the data types in the database can be identified by different field values. When saving a new data, the field value of the new data can be set to the field value corresponding to the target type. For example, if the field value corresponding to the data type name is 1, the new name Lin Si can be stored in the database as (Lin Si, 1). When searching for the name data, all data with a field value of 1 can be found, so that Lin Si can also be found.
[0089] If there is no target type that is consistent with the type of the new data in the existing types in the database, the new data and the target type are stored in the database, and the new data is associated with the target type. Figure 2 When new data in is saved, it is found that the data in the data filling area 24 is the new data to be saved. The description information of the data filling area 24 is occupation, and the occupation data type does not exist in the database. At this time, the occupation data type and the data filled in the data filling area 24 can be saved in the database, and the occupation data type and the data filled in the data filling area 24 can be saved. Assuming that the data filled in the data filling area 24 is doctor, a data table corresponding to the occupation can be created in the database, and then the doctor can be stored in the data table. Alternatively, the occupation can be stored in the database as a new data type, and the field value corresponding to the occupation is defined as 5 in the database, and then (doctor, 5) is stored in the database. (Doctor, 5) can be used to indicate that when the data type is occupation, the fillable data can include doctors. By saving data of new data types, the data structure that can be applied to the data filling service can also be expanded. For example, the new data type can include images. After the new data type is saved in the database, the image filling area can be automatically filled.
[0090] In a possible implementation, new data on the application interface may have an association relationship, and when data is saved, data with an association relationship may be associated and stored in a database. Exemplarily, a table may be established in the database, and the header may include various data types with an association relationship. For example, the header may be name, ID number, and contact number. When searching for data in the table, the ID number and contact number corresponding to each name are unique. When new data is saved, new data with an association relationship may be saved in the same table, so that associated data may be found from the table based on one data. For example, the new data includes the name data Lin Si and the identity account number 163232198801400762 of Lin Si, and it may be saved in a table containing the name and ID number in the header, in which, when Lin Si is found, the unique ID number 163232198801400762 may be determined.
[0091] In a possible implementation, the data in the database is stored in encrypted form. Therefore, when storing the data, the data to be stored may be encrypted and the encrypted data to be stored may be stored in the database. Figure 5 Schematic diagram of a data storage scenario provided by an embodiment of the present application. Figure 5 As shown, in the embodiment of the present application, the logical conditions for the automatic filling framework to initiate a filling request (SaveRequest) can be extended, and the data structure of SaveRequest can be extended. That is, the embodiment of the present application can customize the logical conditions for data saving and the data types that can be saved.
[0092] The autofill framework and the autofill service can customize the execution logic of data preservation based on the custom flag. Generally, when filling data for the first time, the autofill framework can call the autofill service. When the autofill service responds to the call of the autofill framework, it can return a custom flag and a flag value to the autofill framework. Based on the custom flag, the autofill framework can agree with the autofill service on the execution logic of data preservation. Exemplarily, a custom flag OPLUS_AUTOFILL_SAVE_STATE_CHECK_FLAG can be pre-agreed to define the execution logic of data preservation. The flag value of the custom flag can include 0, 1, and 2. Among them, when the flag value is 0, the native preservation logic provided by the system can be executed to save data; when the flag value is 1, the preset logic of the codebook application can be executed to save data; when the flag value is 2, the preset logic of the autofill service can be executed to save data.
[0093] The autofill framework can determine the execution logic for data saving based on the flag value of the received custom flag. If the received flag value of OPLUS_AUTOFILL_SAVE_STATE_CHECK_FLAG is 2, the autofill framework can send a Save request to the autofill service when it detects that the application interface of the foreground application is closed, so that the autofill service executes the preset logic to save the data. The autofill service can draw and display the UI on the user interaction interface to show the user new data that can be saved. The autofill service interacts with the user based on the UI, and the user selects the new data to save. After determining the data to be saved based on the user interaction results, the autofill service can save the data to be saved to the database.
[0094] In the native data saving process, the auto-fill framework needs to determine whether to save data based on the data filling area pre-selected by the auto-fill service. In the embodiment of the present application, the triggering logic of the data saving service can be simplified. When the application interface is closed, the auto-fill framework can call the auto-fill service to save data. The auto-fill service can save data based on customized data saving logic.
[0095] In the embodiment of the present application, when saving data, the auto-fill framework can directly send a data saving request to the auto-fill service when detecting that the application interface is closed, thereby avoiding the need for the auto-fill framework to trigger data saving after judgment. The auto-fill service can select new data to be saved based on the user interaction results through the display interface, which can enrich the display content and improve the user experience.
[0096] It should be noted that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0097] In order to illustrate the solution in the present application, the solution in the present application is illustrated below with a complete application scenario of an automatic filling service for data filling.
[0098] Since the autofill framework can execute both native and non-native processes, the autofill service can agree on execution logic with the autofill framework through custom flags. The custom flags can be shown in Table 1:
[0099]
[0100] Table 1
[0101] After the autofill framework calls the autofill service for the first time through onFillRequest, the autofill service can determine the data to be filled based on the fill request, and then send the fill data and the key and value of the custom flag to the autofill framework. The autofill framework can determine the next call logic based on the key and value. For example, the autofill service can determine the values of three keys as true, true, and 2 and send them to the autofill framework. Then, after receiving the fill data, the autofill framework will directly fill the data into the input box; when repeated clicks are detected, the onFillRequest callback to the autofill service can be directly used; when the application interface is detected to be closed, the onSaveRequest callback to the autofill service can be used to save the data. Each time the autofill service packages the data and sends it to the autofill framework, it can send the key and value of the custom flag to the autofill framework. The autofill framework can determine the logic to be executed in the next fill process based on the received value. Generally, custom flags can be true, true, and 2, which means that the autofill framework always automatically fills and saves through non-native processes. Figure 6 Different diagrams are used to illustrate different modules. Figure 6 As shown in the legend, the rounded rectangle corresponds to the external system and module, the solid right-angled rectangular box corresponds to the auto-fill service, the uniform dashed right-angled rectangular box corresponds to the auto-fill framework, and the non-uniform dashed right-angled rectangular box corresponds to the UI operation.
[0102] like Figure 6 As shown, when using the application software, the user can open an interface that needs to be filled with data, and the interface can include one or more edit boxes, which can be edited by the user to fill in data. The edit box is the data filling area mentioned above.
[0103] When filling in data, the user can activate the edit box; the auto-fill framework can detect that the user has activated the edit box, thereby generating a Fill request and sending the Fill request to a specific auto-fill service. For example, the auto-fill framework can call back the data filling interface of the auto-fill service through onFillRequest, thereby triggering the auto-fill service to fill in data.
[0104] The auto-fill service can identify the framework message sent by the auto-fill framework, and thus determine the service that needs to be called based on the framework message. The framework message is a Fill request, and the auto-fill service can call the data filling service. The auto-fill service can identify the type of this edit box, and through data encryption and storage technology, decrypt and read the encrypted data in the database, and then perform data matching and data query based on the data type, and display the queried data on the user interface through the UI controller. When the UI controller displays the fill control on the user interface, it can automatically fill in the UI and display the corresponding fillable data to the user. If it involves data with a higher degree of privacy and security, such as identity cards or bank cards, the corresponding format encryption can be performed when displaying, and the user can select the data to fill.
[0105] If the edit box type is an ID card or name, which are two types that can uniquely identify the subject, one-click filling can be triggered. The filling service will identify the edit box information of the entire interface and match it with the data contained in the subject selected by the user; if the edit box type is not one of the above two types, a single filling is performed, and only the current edit box can be filled. When filling in data, if it involves data with a high degree of privacy and security, such as an ID card or bank card, the automatic filling service will turn on identity authentication, and the user can only fill in the data after passing the verification, thereby ensuring the security of data use.
[0106] After the edit box has been triggered to fill in, if the user finds that he has filled in the wrong information by mistake, he can click the edit box again to trigger automatic filling to correct the information.
[0107] After the user fills in the interface and exits the interface, the system framework will call back the onSaveRequest method of the auto-fill service. The fill service will obtain the information of the edit box on the current interface and determine whether it is necessary to remind the user to save the data. If so, a data save panel will pop up to allow the user to operate which data to save under which main information for later filling in the form information.
[0108] The auto-fill framework will trigger the data saving process at an agreed custom time based on product requirements. Similarly, the auto-fill framework will distinguish whether the saving process is triggered by the native logic process or the custom process based on the triggering timing, and notify the application side through onSaveRequest. Before notifying the application side, it is also necessary to determine whether it meets the function of saving or updating new data based on custom rules. Only when the scenario that triggers the save matches the current data change situation will the application side be notified of the need to save, so as to improve the user experience. In the onSaveRequest callback, the auto-fill service confirms with the user whether the data needs to be saved through a self-drawn UI interface. After the user confirms, the data will be encrypted and stored in the auto-fill service database so that it can be displayed to the user for selection to fill in the next filling scenario.
[0109] In the embodiment of the present application, when filling in data and saving data, interaction with the user can be performed, and the implementation of the data filling UI and the data saving UI can be implemented by the non-native process extended by the automatic filling service. In the application interface, the filling service avoids the limitations of RemoteViews by adding a custom Window to the current interface and adding a custom View to the Window for display. View is one of the basic components of the user interface. It can be a rectangular area used to display interactive content on the screen and respond to user events. Each View can have its own life cycle and state, and can contain other Views as its child elements to build a complex user interface. Custom View can achieve beautiful expansion animation, which improves the user experience. View will be displayed when onFillRequest is called back and the database has corresponding fillable data, and will disappear when the user clicks to fill the area outside the UI.
[0110] After the user exits the form interface, the auto-fill service determines whether there is new data by parsing the interface information before exiting. If there is new data, a save panel can be displayed on the current interface to show the user the collected data and the corresponding data type. The user can freely check zero or more items of data to save.
[0111] In the embodiment of the present application, when the user is filling in data, the triggering time of automatic filling in data and the triggering time of data saving can be customized, and the user can be intelligently prompted to automatically fill in the interface form information, saving the user's time to fill in the fields and minimizing user input errors. At the same time, based on the high degree of customization of the entire filling process, the filling and saving of data is not limited to the data types of the native filling framework, but supports all data types. All data filling boxes on the application interface can be automatically filled, and all data items on the application interface can be saved or not according to the user's wishes.
[0112] In addition, the implementation of the fill UI and save UI is transferred from the system process to the auto-fill service process. The auto-fill service draws the fill UI and save UI completely independently. This avoids the limitation that only RemoteViews can be used for cross-process UI transmission, and achieves high customization of the fill UI and save UI, designing a more beautiful and unified user interface and a more convenient and friendly interactive experience.
[0113] It should be noted that in the embodiments of the present application, the terminal device can execute a native filling process and a non-native filling process, and can execute a native saving process and a non-native saving process. When filling and saving data in the data filling area for the first time, the terminal device can execute the native filling process and the native saving process that come with the automatic filling framework, or it can execute a customized non-native filling process and a non-native saving process. When filling and saving data in the data filling area again, a customized non-native filling process and a non-native saving process can be executed. Based on the non-native filling process and the non-native saving process, the terminal device can overcome the limitations of the native filling process and the native saving process that come with the automatic filling framework, so that when performing automatic filling, it can implement functional expansion of data filling and data saving, and provide users with a better user experience.
[0114] Reference Figure 7 , shows a schematic diagram of a data filling device provided in an embodiment of the present application, which may specifically include a determination module 71, a search module 72 and a replacement module 73, wherein:
[0115] A determination module 71 is used to obtain a current filling area and original filling data of the current filling area;
[0116] A search module 72, configured to search for fillable data corresponding to the data type according to the data type of the original fill data;
[0117] The replacement module 73 is used to replace the original filling data with the fillable data and display the fillable data in the current filling area.
[0118] In one or possible implementations, the above device includes:
[0119] An associated data search module, used for searching associated data of an associated filling area if an associated filling area exists in the current filling area, wherein the associated filling area refers to a data filling area whose filled data has a one-to-one correspondence with the data filled by the current filling data;
[0120] The associated data filling module is used to display the associated data in the associated filling area.
[0121] In one or possible implementation manner, the above device also includes:
[0122] An identity verification module, configured to verify the identity of the user currently filling in the data if it is determined that the fillable data is private data;
[0123] The judgment module is used to execute the step of replacing the data filled in the current filling area based on the fillable data after the identity authentication is passed.
[0124] In one or possible implementation manner, the replacement module 73 includes:
[0125] A display submodule, used for displaying a fill control on a user interaction interface, wherein the fill control includes the fillable data;
[0126] a determination submodule, configured to determine target data from the fillable data in response to an instruction received by the fill control;
[0127] A filling submodule is used to replace the fillable data with the target data.
[0128] In one or possible implementation manner, the above device also includes:
[0129] A closing detection module, configured to determine whether there is new data in the application interface that is not stored in the database when a closing instruction of the application interface is detected, the application interface being the interface where the current filling area is located;
[0130] The data saving module is used to save the new data if the new data exists in the application interface.
[0131] In one or possible implementation manner, the data storage module includes:
[0132] A save control display submodule, used for displaying a save control, wherein the save control includes the new data;
[0133] A submodule for determining data to be saved, configured to determine the new data selected in the save control as data to be saved in response to an instruction received by the save control;
[0134] The saving submodule is used to save the above data to be saved in the database.
[0135] In one or possible implementation manner, the data storage submodule may further include:
[0136] A first data type storage unit, configured to associate the new data with the target type if there is a target type consistent with the type of the new data in the existing types in the database, and store the new data in the database;
[0137] The second data type storage unit is used to store the new data and the target type in the database and associate the new data with the target type if there is no target type consistent with the type of the new data in the existing types in the database.
[0138] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment part.
[0139] Figure 8 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application. Figure 8 As shown, the terminal device 8 of this embodiment includes: at least one processor 80 ( Figure 8 Only one is shown), a memory 81, and a computer program 82 stored in the memory 81 and executable on at least one processor 80, wherein the processor 80 implements the steps of any of the above method embodiments when executing the computer program 82.
[0140] The terminal device 8 may be a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, a laptop computer, a super mobile personal computer, a netbook, a personal digital assistant, a smart home device, etc. The terminal device may include, but is not limited to, a processor 80 and a memory 81. Those skilled in the art will appreciate that Figure 8 It is only an example of the terminal device 8 and does not constitute a limitation on the terminal device 8. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.
[0141] The processor 80 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0142] In some embodiments, the memory 81 may be an internal storage unit of the terminal device 8, such as a hard disk or memory of the terminal device 8. In other embodiments, the memory 81 may also be an external storage device of the terminal device 8, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the terminal device 8. Further, the memory 81 may also include both an internal storage unit of the terminal device 8 and an external storage device. The memory 81 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program. The memory 81 may also be used to temporarily store data that has been output or is to be output.
[0143] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0144] An embodiment of the present application provides a computer program product. When the computer program product is run on a terminal device, the terminal device can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0145] The above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them. Although the present application is described in detail with reference to the above embodiments, a person skilled in the art should understand that the technical solutions described in the above embodiments can still be modified, or some of the technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.
Claims
1. A data filling method, characterized in that: include: Acquire the current filling area and the original filling data of the current filling area; According to the data type of the original filling data, searching for fillable data corresponding to the data type; The original filling data is replaced with the fillable data, and the fillable data is displayed in the current filling area.
2. The method according to claim 1, characterized in that The method further comprises: In the case that the current filling area has an associated filling area, searching for associated data of the associated filling area, wherein the associated filling area refers to a data filling area whose filled data has a one-to-one correspondence with the data filled by the current filling data; The associated data is displayed in the associated filling area.
3. The method according to claim 1, characterized in that Before replacing the original filling data with the fillable data, the method further includes: If it is determined that the fillable data is private data, identity verification is performed on the user currently filling in the data; After the identity authentication is passed, a step of replacing the data filled in the current filling area based on the fillable data is performed.
4. The method according to claim 1, characterized in that The replacing the original filling data with the fillable data comprises: Displaying a fill control on a user interaction interface, wherein the fill control includes the fillable data; In response to the instruction received by the filling control, determining target data from the fillable data; The fillable data is replaced with the target data.
5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: When a closing instruction of an application interface is detected, determining whether there is new data in the application interface that is not stored in the database, the application interface being the interface where the current filling area is located; If the new data exists in the application interface, the new data is saved.
6. The method according to claim 5, characterized in that The storing of the new data comprises: Display a save control, wherein the save control includes the new data; In response to the instruction received by the save control, determining the new data selected in the save control as data to be saved; The data to be saved is saved in a database.
7. The method according to claim 5, characterized in that The storing of the new data comprises: If there is a target type that is consistent with the type of the new data in the existing types in the database, the new data is associated with the target type and the new data is stored in the database; If there is no target type consistent with the type of the new data in the existing types in the database, the new data and the target type are stored in the database, and the new data is associated with the target type.
8. A data filling device, characterized in that: include: A determination module, used for obtaining a current filling area and original filling data of the current filling area; A search module, used for searching fillable data corresponding to the data type according to the data type of the original fill data; A replacement module is used to replace the original filling data with the fillable data and display the fillable data in the current filling area.
9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
