Data processing method, device, equipment, storage medium and program product
By obtaining and repairing the data set of the page to be displayed on the iOS client, the problem of abnormal display and crash of the APP page caused by abnormal data reading is solved, and the data set can be repaired in time in actual use, improving the user experience. And support data set repair in subsequent versions.
Patent Information
- Application Number
- CN202110783145.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-12
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2041-07-12
AI Technical Summary
The existing technology cannot effectively avoid the abnormal display and crash problems of the APP page caused by abnormal data reading in actual use of the iOS client. Although the running test is conducted before the APP is uploaded, unused APP pages will still appear in actual use. Found abnormal data reading problem.
Provide a data processing method to obtain the data set required for the page to be displayed, determine whether it is an abnormal data set, and repair the data set when necessary to avoid display abnormalities; similarly, check and repair the stored data set to ensure Data storage is normal.
This method can repair the data set in time, avoid APP page display abnormalities and crashes, improve user experience, and help developers fix it in subsequent versions by reporting problematic data sets.
Smart Images

Figure CN113485929B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data processing method, device, equipment, storage medium and program product. Background Art
[0002] When running an iOS client of an application (APP), an electronic device installed with the iOS system often encounters data reading anomalies, which may lead to serious consequences such as abnormal APP page display, APP crash, etc.
[0003] The current solution is to perform an APP run test before uploading it to the iOS application platform (such as the App Store) for users to download and use, in order to check for data reading anomalies that may occur during the actual use of the APP. The APP developer will handle the data reading anomalies exposed during the run test, then repackage the processed APP and submit it to the application platform for review before uploading it to the application platform. However, due to the short duration of the run test phase and the limited APP application scenarios involved in this phase, the actual use of the APP will still encounter data reading anomalies that were not discovered during the test phase, such as APP page display anomalies, APP crashes, etc.
[0004] The above solution cannot avoid the consequences of abnormal APP page display, APP crash and other consequences caused by abnormal data reading during actual use of the APP. Summary of the invention
[0005] The present application provides a data processing method, apparatus, device, storage medium and program product, which are used to solve the problem that the current methods for solving the data reading abnormality problem that occurs when the iOS client of the APP is running cannot avoid the problem that the APP page display is abnormal, the APP crashes and other consequences caused by the data reading abnormality problem during the actual use of the APP cannot be avoided.
[0006] In a first aspect, the present application provides a data processing method, the method being applied to an electronic device, wherein an iOS client of an application program is deployed on the electronic device, the method comprising:
[0007] Acquire a first data set required for displaying a to-be-displayed page of the application;
[0008] Determine whether the first data set is a problem data set showing an abnormality in the application program;
[0009] If the first data set is a problematic data set that causes the application to display an abnormality, repairing the first data set;
[0010] The page to be displayed is displayed using the repaired first data set.
[0011] Optionally, determining whether the first data set is a problem data set in which the application displays an abnormality includes:
[0012] Determine whether the first data set is a problem data set for display abnormality of the application program according to whether the first data set is out of bounds and whether there is data with a null value in the first data set;
[0013] If the first data set is out of bounds and / or the first data set contains data with empty values, then the first data set is determined to be a problematic data set for the application program to display abnormally; or
[0014] If the first data set does not cross the boundary and the first data set does not contain any data with a null value, it is determined that the first data set is not the problematic data set causing the display abnormality of the application program.
[0015] Optionally, repairing the first data set includes:
[0016] If the first data set exceeds the boundary, M data are added to the first data set; the value of M is related to the number of the first data set that exceeds the boundary;
[0017] And / or, if the first data set contains data with a null value, the value of the data with a null value in the first data set is replaced with a first preset value.
[0018] Optionally, after determining whether the first data set is a problem data set for which the application program displays an abnormality, the method further includes:
[0019] If the first data set is a problem data set with abnormal display of the application, then reporting to the server of the application that the first data set is a problem data set with abnormal display of the application.
[0020] Optionally, the method further comprises:
[0021] Acquire a second data set of the current page of the application to be stored in the local database of the electronic device;
[0022] Determining whether the second data set is abnormal problem data stored by the application program;
[0023] If the second data set is a problematic data set with storage abnormality of the application program, repairing the second data set;
[0024] The repaired second data set is stored.
[0025] Optionally, the determining whether the second data set is a problematic data set of storage abnormality of the application program includes:
[0026] Determine whether the second data set is a problematic data set with storage abnormality of the application program according to whether the data format of the second data set is abnormal and whether there is data with a null value in the second data set;
[0027] If the data format of the second data set is wrong and / or the second data set contains data with empty values, it is determined that the second data set is a problematic data set with storage abnormality of the application program; or
[0028] If the data format of the second data set is correct and there is no empty data in the second data set, it is determined that the second data set is not the problematic data set of the storage abnormality of the application.
[0029] Optionally, repairing the second data set includes:
[0030] If the data format of the second data set is incorrect, performing type conversion on the second data set according to the type corresponding to the second data set;
[0031] And / or, if the second data set contains data with a null value, the value of the data with a null value in the second data set is replaced with a second preset value.
[0032] Optionally, after determining whether the second data set is a problematic data set that causes storage abnormality of the application, the method further includes:
[0033] If the second data set is a problematic data set with storage abnormality of the application, then reporting that the second data set is a problematic data set with storage abnormality to a server of the application.
[0034] In a second aspect, the present application provides a data processing device, the device is applied to an electronic device, an iOS client of an application is deployed on the electronic device, and the device includes:
[0035] An acquisition module, used for acquiring a first data set required for displaying a current page of the application;
[0036] A determination module, configured to determine whether the first data set is a problem data set showing an abnormality in the application program;
[0037] A repair module, configured to repair the first data set when the first data set is a problem data set showing an abnormality in the application program;
[0038] The display module is used to display the current page using the repaired first data set.
[0039] In a third aspect, the present application provides an electronic device, the electronic device comprising: at least one processor and a memory;
[0040] The memory stores computer-executable instructions;
[0041] The at least one processor executes the computer-executable instructions stored in the memory, so that the electronic device performs any method according to the first aspect.
[0042] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement any one of the methods in the first aspect.
[0043] In a fifth aspect, the present application provides a computer program product, including a computer program, which implements any method in the first aspect when executed by a processor.
[0044] The data processing method, device, equipment, storage medium and program product provided by the present application can first check whether the first data set required by the electronic device to display the page to be displayed of the application is a problem data set that will cause display abnormality before the electronic device displays the page to be displayed of the application. After checking that the first data set is a problem data set, the first data set can be repaired in time, so that the electronic device can use the repaired data set to display the page to be displayed. The method can repair the problem data set in time, thereby avoiding serious consequences such as abnormal display, crash and flash back of the APP page of the electronic device caused by abnormal data reading problems, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0046] Figure 1 It is a flowchart of a data processing method provided in an embodiment of the present application;
[0047] Figure 2 This is an example diagram of an interface of an electronic device provided in an embodiment of the present application;
[0048] Figure 3 This is an example diagram of an interface of another electronic device provided in an embodiment of the present application;
[0049] Figure 4 It is a flowchart of another data processing method provided in an embodiment of the present application;
[0050] Figure 5 This is a data flow diagram provided by an embodiment of the present application;
[0051] Figure 6 is a structural schematic diagram of a data processing device provided in an embodiment of the present application;
[0052] Figure 7 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application.
[0053] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0054] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0055] First, the terms used in this application are explained:
[0056] Application platform: refers to a platform used to review, display and download applications suitable for electronic devices.
[0057] Data format: refers to the combination of multiple data sets, including arrays, lists, dictionaries, etc.
[0058] The data type can be a numeric value, a character, or a binary number.
[0059] Array: refers to an ordered collection of multiple data of the same type. For example, Array = [1, 2, 3, 4].
[0060] List: Short for linear list, it refers to an ordered set of data of the same or different types arranged in a certain linear order. For example, list = [1,2,3,a].
[0061] Dictionary: refers to an unordered collection of data of the same or different types. For example, dict = {"username":"zhangsan","password":123456}.
[0062] Among them, each data in the array has a unique index value corresponding to it, and the index value of the first data in the array is 0. When there is data loss in the array, wrong index value, etc., the array may be out of bounds, that is, some index values of the array fail to correspond to the data in the array. For example: Under normal circumstances, the index values corresponding to the four data in the array Array1=[1,2,3,4] are 0, 1, 2, and 3 respectively. Exemplarily, when one data in the array is lost, for example, the array Array1′=[1,2,3] after the data is lost, and the index values of the array are still 0, 1, 2, and 3, there will be a situation where the index value 3 (representing the fourth data in the array) has no corresponding data.
[0063] Similarly, each data in the dictionary has a key value that uniquely corresponds to it. When data in the dictionary is lost or the key value is wrong, the dictionary may be out of bounds, that is, some key values of the dictionary fail to correspond to the data in the dictionary. For example: dictionary dict1 = {key1: value1, key2: value2}, which means that the key value key1 of the dictionary dict1 corresponds to the data value1, and the key value key2 corresponds to the data value2. For example, when the key value in the dictionary mistakenly has an extra key3, the key value key3 will have no corresponding data.
[0064] The above-mentioned array out-of-bounds and dictionary out-of-bounds can be collectively referred to as data out-of-bounds. Before an electronic device displays an APP page, it needs to read the data set required to display the page from the local database. If the data set has the above-mentioned array out-of-bounds and / or dictionary out-of-bounds problems, it may cause the APP page to have display anomalies such as a black screen, error messages, etc., and may also cause the APP to suddenly stop running and crash.
[0065] In addition, when the electronic device reads APP data from the local database, the data value read may be empty. Among them, the data value is empty refers to data without data value, such as null value (null), null pointer object (nil), etc. This situation will also cause the APP page to display abnormally.
[0066] The above-mentioned problems of data out of bounds and the read data value being empty can be collectively referred to as data reading abnormality problems. This problem can lead to serious consequences such as abnormal display of the APP page of the electronic device, APP crash and flash exit.
[0067] The current solution is to perform a run test before uploading the APP to the iOS application platform for users to download and use, in order to check for data reading anomalies that may occur during the actual use of the APP. The APP developer will handle the data reading anomalies exposed during the run test, then repackage the processed APP and submit it to the application platform for review before uploading it to the application platform. However, due to the short duration of the run test phase and the limited APP application scenarios involved in this phase, the actual use of the APP will still cause data reading anomalies that were not discovered during the test phase, such as APP page display anomalies, APP crashes, etc.
[0068] The above solution cannot avoid the consequences of abnormal APP page display, APP crash and other consequences caused by abnormal data reading during actual use of the APP.
[0069] Taking the above problems into consideration, the present application provides a data processing method, which changes the data reading method of the iOS system of the electronic device, so that when the electronic device is reading APP data, it can automatically repair the problem data set when the data reading is abnormal, thereby avoiding serious consequences such as abnormal APP page display, crash and flash back caused by abnormal data reading.
[0070] For example, the above data processing method can be rewritten by using the runtime mechanism method swizzling provided by the iOS system of the electronic device. Among them, Method swizzling is a tool that can rewrite the original data processing method of the iOS system into other custom methods. Regarding how to use Method swizzling to complete the rewriting of the data processing method, please refer to the prior art, which will not be repeated here.
[0071] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0072] Figure 1 is a flow chart of a data processing method provided in an embodiment of the present application. Figure 1 As shown, the method of the present application may include:
[0073] S101, obtaining a first data set required for displaying a to-be-displayed page of an application program.
[0074] The to-be-displayed page of the application refers to the next page that the application will jump to and display from the current page.
[0075] The data processing method provided in the present application does not limit the data format of the above-mentioned first data set. The data format of the first data set can be, for example, any one of an array, a list or a dictionary, but the present application is not limited thereto. The data format of the first data set can also be other types.
[0076] As a possible implementation method, the electronic device can obtain all the data required to display the page to be displayed based on the identifier of the page to be displayed of the application, such as the page name, page number, etc., and can also read all the data required for the page to be displayed from the local database of the electronic device and form these data into a first data set.
[0077] As another possible implementation, the electronic device may also compare all the data required to display the current page with all the data required to display the page to be displayed, and then determine the additional data required to display the page to be displayed when all the data required to display the current page is available. Then, the electronic device may obtain the additional data required to display the page to be displayed from the local database of the electronic device, and merge it with all the data required to display the current page to form a first data set.
[0078] In this implementation, the electronic device may also directly use the determined additional data required for displaying the page to be displayed when all the data required for displaying the current page are available as the first data set.
[0079] S102, determining whether the first data set is a problem data set that causes an application display abnormality.
[0080] Display anomalies refer to situations in which garbled characters appear on the page, the page is black, or a page error message appears when the application displays the page, and the page cannot be displayed normally.
[0081] Exemplarily, the electronic device can determine whether the first data set is a problem data set with abnormal application display according to whether the first data set is out of bounds and whether there is data with a null value in the first data set. Wherein, data with a null value refers to data without a data value, such as a null value (null), a null pointer object (nil), etc.
[0082] Exemplarily, when the data format of the first data set is an array, the electronic device can determine whether the first data set is out of bounds by comparing the number of data in the first data set with the maximum value of the index value. For example, if the first data set has m (m is an integer not less than 1) data, and the maximum value of the index value of the first data set is n (n is an integer not less than 0), then when m>n, it can be considered that the first data set is not out of bounds, and when m≤n, it can be considered that the first data set is out of bounds.
[0083] Alternatively, when the data format of the first data set is a dictionary, the electronic device can determine whether the first data set is out of bounds by comparing the number of data and the number of key values in the first data set. For example, if the first data set has m (m is an integer not less than 1) data and n (n is an integer not less than 1) key values, then when m≥n, it can be considered that the first data set is not out of bounds, and when m<n, it can be considered that the first data set is out of bounds.
[0084] For example, when the electronic device detects that the first data set is out of bounds but does not contain data with a value of null, the first data set contains data with a value of null but does not cross the bounds, or the first data set crosses the bounds and contains data with a value of null, the electronic device can determine that the first data set is a problem data set with abnormal application display. When the electronic device detects that the first data set does not cross the bounds and the first data set does not contain data with a value of null, the electronic device can determine that the first data set is not a problem data set with abnormal application display.
[0085] S103, when the first data set is a problematic data set that the application displays an abnormality, repair the first data set.
[0086] Exemplarily, when the first data set exceeds the boundary, the electronic device may add M (M is an integer not less than 1) data to the first data set; the value of M is related to the number of times the first data set exceeds the boundary.
[0087] For example, when the data format of the first data set is an array, and the first data set contains m (m is an integer not less than 1) data and the maximum index value is n (n is an integer not less than 0), if m is less than or equal to n, the electronic device can add M (M=n-m+1) data to the first data set so that m is greater than n.
[0088] And / or, when the first data set contains data whose value is empty, the electronic device may replace the value of the data whose value is empty in the first data set with a first preset value.
[0089] The first preset value may be user-defined, such as 0. Alternatively, the first preset value may be randomly selected by the electronic device. For example, when the data type in the first data set is a binary number and the first data set contains data with an empty value, the electronic device may randomly select "0" or "1" as the first preset value.
[0090] It should be understood that the above-mentioned electronic device randomly selects the first preset value, which may be that the electronic device randomly selects a first preset value and then replaces all empty data in the first data set with the value, or that the electronic device randomly selects the first preset value each time it encounters empty data. The present application does not impose any restrictions on this.
[0091] S104: Display the page to be displayed using the repaired first data set.
[0092] Exemplarily, the electronic device may use the repaired first data set to render and display the page to be displayed.
[0093] For example, the example diagram of the electronic device interface when the application page displays abnormally can refer to Figure 2 The page to be displayed using the repaired first data set can refer to Figure 3 .like Figure 2 As shown, when the first data set is a problem data set, if the electronic device directly uses the first data set to display the page to be displayed, the electronic device may display an error page instead of displaying the page to be displayed. Figure 3 When the electronic device uses the data processing method provided in the present application to perform the repair operation in the above step S103 on the first data set that causes the application page display abnormality, the electronic device can use the repaired first data set to display the page to be displayed, and display abnormalities such as page errors will not occur.
[0094] The data processing method provided by the present application can first check whether the first data set required to display the page to be displayed of the application is a problem data set that will cause display abnormality before the electronic device loads and displays the page to be displayed of the application. After checking that the first data set is a problem data set, the first data set can be repaired in time, so that the electronic device can use the repaired data set to display the page to be displayed of the application. The method can repair the problem data set in time, thereby avoiding serious consequences such as abnormal display of the APP page, crash and flash back caused by abnormal data reading problems, thereby improving the user experience.
[0095] Further, based on the above embodiment, that is, after determining that the first data set is a problem data set with abnormal display of the application, the data processing method provided in the present application can also report to the application server that the first data set is a problem data set with abnormal display of the application.
[0096] Exemplarily, when the first data set is an array, the electronic device can report a message to the server of the application program through the interface corresponding to the first data set to prompt that the first data set is a problematic data set with abnormal display of the application program. The message reported by the electronic device can include at least one of the following: the identifier of the first data set (e.g., the number of the first data set), the reason why the first data set causes the display abnormality (e.g., crossing the boundary), and the method by which the electronic device repairs the first data set (e.g., how many data values are added, and how many are the added data values).
[0097] For example, application developers can view the messages reported by the electronic device through the server. For example, application developers can use the messages reported by the electronic device to determine the location of the problem data set that causes the display abnormality of the application and the reason why the data set causes the display abnormality. By collecting the above information, application developers can repair the collected problem data set when the next version of the application is upgraded or a patch is uploaded.
[0098] In addition, when an electronic device runs an APP, it generates operating data, which needs to be stored in a local database. When an electronic device runs an APP to implement its different functions, it generates operating data in different data formats, and the data format of the operating data corresponding to a certain function of the APP should be the same. If the operating data generated by an electronic device when running an APP to implement a certain function contains data that does not conform to the correct data format of the operating data corresponding to the function, the data can be called data with an incorrect data format. When storing data with an incorrect data format, storage anomalies such as storage failure and data loss will occur.
[0099] When the electronic device is storing the running data of the APP in the local database, the running data may be empty. The empty data refers to data without data value, such as null value, null pointer object (nil), etc. This situation will also cause APP storage abnormality.
[0100] The above-mentioned problems of incorrect data format and empty data values can be collectively referred to as data storage anomalies. Such problems can lead to serious consequences such as APP storage anomalies, APP crashes, and flash exits.
[0101] At present, the solution to the above problem is to use the running test process before uploading the APP to the application platform to discover and deal with some of the above data storage anomalies, and then repackage the processed APP and submit it to the application platform for review before uploading it to the application platform. However, the above solution cannot avoid the consequences of APP storage anomalies, APP crashes, etc. caused by data storage anomalies during the actual use of the APP.
[0102] Taking the above problems into consideration, the present application further provides a data processing method based on the above embodiments. When a data storage abnormality occurs during the operation of an APP on an electronic device, the method can promptly repair the problem data set, thereby avoiding consequences such as APP storage abnormality, APP crash, etc. caused by the data storage abnormality.
[0103] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments.
[0104] Figure 4 FIG. 1 is a flow chart of another data processing method provided in an embodiment of the present application. Figure 4 As shown, the data processing method provided by the present application may further include:
[0105] S201, obtaining a second data set of the current page of the application to be stored in the local database of the electronic device.
[0106] The current page of the application refers to the page that the application is displaying.
[0107] The data processing method provided in the present application does not limit the data format of the second data set. The data format of the second data set may be, for example, any one of an array, a list or a dictionary, but the present application is not limited thereto. The data format of the second data set may also be other types.
[0108] Exemplarily, a processor that loads the current page of the application from the electronic device may provide a second data set of the current page of the application to be stored in a local database of the electronic device.
[0109] S202: Determine whether the second data set is problematic data with storage exception of the application program.
[0110] Storage anomalies refer to situations such as storage failure and data loss that occur when the running data of an application is stored.
[0111] Exemplarily, the electronic device may determine whether the second data set is a problematic data set with storage abnormality of the application program according to whether the data format of the second data set is abnormal and whether there is data with empty values in the second data set.
[0112] Exemplarily, when the data format of the second data set is wrong but there is no data with a value of null, when the data format of the second data set is correct but there is data with a value of null, when the data format of the second data set is wrong and there is data with a value of null, the electronic device can determine that the second data set is a problem data set with abnormal application storage. When the data format of the second data set is correct and there is no data with a value of null in the second data set, the electronic device can determine that the second data set is not a problem data set with abnormal application storage.
[0113] S203, when the second data set is a problematic data set with storage exception of the application program, repair the second data set.
[0114] Exemplarily, when the data format of the second data set is wrong, the electronic device can perform type conversion on the second data set according to the type corresponding to the second data set. The data format error of the second data set means that the data format of the second data set does not conform to the correct data format of the running data generated by the corresponding application function.
[0115] For example, the data format of the second data set is an array, and the correct data format of the operation data generated by the function of the corresponding application program is a dictionary, then the electronic device can convert the data format of the second data set into a dictionary.
[0116] For specific conversion methods between data formats, please refer to the prior art and will not be described in detail here.
[0117] And / or, when the second data set contains data whose value is empty, the electronic device may replace the value of the data whose value is empty in the second data set with a second preset value.
[0118] The second preset value may be user-defined, such as 0. Alternatively, the first preset value may be randomly selected by the electronic device. For example, when the data type of the second data set is a numerical value, the electronic device may randomly select a numerical value in a certain numerical range (such as 0 to 9) as the second preset value.
[0119] It should be understood that the above-mentioned electronic device randomly selects the second preset value, which may be that the electronic device randomly selects a second preset value and then replaces all empty data in the second data set with the value, or that the electronic device randomly selects the second preset value each time it encounters empty data. The present application does not impose any restrictions on this.
[0120] S204: Store the repaired second data set.
[0121] Exemplarily, the electronic device may store the repaired second data set in a local database.
[0122] The data processing method provided by the present application can first determine whether the data format of the second data set generated by the operation of the application is a problem data set that will cause application storage abnormalities before the electronic device stores the second data set into the local database. After checking that the second data set is a problem data set, the second data set can be repaired in a timely manner so that the second data set can be successfully saved in the local database, thereby avoiding serious consequences such as storage failure, data loss, application crash and flash exit caused by the problem data set, thereby improving the user experience.
[0123] Further, based on the above embodiment, that is, after determining that the second data set is a problematic data set with storage abnormality of the application, the data processing method provided in the present application can also report to the application server that the second data set is a problematic data set with storage abnormality.
[0124] Exemplarily, the electronic device may report to the server of the application program that the second data set is a problematic data set with storage abnormality.
[0125] How the electronic device reports the above message and the purpose of reporting the message can be found in the above embodiments and will not be described in detail here.
[0126] On the one hand, the data processing method provided in the embodiment of the present application can check the data set before the electronic device stores and / or reads the data of the application, and automatically repair the problematic data set in time, thereby ensuring the continuity of the electronic device running the application. On the other hand, the above method can also report the problematic data set to the application server, so that the developer can accurately obtain the relevant information of the problematic data set and completely repair the problematic data set when the application is upgraded or patched for the next time.
[0127] For example, all or part of the methods in the above embodiments can be implemented by adding a packaged data processing container to the electronic device. Taking the electronic device implementing all the methods in the above embodiments through the data processing container as an example, the data flow diagram involved in the data processing method provided in this application can be referred to. Figure 5 .
[0128] like Figure 5As shown, when the electronic device runs the application, it will generate a second data set (the operation data of the application). Before storing it in the local database of the electronic device, the electronic device can detect whether the second data set is a problem data set that causes the application storage abnormality. If the electronic device detects that the second data set is not a problem data set, the electronic device can store it in the local database. Alternatively, if the electronic device detects that the second data set is a problem data set, the electronic device can repair it and report its information to the server of the application, and can also store the repaired second data set in the local database.
[0129] Continue to refer to Figure 5 Before the electronic device displays the page to be displayed of the application, it is necessary to read the first data set required to display the page to be displayed from the local database of the electronic device. Before the electronic device uses the first data set to display the page to be displayed, the electronic device can detect whether the first data set is a problem data set that causes the application to display abnormally. If the electronic device detects that the first data set is not a problem data set, the electronic device can use the first data set to render and display the page to be displayed of the application. Alternatively, if the electronic device detects that the first data set is a problem data set, the electronic device can repair it and report its information to the server of the application, and can also use the repaired first data set to render and display the page to be displayed of the application.
[0130] Figure 6 Schematic diagram of a data processing device provided in an embodiment of the present application. Figure 6 As shown, the device includes: an acquisition module 21, a determination module 22, a repair module 23 and a display module 24. Optionally, the device may also include: a reporting module 25 and / or a storage module 26. Among them:
[0131] An acquisition module 21, used to acquire a first data set required for displaying a current page of an application program;
[0132] A determination module 22, used to determine whether the first data set is a problem data set that causes the application to display an abnormality;
[0133] A repair module 23, configured to repair the first data set when the first data set is a problem data set showing an abnormality in the application program;
[0134] The display module 24 is configured to display the current page using the repaired first data set.
[0135] Optionally, the determination module 22 is specifically used to determine whether the first data set is a problem data set with application display abnormality based on whether the first data set is out of bounds and whether there is data with empty values in the first data set; determine that the first data set is a problem data set with application display abnormality when the first data set is out of bounds and / or there is data with empty values in the first data set; or determine that the first data set is not a problem data set with application display abnormality when the first data set does not cross the bounds and there is no data with empty values in the first data set.
[0136] Optionally, the repair module 23 is specifically used to add M data to the first data set when the first data set is out of bounds; the value of M is related to the number of times the first data set is out of bounds; and / or, when there is data with a null value in the first data set, replace the value of the data with a null value in the first data set with a first preset value.
[0137] Optionally, the reporting module 25 is configured to report to the server of the application program that the first data set is a problem data set with display abnormality of the application program after determining that the first data set is a problem data set with display abnormality of the application program.
[0138] Optionally, the acquisition module 21 is also used to obtain a second data set of the current page of the application to be stored in the local database of the electronic device; the determination module 22 is also used to determine whether the second data set is problem data of abnormal storage of the application; the repair module 23 is also used to repair the second data set when the second data set is a problem data set of abnormal storage of the application; the storage module 26 is used to store the repaired second data set.
[0139] Optionally, the determination module 22 is further used to determine whether the second data set is a problem data set with application storage abnormality based on whether the data type of the second data set is abnormal and whether there is data with empty values in the second data set; determine that the second data set is a problem data set with application storage abnormality when the data type of the second data set is wrong and / or there is data with empty values in the second data set; or determine that the second data set is not a problem data set with application storage abnormality when the data type of the second data set is correct and there is no data with empty values in the second data set.
[0140] Optionally, the repair module 23 is also used to convert the type of the second data set according to the type corresponding to the second data set when the data type of the second data set is incorrect; and / or, when there is data with a value of null in the second data set, replace the value of the data with a value of null in the second data set with a second preset value.
[0141] Optionally, the reporting module 25 is further configured to report to the server of the application program that the second data set is a problematic data set with storage abnormality after determining that the second data set is a problematic data set with storage abnormality of the application program.
[0142] The data processing device provided in this application is used to execute the aforementioned data processing method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0143] Figure 7 Schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 7 As shown, the electronic device 400 may include: at least one processor 401 and a memory 402 .
[0144] The memory 402 is used to store programs. Specifically, the programs may include program codes, and the program codes include computer operation instructions.
[0145] The memory 402 may include a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0146] The processor 401 is used to execute the computer-executable instructions stored in the memory 402 to implement the data processing method described in the aforementioned method embodiment. The processor 401 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
[0147] Optionally, the electronic device 400 may further include a display screen 404 for displaying an image rendered after the processor 401 performs mathematical and geometric calculations.
[0148] Optionally, the electronic device 400 may further include a communication interface 403. In a specific implementation, if the communication interface 403, the memory 402 and the processor 401 are implemented independently, the communication interface 403, the memory 402 and the processor 401 may be interconnected through a bus and communicate with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc., but it does not mean that there is only one bus or one type of bus.
[0149] Optionally, in a specific implementation, if the communication interface 403, the memory 402 and the processor 401 are integrated on a chip, the communication interface 403, the memory 402 and the processor 401 can complete communication through an internal interface.
[0150] The present application also provides a computer-readable storage medium, which may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a RAM memory, a disk or an optical disk, and other media that can store program codes. Specifically, the computer-readable storage medium stores program instructions, and the program instructions are used for the data processing method in the above-mentioned embodiment.
[0151] The present application also provides a program product, which includes an execution instruction, which is stored in a readable storage medium. At least one processor of the electronic device can read the execution instruction from the readable storage medium, and at least one processor executes the execution instruction so that the electronic device implements the data processing method provided by the various embodiments described above.
[0152] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A data processing method, characterized in that: The method is applied to an electronic device, on which an iOS client of an application is deployed, and the method comprises: Acquire a first data set required for displaying a to-be-displayed page of the application; Determine whether the first data set is a problem data set showing an abnormality in the application program; If the first data set is a problematic data set that causes the application to display an abnormality, repairing the first data set; Displaying the to-be-displayed page using the repaired first data set; The determining whether the first data set is a problem data set where the application displays an abnormality, includes: Determine whether the first data set is a problem data set for display abnormality of the application program according to whether the first data set is out of bounds and whether there is data with a null value in the first data set; If the first data set is out of bounds and / or the first data set contains data with empty values, then the first data set is determined to be a problematic data set for the application program to display abnormally; or If the first data set does not cross the boundary and there is no empty data in the first data set, it is determined that the first data set is not the problem data set causing the display abnormality of the application program; The repairing the first data set comprises: If the first data set exceeds the boundary, M data are added to the first data set; the value of M is related to the number of the first data set that exceeds the boundary; And / or, if the first data set contains data with a null value, the value of the data with a null value in the first data set is replaced with a first preset value.
2. The method according to claim 1, characterized in that After determining whether the first data set is a problem data set where the application displays an abnormality, the method further includes: If the first data set is a problem data set with abnormal display of the application, then reporting to the server of the application that the first data set is a problem data set with abnormal display of the application.
3. The method according to claim 1, characterized in that The method further comprises: Acquire a second data set of the current page of the application to be stored in the local database of the electronic device; Determining whether the second data set is abnormal problem data stored by the application program; If the second data set is a problematic data set with storage abnormality of the application program, repairing the second data set; The repaired second data set is stored.
4. The method according to claim 3, characterized in that The determining whether the second data set is a problematic data set for storage abnormality of the application program includes: Determining whether the second data set is a problematic data set with storage abnormality of the application program according to whether the data format of the second data set is abnormal and whether there is data with a null value in the second data set; If the data format of the second data set is wrong and / or the second data set contains data with empty values, it is determined that the second data set is a problematic data set with storage abnormality of the application program; or If the data format of the second data set is correct and there is no empty data in the second data set, it is determined that the second data set is not the problematic data set of the storage abnormality of the application.
5. The method according to claim 4, characterized in that The repairing the second data set comprises: If the data format of the second data set is incorrect, performing type conversion on the second data set according to the type corresponding to the second data set; And / or, if the second data set contains data with a null value, the value of the data with a null value in the second data set is replaced with a second preset value.
6. The method according to claim 3, characterized in that: After determining whether the second data set is a problematic data set for storage abnormality of the application program, the method further includes: If the second data set is a problematic data set with storage abnormality of the application, then reporting that the second data set is a problematic data set with storage abnormality to a server of the application.
7. A data processing device, characterized in that: The device is applied to an electronic device, on which an iOS client of an application is deployed, and the device includes: An acquisition module, used for acquiring a first data set required for displaying a current page of the application; A determination module, configured to determine whether the first data set is a problem data set showing an abnormality in the application program; A repair module, configured to repair the first data set when the first data set is a problem data set showing an abnormality in the application program; A display module, configured to display the current page using the repaired first data set; The determining module is configured to determine whether the first data set is a problem data set for displaying abnormality of the application program according to whether the first data set is out of bounds and whether there is data with a null value in the first data set; If the first data set is out of bounds and / or the first data set contains data with empty values, then the first data set is determined to be a problematic data set for the application program to display abnormally; or If the first data set does not cross the boundary and there is no empty data in the first data set, it is determined that the first data set is not the problem data set causing the display abnormality of the application program; The repair module is specifically configured to add M data to the first data set when repairing the first data set being out of bounds; the value of M is related to the number of the first data set being out of bounds; And / or, when there is data with a value of null in the first data set, the value of the data with a value of null in the first data set is replaced with a first preset value.
8. An electronic device, characterized in that: The electronic device comprises: at least one processor and a memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the electronic device performs the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method according to any one of claims 1 to 6.
10. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 6 when being executed by a processor.
