Information processing method, device, electronic device and storage medium
By obtaining module high-level description and content information from the server, partial replacement of native modules of video APPs is solved, and the problem of waste of storage resources in the existing technology is realized, and flexible and efficient module replacement is realized.
Patent Information
- Application Number
- CN202310022039.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-06
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2043-01-06
AI Technical Summary
In the prior art, replacing native modules of video APPs requires the replacement of all modules as a whole, resulting in waste of storage resources and excessive installation package size.
By downloading the module height description information and content information of the target module from the server, partial replacement of the native module is realized, avoiding replacing all modules at the same time, reducing time and labor costs, and no need to modify the native code.
It reduces the waste of time and storage resources, realizes flexible replacement of native modules, and avoids the problem of excessive installation package size.
Smart Images

Figure CN115934977B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and more particularly, to an information processing method, apparatus, electronic device, and storage medium. Background Art
[0002] With the development of technology, various types of applications (APPs) have emerged one after another. For example, users can use video apps to watch videos, use news apps to browse news, use audio apps to listen to music, and so on.
[0003] For video apps, they can contain multiple service tags (tabs), each service tag can correspond to a functional module, and the functions implemented by different functional modules are different. For example, the functional module can be used to recommend videos, to recommend downloading apps, or to recommend user information, etc. In the related art, when you want to replace a native module under a certain service tag, you need to replace all native modules under the service tag as a whole. Moreover, for each native module, you need to modify the native code in the APP to replace the native module, which will cause the size of the APP installation package after replacing the native module to be too large, and will consume more storage resources. Summary of the Invention
[0004] The present disclosure provides an information processing method, apparatus, electronic device, and storage medium to at least solve the problem in the above-mentioned related technologies that the size of the APP installation package after replacing the native module is too large, which consumes more storage resources.
[0005] According to a first aspect of an embodiment of the present disclosure, there is provided an information processing method, which is applied to a terminal, comprising: in response to a startup instruction for a target application, obtaining from a server module height description information of at least one target module under each of a plurality of service tags contained in the target application, wherein there is at least one native module under each of the plurality of service tags, the native module being an original development module obtained by developing for the target application, and the target module being a module for replacing the native module; in response to a selection instruction for a first service tag among the plurality of service tags, obtaining from the server content information of at least one target module under the first service tag; for each target module under the first service tag, determining the actual height of the target module based on the module height description information of the target module; and in a case where it is detected that a first target module among the at least one target module under the first service tag is exposed within the screen of the terminal, displaying the content information of the first target module within the first target module based on the actual height of the first target module.
[0006] Optionally, determining the actual height of the target module based on the module height description information of the target module includes: determining, based on the module height description information of the target module, that the content information of the target module includes at least one of tag information, multimedia resource information and list type information, determining the height corresponding to each of the at least one item; and determining the sum of at least one height corresponding to the at least one item as the actual height of the target module.
[0007] Optionally, the content information of the target module includes the label information, and determining the height corresponding to each of the at least one item includes: determining the first parameter position corresponding to the label information in the module height description information of the target module; determining the first height pre-configured at the first parameter position; and determining the first height as the height corresponding to the label information.
[0008] Optionally, determining the first height as the height corresponding to the label information includes: determining the number of label elements contained in the label information; determining a preset number threshold pre-configured at the first parameter position; and when the number of label elements is greater than or equal to the preset number threshold, determining the first height as the height corresponding to the label information.
[0009] Optionally, the content information of the target module includes the list-type information, and the list-type information includes at least one list element. Determining the height corresponding to each of the at least one item includes: determining the second parameter position corresponding to the list-type information in the module height description information of the target module; determining the height of a single list element pre-configured at the second parameter position; and determining the product of the height of a single list element and the number of the at least one list element as the height corresponding to the list-type information.
[0010] Optionally, the content information of the target module includes the multimedia resource information, and determining the height corresponding to each of the at least one item includes: determining the third parameter position corresponding to the multimedia resource information in the module height description information of the target module; determining the base height of the multimedia resource information pre-configured at the third parameter position, wherein the base height is a height based on a base screen width; and determining the height corresponding to the multimedia resource information based on the base height, the base screen width, and the width of the screen of the terminal.
[0011] Optionally, it also includes: for each list element in the at least one list element, obtaining a first distance between the top of the list element and the top of the screen of the terminal; based on the first distance and the height of the list element, determining whether the list element contained in the target module has been exposed within the screen of the terminal; if the list element contained in the target module has been exposed within the screen of the terminal, sending an exposure notification to the server, wherein the exposure notification is used to indicate that the list element contained in the target module has been exposed within the screen of the terminal.
[0012] Optionally, determining whether the list element included in the target module has been exposed within the screen of the terminal based on the first distance and the height of the list element includes: when the first distance is less than the height of the screen of the terminal and the sum of the first distance and the height of the list element is greater than a preset threshold, determining that the list element included in the target module has been exposed within the screen of the terminal.
[0013] Optionally, it also includes: obtaining content information of at least one native module under the first service tag from the server; when it is detected that the first native module among the at least one native module under the first service tag is exposed on the screen of the terminal, displaying the content information of the first native module in the first native module.
[0014] According to a second aspect of an embodiment of the present disclosure, there is provided an information processing apparatus, applied to a terminal, comprising: a module height description information acquisition module, configured to, in response to a startup instruction for a target application, acquire, from a server, module height description information of at least one target module under each of a plurality of service tags contained in the target application, wherein each of the plurality of service tags contains at least one native module, the native module being an original development module obtained by developing for the target application, and the target module being a module used to replace the native module; a target content information acquisition module, configured to, in response to a selection instruction for a first service tag among the plurality of service tags, acquire, from the server, content information of at least one target module under the first service tag; an actual height determination module, configured to, for each target module under the first service tag, determine, based on the module height description information of the target module, an actual height of the target module; and a target content information display module, configured to, upon detecting that a first target module among the at least one target module under the first service tag is exposed within the screen of the terminal, display the content information of the first target module within the first target module based on the actual height of the first target module.
[0015] Optionally, the actual height determination module is configured to: based on the module height description information of the target module, determine that the content information of the target module includes at least one of tag information, multimedia resource information and list type information, determine the height corresponding to each of the at least one item; determine the sum of at least one height corresponding to the at least one item as the actual height of the target module.
[0016] Optionally, the content information of the target module includes the label information, and the actual height determination module is configured to: determine the first parameter position corresponding to the label information in the module height description information of the target module; determine the first height pre-configured at the first parameter position; and determine that the first height is the height corresponding to the label information.
[0017] Optionally, the actual height determination module is configured to: determine the number of label elements contained in the label information; determine a preset number threshold pre-configured at the first parameter position; and when the number of label elements is greater than or equal to the preset number threshold, determine that the first height is the height corresponding to the label information.
[0018] Optionally, the content information of the target module includes the list-type information, and the list-type information includes at least one list element. The actual height determination module is configured to: determine the second parameter position corresponding to the list-type information in the module height description information of the target module; determine the height of a single list element pre-configured at the second parameter position; and determine the product of the height of a single list element and the number of the at least one list element as the height corresponding to the list-type information.
[0019] Optionally, the content information of the target module includes the multimedia resource information, and the actual height determination module is configured to: determine the third parameter position corresponding to the multimedia resource information in the module height description information of the target module; determine the base height of the multimedia resource information pre-configured at the third parameter position, wherein the base height is a height based on a base screen width; and determine the height corresponding to the multimedia resource information based on the base height, the base screen width, and the width of the screen of the terminal.
[0020] Optionally, the information processing device also includes: a first distance acquisition module, configured to obtain, for each list element of the at least one list element, a first distance between the top of the list element and the top of the screen of the terminal; an exposure determination module, configured to determine whether the list element contained in the target module has been exposed within the screen of the terminal based on the first distance and the height of the list element; an exposure notification sending module, configured to send an exposure notification to the server when the list element contained in the target module has been exposed within the screen of the terminal, wherein the exposure notification is used to indicate that the list element contained in the target module has been exposed within the screen of the terminal.
[0021] Optionally, the exposure determination module is configured to: when the first distance is less than the height of the screen of the terminal and the sum of the first distance and the height of the list element is greater than a preset threshold, determine that the list element contained in the target module has been exposed within the screen of the terminal.
[0022] Optionally, the information processing device also includes: a native content information acquisition module, configured to obtain content information of at least one native module under the first service tag from the server; a native content information display module, configured to display the content information of the first native module in the first native module when it is detected that the first native module among the at least one native module under the first service tag is exposed in the screen of the terminal.
[0023] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the information processing method according to the present disclosure.
[0024] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the information processing method according to the present disclosure.
[0025] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, comprising computer instructions, which implement the information processing method according to the present disclosure when executed by at least one processor.
[0026] The technical solutions provided by the embodiments of the present disclosure bring at least the following beneficial effects:
[0027] By downloading the module height description information and content information of at least one target module from the server, partial replacement of the native module under a certain service tag can be achieved, avoiding the replacement of all native modules at the same time, which can greatly reduce time and labor costs; and, there is no need to modify the native code in the APP to achieve the replacement of the native module, which can avoid the situation where the native code is modified for each native module, resulting in an excessively large size of the APP installation package, and can save storage resources.
[0028] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] The accompanying drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute an improper limitation of the present disclosure.
[0030] Figure 1 is a flowchart illustrating an information processing method according to an exemplary embodiment of the present disclosure;
[0031] Figure 2 is a schematic diagram illustrating tag information according to an exemplary embodiment of the present disclosure;
[0032] Figure 3 is a schematic diagram illustrating list-type information according to an exemplary embodiment of the present disclosure;
[0033] Figure 4 is a schematic diagram illustrating multimedia resource information according to an exemplary embodiment of the present disclosure;
[0034] Figure 5 is a schematic diagram showing that a target module according to an exemplary embodiment of the present disclosure includes tag information, multimedia resource information, and list type information;
[0035] Figure 6 is a schematic diagram illustrating a mixed arrangement of native modules and RN modules according to an exemplary embodiment of the present disclosure;
[0036] Figure 7 is a schematic diagram illustrating a method of calculating whether a list element is exposed according to an exemplary embodiment of the present disclosure;
[0037] Figure 8 is a schematic diagram illustrating a process of loading, rendering, and exposing an RN module according to an exemplary embodiment of the present disclosure;
[0038] Figure 9 1 is a schematic diagram illustrating a process of exposing and tracking points using an RN module according to an exemplary embodiment of the present disclosure;
[0039] Figure 10 is a block diagram illustrating an information processing apparatus according to an exemplary embodiment of the present disclosure;
[0040] Figure 11 is a block diagram illustrating an electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0041] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
[0042] It should be noted that the terms "first," "second," and the like in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the numbers used in this manner are interchangeable where appropriate so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The implementation methods described in the following examples do not represent all implementation methods consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with certain aspects of the present disclosure as detailed in the appended claims.
[0043] It should be noted that the phrase "at least one of the items" in this disclosure includes three types of parallel situations: "any one of the items", "a combination of any multiple items of the items", and "all of the items". For example, "including at least one of A and B" includes the following three parallel situations: (1) including A; (2) including B; (3) including A and B. For another example, "performing at least one of step 1 and step 2" includes the following three parallel situations: (1) performing step 1; (2) performing step 2; and (3) performing steps 1 and 2.
[0044] In the related art, if you want to replace a native module under a service tag, you need to replace all native modules under that service tag as a whole. Replacing all native modules at the same time requires a lot of time and cross-departmental communication costs. In addition, for each native module, the native code must be modified within the app to replace the native module. This will result in the size of the app installation package after the native module is replaced being too large, consuming a lot of storage resources.
[0045] In order to solve the above-mentioned problems in the related art, the information processing method provided by the present disclosure can realize partial replacement of native modules under a certain service tag by downloading module height description information and content information of at least one target module from the server, avoiding replacing all native modules at the same time, which can greatly reduce time and labor costs; and, there is no need to modify the native code in the APP to realize the replacement of the native module, which can avoid the situation where the size of the APP installation package is too large due to modifying the native code for each native module, and can save storage resources.
[0046] Figure 1 is a flowchart illustrating an information processing method according to an exemplary embodiment of the present disclosure, which is applied to a terminal.
[0047] Reference Figure 1 In step 101, in response to a startup instruction for a target application, module height description information of at least one target module under each of multiple service tags included in the target application can be obtained from a server. Each of the multiple service tags contains at least one native module. A native module is an original development module obtained by developing for the target application, and a target module is a module used to replace the native module.
[0048] The above-mentioned "service tag" is the service tab, and different service tags have different functions. For example, some service tags can be used to recommend multimedia resources, some service tags can be used to recommend user information, and some service tags can be used to recommend downloading apps, etc. The above-mentioned "target module" can be a (React Native, RN) module. Each target module can correspond to a module height description information. The module height description information is the grammatical information used to calculate the actual height of the target module. The module height description information of different target modules can be different.
[0049] In step 102, in response to a selection instruction for a first service tag among multiple service tags, content information of at least one target module under the first service tag may be obtained from a server. As previously mentioned, different service tags have different functions, i.e., the content information of modules under different service tags is different.
[0050] For example, if the first service tag is a recommended multimedia resource service tag, multimedia resource information displayed by at least one RN module under the recommended multimedia resource service tag may be obtained from the server, wherein the multimedia resource information may be picture information or video information.
[0051] If the first service tag is a recommended APP download service tag, the APP recommended download information displayed by at least one RN module under the recommended APP download service tag can be obtained from the server. The APP recommended download information can include the name of the recommended download APP, the size of the space occupied, and other information.
[0052] If the first service tag is a recommended user information service tag, the user recommendation information displayed by at least one RN module under the recommended user information service tag can be obtained from the server. The user recommendation information can include the nickname, avatar and other information of the recommended user.
[0053] In step 103, for each target module under the first service tag, the actual height of the target module can be determined based on the module height description information of the target module. As mentioned above, the module height description information is the grammatical information used to calculate the actual height of the target module. The module height description information can include three parts: "version", "input parameters", and "formula". For example, the module height description information of a target module can be: "v1.0:c(content.title),@200+100*$1".
[0054] The "version" field can begin with "v" and end with ":". The specific version number can consist of numbers and periods. For example, the "v1.0:" in the module height description information "v1.0:c(content.title),@200+100*$1" indicates that the specific version of the module height description information is version 1.0.
[0055] The above "input parameter" can be represented by "c()". The input parameter can start with the letter "C". The brackets indicate access to data, perform calculation operations, and return a number. Depending on the data type accessed, the return value can be specified as follows:
[0056] 1) Array: returns the number of arrays;
[0057] 2) Number: If it is the number 0, it returns 0, and other numbers return 1;
[0058] 3) String: Returns 1 if the string has a length, otherwise returns 0 (string with zero length or empty);
[0059] 4) Dictionary: Returns 1 if it is not empty (contains at least one key-value pair), otherwise returns 0;
[0060] 5) Boolean: False returns 0, True returns 1.
[0061] For example, in the module height description information “v1.0:c(content.title),@200+100*$1”, “c(content.title)” may indicate access to the title of the content.
[0062] The above "formula" is used to calculate the module height based on the specific content contained in the RN module. For example, in the module height description information "v1.0:c(content.title),@200+100*$1", "@200+100*$1" is the calculation formula for the corresponding RN module height. Among them:
[0063] 1) "100" indicates a normal fixed value;
[0064] 2) "@200" indicates that the value needs to be calculated based on the ratio of the terminal screen width to the reference screen width;
[0065] 3) "$1" indicates the input parameter calculation value, and the number after $ indicates the parameter position in the module height description information.
[0066] According to an exemplary embodiment of the present disclosure, when it is determined that the content information of the target module includes at least one of tag information, multimedia resource information, and list information based on the module height description information of the target module, the height corresponding to each of the at least one item can be determined. Then, the sum of the at least one height corresponding to the at least one item can be determined as the actual height of the target module.
[0067] It should be noted that the exact height of the RN module cannot be known before rendering, so when it is mixed with native modules, the height changes before and after loading will cause page jumps. Therefore, for each RN module, the actual height of the RN module can be determined based on the module height description information of the RN module. This can ensure that when the RN module is mixed with native modules, the height changes before and after the RN module is loaded will not cause page jumps. The RN module can be exposed and displayed at a stable and unchanging height, ensuring the stability of the page display.
[0068] According to an exemplary embodiment of the present disclosure, the content information of the target module may include tag information, and a first parameter position corresponding to the tag information in the module height description information of the target module may be determined. Then, a first height pre-configured at the first parameter position may be determined. Next, the first height may be determined to be the height corresponding to the tag information.
[0069] Figure 2 : is a schematic diagram showing a tag information according to an exemplary embodiment of the present disclosure. Figure 2, the label information is “car, bicycle, truck, electric car”, among which “car”, “bicycle”, “truck” and “electric car” are the four label elements contained in the label information.
[0070] Assume that the module height description information of the target module is "v1.0:c(tabs), 100*$1". Since the tag information contains 4 tag elements, c(tabs) can return the array quantity 4, that is, it can be detected at this time that the target module contains tag information. In addition, since c(tabs) is at the first parameter position in the module height description information "v1.0:c(tabs), 100*$1", the pre-configured first height of $1 is 100, it can be determined that the first height 100 is the height corresponding to the tag information "tabs".
[0071] It should be noted that the scenario corresponding to the tag information is a fixed height scenario, that is, the height corresponding to the content information of the tag information is fixed to the height pre-configured in the module height description information. When the RN module only contains tag information, the actual height of the RN module is the fixed height corresponding to the tag information.
[0072] According to an exemplary embodiment of the present disclosure, the number of tag elements included in the tag information can be determined. Then, a preset number threshold pre-configured at the first parameter position can be determined. Next, if the number of tag elements is greater than or equal to the preset number threshold, the first height can be determined as the height corresponding to the tag information.
[0073] Assume that the module height description information of the target module is "v1.0:c(tabs),100*($1>3)". As mentioned above, Figure 2 In the example, the number of label elements included in the label information is 4, and it can be determined that the preset number threshold pre-configured for the label information at the first parameter position corresponding to the module height description information of the target module is 3. In this case, since the number of label elements 4 is greater than the preset number threshold 3, it can be determined that the first height pre-configured at the first parameter position is the height corresponding to the label information. If the number of label elements is less than the preset number threshold, the display of the label information in the target module can be prohibited.
[0074] In this way, whether to display the label information can be decided based on the number of label elements contained in the detected label information and the preset number threshold. When deciding to display the label information, the height corresponding to the label information can be determined based on the first height pre-configured in the module height description information, making the display of the label information more flexible.
[0075] According to an exemplary embodiment of the present disclosure, the content information of the target module may include list-type information, and the list-type information may include at least one list element. A second parameter position corresponding to the list-type information in the module height description information of the target module may be determined. Then, the height of a single list element pre-configured at the second parameter position may be determined. Next, the product of the height of the single list element and the number of the at least one list element may be determined as the height corresponding to the list-type information.
[0076] Figure 3 1 is a schematic diagram showing a list of information according to an exemplary embodiment of the present disclosure. Figure 3 The list information contains a total of 3 list elements (items), namely item1, item2, and item3. In addition, item1 displays the relevant information of the recommended user A, including user A's avatar, the video account he follows, the number of users following user A, etc.; item2 displays the relevant information of the recommended user B, including user B's avatar, the video account he follows, the number of users following user B, etc.; item3 displays the relevant information of the recommended user C, including user C's avatar, the video account he follows, the number of users following user C, etc.
[0077] Assume that the module height description information of the target module is "v1.0:c(items), 200*$1". Since the list-type information contains 3 items, c(items) can return the array quantity 3, that is, at this time it can be detected that the target module contains list-type information. Moreover, since the height of the single list element pre-configured at the second parameter position of c(items) in the module height description information "v1.0:c(items), 200*$1" of the target module, that is, $1, is 200, it can be determined that the product of the height of the single list element 200 and the quantity 3 of at least one list element, 600, is the height corresponding to the list-type information. At this time, the actual height of the list-type information contained in the target module displayed on the screen of the user's terminal is 600.
[0078] According to an exemplary embodiment of the present disclosure, the content information of the target module may include multimedia resource information, wherein the multimedia resource information may be image information or video information. The third parameter position corresponding to the multimedia resource information in the module height description information of the target module may be determined. Then, the reference height of the multimedia resource information pre-configured at the third parameter position may be determined, wherein the reference height is a height based on a reference screen width. Next, the height corresponding to the multimedia resource information may be determined based on the reference height, the reference screen width, and the width of the terminal screen.
[0079] Figure 4 FIG. 1 is a schematic diagram showing multimedia resource information according to an exemplary embodiment of the present disclosure. Figure 4 The multimedia resource information contains three video information items: video information 1, video information 2, and video information 3. Furthermore, video information 1 displays the relevant information of the recommended video 1, including its cover, 160 million views, etc.; video information 2 displays the relevant information of the recommended video 2, including its cover, 17,000 views, etc.; and video information 3 displays the relevant information of the recommended video 3, including its cover, 908 views, etc.
[0080] Assume that the module height description information of the target module is "v1.0:c(image),@200*$1", where "@200" is the height based on the base screen width. For example, assume the base screen width is 300, the aspect ratio of the video information is 1 / 2, and the width of the terminal screen is 600. Since the target module contains a total of 3 video information, the width of each video information is: base screen width 300 / 3 = 100, and the base height of each video information is: 100 / (1 / 2) = 200.
[0081] Since there are three pieces of video information, it is possible to detect that the target module contains video information. Furthermore, since the third parameter position of c(image) in the module height description information "v1.0:c(image),@200*$1" of the target module, i.e., the pre-configured reference height of the multimedia resource information at $1 is 200, the height corresponding to the video information can be determined based on the reference height 200, the reference screen width 300, and the terminal screen width 600.
[0082] (Width of the terminal screen / reference screen width)×reference height=(600 / 300)×200=400.
[0083] At this time, the actual height of the video information contained in the target module displayed on the screen of the user's terminal is 400.
[0084] Next, we take a target module containing all the above types of information as an example to illustrate how to calculate the actual height of the target module. Figure 5 1 is a schematic diagram showing that a target module according to an exemplary embodiment of the present disclosure includes tag information, multimedia resource information and list information. Figure 5 The “label information” is “general, surgery, internal medicine, pediatrics, ophthalmology”, among which “general”, “surgery”, “internal medicine”, “pediatrics”, and “ophthalmology” are the five label elements contained in the label information.
[0085] "List Information" contains two list elements (items): item 4 and item 5. Item 4 displays information about Doctor A, including his / her profile picture, name, and medical fields of expertise. Item 5 displays information about Doctor B, including his / her profile picture, name, and medical fields of expertise.
[0086] "Multimedia Resource Information" contains two video information items: Video Information 4 and Video Information 5. Video Information 4 displays relevant information about Video 4, including its cover and 150 million views. Video Information 5 displays relevant information about Video 5, including its cover and 14,000 views.
[0087] Assume that the module height description information of the target module is:
[0088] "v1.0: c(tabs), c(items), c(image), 40*($1>2)+110*$2+@300*$3"
[0089] exist Figure 5 In the example, since the tag information contains 5 tag elements, c(tabs) can return the array quantity 5, that is, it can be detected that the target module contains tag information. Moreover, c(tabs) is at the first parameter position $1 in the module height description information of the target module "v1.0:c(tabs), c(items), c(image), 40*($1>2)+110*$2+@300*$3", the pre-configured first height is 40, and the pre-configured preset quantity threshold is 2. At this time, since the number of tag elements 5 is greater than the preset quantity threshold 2, it can be determined that the first height 40 pre-configured at the first parameter position $1 is the height corresponding to the tag information.
[0090] exist Figure 5In the example, since the list-type information contains two items, c(items) can return an array quantity of 2, which means that it can be detected that the target module contains list-type information. Moreover, since c(items) is at the second parameter position in the module height description information of the target module "v1.0:c(tabs), c(items), c(image), 40*($1>2)+110*$2+@300*$3", the height of the single list element pre-configured at $2 is 110. Therefore, it can be determined that the product of the height of the single list element 110 and the quantity of at least one list element 2, 220, is the height corresponding to the list-type information. At this point, the actual height of the list-type information contained in the target module displayed on the screen of the user's terminal is 220.
[0091] exist Figure 5 In the example, it is assumed that the base screen width is 200, the aspect ratio of the video information is 1 / 3, and the width of the terminal screen is 300. Since the target module contains two video information in total, the width of each video information is: base screen width 200 / 2=100, and the base height of each video information is: 100 / (1 / 3)=300.
[0092] Since there are two pieces of video information, it is possible to detect that the target module contains video information. In addition, since c(image) is at the third parameter position in the module height description information of the target module "v1.0:c(tabs),c(items),c(image),40*($1>2)+110*$2+@300*$3", that is, the base height of the multimedia resource information pre-configured at $3 is 300, therefore, based on the base height 300, the base screen width 200, and the width of the terminal screen 300, the height corresponding to the video information can be determined as:
[0093] (Width of the terminal screen / reference screen width)×reference height=(300 / 200)×300=450.
[0094] At this time, the actual height of the video information contained in the target module displayed on the screen of the user's terminal is 450.
[0095] Thus, the actual height of the target module is:
[0096] The actual height of the label information + the actual height of the list information + the actual height of the multimedia resource information = 40 + 220 + 450 = 710.
[0097] In step 104, if it is detected that a first target module among the at least one target module under the first service tag is exposed on the terminal screen, content information of the first target module may be displayed within the first target module based on the actual height of the first target module. Here, "exposed" refers to the display of the module on the terminal screen.
[0098] For example, when it is detected that the first RN module among at least one RN module under the first service tag is exposed on the screen of the terminal, that is, the first RN module slides into the screen of the terminal for display, the content information of the first RN module can be displayed in the first RN module based on the actual height of the first RN module.
[0099] According to an exemplary embodiment of the present disclosure, content information of at least one native module under the first service tag may also be obtained from the server. Next, when it is detected that a first native module among the at least one native module under the first service tag is exposed on the screen of the terminal, that is, the first native module slides into the screen of the terminal for display, the content information of the first native module may be displayed within the first native module.
[0100] Figure 6 is a schematic diagram showing a mixed arrangement of native modules and RN modules according to an exemplary embodiment of the present disclosure. Figure 6 , there are 3 native modules and 2 RN modules under the service tag. In this way, some modules under the service tag can be arranged in the form of React Native and mixed with native modules, thereby achieving the purpose of progressively modifying native modules. That is, in the present disclosure, if the historical native modules are not modified, the development of new modules can no longer occupy the package size of the client's APP. The pressure on the package size of the client's APP can be relieved by progressively modifying the historical native modules to React Native modules.
[0101] According to an exemplary embodiment of the present disclosure, it is also possible to calculate whether the position of each item in the module is within the screen through Measure In Window, that is, it is possible to calculate whether each item in the module is exposed through Measure In Window. Figure 7 is a schematic diagram illustrating a method of calculating whether a list element is exposed according to an exemplary embodiment of the present disclosure. Figure 7 , the target module contains a total of 4 list elements, namely item6, item7, item8, and item9.
[0102] For each list element (item) in at least one list element, a first distance l between the top (top) of the list element and the top of the terminal screen can be obtained. Then, based on the first distance l and the height (height) of the list element, it can be determined whether the list element contained in the target module has been exposed on the screen of the terminal. In the case that the list element contained in the target module has been exposed on the screen of the terminal, an exposure notification can be sent to the server. The exposure notification is used to indicate that the list element contained in the target module has been exposed on the screen of the terminal. In this way, by sending the exposure notification to the server, it is convenient for the server to understand user behavior in a timely manner, and to have an intuitive perception of the display status of each module, which is convenient for monitoring the online situation.
[0103] According to an exemplary embodiment of the present disclosure, if a first distance L between the top of a list element and the top of the terminal screen is less than the terminal screen window height, and the sum of the first distance L and the height of the list element is greater than a preset threshold, it can be determined that the list element included in the target module has been exposed within the terminal screen. The "preset threshold" can be 0.
[0104] For example, return reference Figure 7 At this time, a first distance L between the top of list element item7 and the top of the terminal screen is less than the terminal screen window height, and the sum of the first distance L and the height of list element item7 is greater than a preset threshold value 0. At this time, it can be determined that list element item7 contained in the target module has been exposed on the terminal screen.
[0105] In this way, only when the first distance is less than the height of the terminal screen and the sum of the first distance and the height of the list element is greater than a preset threshold value, it is determined that the list element has been exposed on the terminal screen. The number of conditions for determining whether the list element has been exposed is large, which can ensure the accuracy of determining whether the list element has been exposed.
[0106] Figure 8 It is a schematic diagram showing the process of loading, rendering, and exposing an RN module according to an exemplary embodiment of the present disclosure. Figure 8 The service tabs are shown in FIG, namely the native layer, KDS and RN module. Among them, KDS can be a common component in the APP.
[0107] Reference Figure 8 In step 801, the application APP is started.
[0108] In step 802, it is determined whether the corresponding Bundle has been downloaded.
[0109] It should be noted that, considering the need to reuse the engine, the relevant information of at least one RN module under each service tag in multiple service tags can be packaged in the same Bundle, that is, multiple RN modules will use the same Bundle Id, and different RN modules can be distinguished by different component names. The relevant information of the RN module can include module height description information and module layout information. Among them, the module layout information is used to describe what the inside of the RN module looks like, for example, whether there is an image, a title, text, what operations will be performed after a certain part is clicked, etc.
[0110] In step 803, if it is determined that the corresponding Bundle has not been downloaded, the download of the Bundle is triggered.
[0111] In step 804, if the relevant information of a certain RN module has not been downloaded, the RN module is hidden and thus will not be displayed on the screen of the terminal.
[0112] In step 805 , the RN module is loaded, that is, the content information of the RN module can be obtained from the server.
[0113] In step 806, the module height description information in the Bundle is parsed to calculate the actual height of the RN module.
[0114] In step 807, it is determined whether the page loading is successful.
[0115] In step 808, if the page fails to load, an error page is displayed.
[0116] In step 809 , when the page is loaded successfully, the actual height of the RN module is set to be adaptively adjusted according to the content information.
[0117] In step 8010, when the page is loaded successfully, the content information of the RN module is read.
[0118] In step 8011, add a listener for the exposure event.
[0119] In step 8012, the page is rendered.
[0120] In step 8013, the loading completion flag is set for exposure.
[0121] In step 8014, an exposure event is sent to the RN module when the exposure conditions are met.
[0122] It should be noted that the RN module itself cannot know whether it has been exposed on the screen. Therefore, the native layer needs to notify the RN module whether it has been exposed on the screen.
[0123] In step 8015, after the RN module receives the exposure event sent by the native layer, it can determine which content it contains has been exposed on the screen, and can send an exposure notification to the server. The exposure notification is used to indicate the content contained in the RN module that has currently been exposed on the screen.
[0124] For example, if the RN module is a list module, it can determine which items among the multiple list elements (items) it contains have been exposed on the screen, and can send an exposure notification to the server, which is used to indicate the items contained in the RN module that are currently exposed on the screen.
[0125] Figure 9 It is a schematic diagram showing the process of RN module exposure tracking according to an exemplary embodiment of the present disclosure. Figure 9 The service tabs, namely the native layer and RN module, are shown in FIG.
[0126] Reference Figure 9 In step 901, when the RN module is loaded, it is determined whether the RN module has been exposed on the screen, that is, whether the RN module has slid into the screen for display.
[0127] In step 902 , if the RN module is not exposed on the screen, it is marked that the RN module has been loaded; if the RN module is already exposed on the screen, step 906 is executed.
[0128] In step 903 , the native layer detects a sliding end event, that is, the native layer detects that the user's finger stops sliding on the screen of the terminal.
[0129] In step 904 , it is determined whether the RN module has been loaded, that is, whether the content information of the RN module has been downloaded from the server.
[0130] In step 905 , when the RN module has not been loaded completely, that is, when the content information of the RN module has not been downloaded from the server, it is marked that the RN module has been exposed on the screen.
[0131] In step 906 , the exposure event is sent to all RN modules.
[0132] In step 907 , all RN modules monitor the exposure event.
[0133] In step 908, since the exposure event sent by the native layer is a global notification, all RN modules need to determine whether the Module ID corresponding to the exposure event is consistent with their own Module ID based on the Module ID corresponding to the exposure event. That is, after all RN modules receive the exposure event sent by the native layer, they need to determine whether the exposure event sent by the native layer is sent to themselves specifically.
[0134] In step 909 , when a certain RN module determines that the Module ID corresponding to the exposure event is inconsistent with its own ModuleID, it can be determined that the exposure event is not sent specifically to itself, and therefore, the exposure event can be ignored.
[0135] In step 9010, when an RN module determines that the Module ID corresponding to the exposure event is consistent with its own ModuleID, it can be determined that the exposure event is sent specifically to itself. At this time, it can determine whether it has been exposed on the terminal screen.
[0136] In step 9011, when it is determined that the RN module has not been exposed on the screen of the terminal, the RN module can determine which contents it contains have been exposed on the screen, and can send an exposure notification to the server, which is used to indicate the content contained in the RN module that has currently been exposed on the screen.
[0137] In step 9012, the RN module that has sent the exposure notification to the server is marked as having been exposed on the screen of the terminal, so as to avoid repeated reporting of the exposure of the RN module.
[0138] Figure 10 is a block diagram illustrating an information processing apparatus according to an exemplary embodiment of the present disclosure, which is applied to a terminal.
[0139] Reference Figure 10 The device 1000 may include a module height description information acquisition module 1001 , a target content information acquisition module 1002 , an actual height determination module 1003 and a target content information display module 1004 .
[0140] In response to a launch instruction for a target application, the module height description information acquisition module 1001 may acquire, from a server, module height description information for at least one target module under each of a plurality of service tags included in the target application. Each of the plurality of service tags may contain at least one native module. A native module is an original development module obtained through development for the target application, and a target module is a module used to replace a native module.
[0141] The above-mentioned "service tag" is the service tab, and different service tags have different functions. For example, some service tags can be used to recommend multimedia resources, some service tags can be used to recommend user information, and some service tags can be used to recommend downloading apps, etc. The above-mentioned "target module" can be a (React Native, RN) module. Each target module can correspond to a module height description information. The module height description information is the grammatical information used to calculate the actual height of the target module. The module height description information of different target modules can be different.
[0142] In response to a selection instruction for a first service tag among the multiple service tags, the target content information acquisition module 1002 can acquire content information of at least one target module under the first service tag from the server. As previously mentioned, different service tags have different functions, that is, the content information of modules under different service tags is different.
[0143] For example, if the first service tag is a recommended multimedia resource service tag, multimedia resource information displayed by at least one RN module under the recommended multimedia resource service tag may be obtained from the server, wherein the multimedia resource information may be picture information or video information.
[0144] If the first service tag is a recommended APP download service tag, the APP recommended download information displayed by at least one RN module under the recommended APP download service tag can be obtained from the server. The APP recommended download information can include the name of the recommended download APP, the size of the space occupied, and other information.
[0145] If the first service tag is a recommended user information service tag, the user recommendation information displayed by at least one RN module under the recommended user information service tag can be obtained from the server. The user recommendation information can include the nickname, avatar and other information of the recommended user.
[0146] For each target module under the first service tag, the actual height determination module 1003 can determine the actual height of the target module based on the module height description information of the target module. As mentioned above, the module height description information is the grammatical information used to calculate the actual height of the target module. The module height description information can include three parts: "version", "input parameters" and "formula". For example, the module height description information of a target module can be: "v1.0:c(content.title),@200+100*$1".
[0147] The "version" field can begin with "v" and end with ":". The specific version number can consist of numbers and periods. For example, the "v1.0:" in the module height description information "v1.0:c(content.title),@200+100*$1" indicates that the specific version of the module height description information is version 1.0.
[0148] The above "input parameter" can be represented by "c()". The input parameter can start with the letter "C". The brackets indicate access to data, perform calculation operations, and return a number. Depending on the data type accessed, the return value can be specified as follows:
[0149] 1) Array: returns the number of arrays;
[0150] 2) Number: If it is the number 0, it returns 0, and other numbers return 1;
[0151] 3) String: Returns 1 if the string has a length, otherwise returns 0 (string with zero length or empty);
[0152] 4) Dictionary: Returns 1 if it is not empty (contains at least one key-value pair), otherwise returns 0;
[0153] 5) Boolean: False returns 0, True returns 1.
[0154] For example, in the module height description information “v1.0:c(content.title),@200+100*$1”, “c(content.title)” may indicate access to the title of the content.
[0155] The above "formula" is used to calculate the module height based on the specific content contained in the RN module. For example, in the module height description information "v1.0:c(content.title),@200+100*$1", "@200+100*$1" is the calculation formula for the corresponding RN module height. Among them:
[0156] 1) "100" indicates a normal fixed value;
[0157] 2) "@200" indicates that the value needs to be calculated based on the ratio of the terminal screen width to the reference screen width;
[0158] 3) "$1" indicates the input parameter calculation value, and the number after $ indicates the parameter position in the module height description information.
[0159] According to an exemplary embodiment of the present disclosure, when it is determined based on the module height description information of the target module that the content information of the target module includes at least one of tag information, multimedia resource information, and list information, the actual height determination module 1003 can determine the height corresponding to each of the at least one item. Then, the sum of the at least one height corresponding to the at least one item can be determined as the actual height of the target module.
[0160] It should be noted that the exact height of the RN module cannot be known before rendering, so when it is mixed with native modules, the height changes before and after loading will cause page jumps. Therefore, for each RN module, the actual height of the RN module can be determined based on the module height description information of the RN module. This can ensure that when the RN module is mixed with native modules, the height changes before and after the RN module is loaded will not cause page jumps. The RN module can be exposed and displayed at a stable and unchanging height, ensuring the stability of the page display.
[0161] According to an exemplary embodiment of the present disclosure, the content information of the target module may include tag information. The actual height determination module 1003 may determine the first parameter position corresponding to the tag information in the module height description information of the target module. Then, the first height pre-configured at the first parameter position may be determined. Next, the first height may be determined to be the height corresponding to the tag information.
[0162] It should be noted that the scenario corresponding to the tag information is a fixed height scenario, that is, the height corresponding to the content information of the tag information is fixed to the height pre-configured in the module height description information. When the RN module only contains tag information, the actual height of the RN module is the fixed height corresponding to the tag information.
[0163] According to an exemplary embodiment of the present disclosure, the actual height determination module 1003 may determine the number of tag elements included in the tag information. A preset number threshold value pre-configured at the first parameter position may then be determined. Next, if the number of tag elements is greater than or equal to the preset number threshold value, the first height may be determined to be the height corresponding to the tag information.
[0164] In this way, whether to display the label information can be decided based on the number of label elements contained in the detected label information and the preset number threshold. When deciding to display the label information, the height corresponding to the label information can be determined based on the first height pre-configured in the module height description information, making the display of the label information more flexible.
[0165] According to an exemplary embodiment of the present disclosure, the content information of the target module may include list-type information, and the list-type information may include at least one list element. The actual height determination module 1003 may determine the second parameter position corresponding to the list-type information in the module height description information of the target module. Then, the height of a single list element pre-configured at the second parameter position may be determined. Next, the product of the height of the single list element and the number of the at least one list element may be determined as the height corresponding to the list-type information.
[0166] According to an exemplary embodiment of the present disclosure, the content information of the target module may include multimedia resource information, wherein the multimedia resource information may be picture information or video information. The actual height determination module 1003 may determine the third parameter position corresponding to the multimedia resource information in the module height description information of the target module. Then, the reference height of the multimedia resource information pre-configured at the third parameter position may be determined, wherein the reference height is a height based on the reference screen width. Next, the height corresponding to the multimedia resource information may be determined based on the reference height, the reference screen width, and the width of the terminal screen.
[0167] When a first target module among the at least one target module under the first service tag is detected to be exposed on the terminal screen, the target content information display module 1004 may display the content information of the first target module within the first target module based on the actual height of the first target module. Here, "exposed" refers to the display of the module on the terminal screen.
[0168] For example, when it is detected that the first RN module among at least one RN module under the first service tag is exposed on the screen of the terminal, that is, the first RN module slides into the screen of the terminal for display, the content information of the first RN module can be displayed in the first RN module based on the actual height of the first RN module.
[0169] According to an exemplary embodiment of the present disclosure, the information processing device 1000 may further include a native content information acquisition module and a native content information display module. The native content information acquisition module may also acquire content information of at least one native module under a first service tag from a server. Next, upon detecting that a first native module among the at least one native module under the first service tag is exposed on the screen of the terminal, that is, the first native module slides into the screen of the terminal for display, the native content information display module may display the content information of the first native module within the first native module.
[0170] In this way, some modules under the service tag can be arranged in a React Native format, mixed with native modules, thereby achieving the purpose of progressively modifying native modules. That is, in this disclosure, if the historical native modules are not modified, the development of new modules can no longer occupy the client's app package size. The pressure on the client's app package size can be relieved by progressively modifying the historical native modules to React Native modules.
[0171] According to an exemplary embodiment of the present disclosure, the information processing device 1000 may further include a first distance acquisition module, an exposure determination module, and an exposure notification sending module.
[0172] For each list element (item) in at least one list element, the first distance acquisition module can obtain a first distance l between the top (top) of the list element and the top of the terminal screen. Then, the exposure determination module can determine whether the list element contained in the target module has been exposed on the terminal screen based on the first distance l and the height (height) of the list element. If the list element contained in the target module has been exposed on the terminal screen, the exposure notification sending module can send an exposure notification to the server. The exposure notification is used to indicate that the list element contained in the target module has been exposed on the terminal screen. In this way, by sending the exposure notification to the server, it is convenient for the server to understand user behavior in a timely manner, and can have an intuitive perception of the display status of each module, facilitating the monitoring of online situations.
[0173] According to an exemplary embodiment of the present disclosure, when a first distance l between the top of a certain list element and the top of the terminal screen is less than the terminal screen window height, and the sum of the first distance l and the height of the list element is greater than a preset threshold, the exposure determination module may determine that the list element included in the target module has been exposed within the terminal screen. The "preset threshold" may be 0.
[0174] In this way, only when the first distance is less than the height of the terminal screen and the sum of the first distance and the height of the list element is greater than a preset threshold value, it is determined that the list element has been exposed on the terminal screen. The number of conditions for determining whether the list element has been exposed is large, which can ensure the accuracy of determining whether the list element has been exposed.
[0175] Figure 11 is a block diagram illustrating an electronic device 1100 according to an exemplary embodiment of the present disclosure.
[0176] Reference Figure 11The electronic device 1100 includes at least one memory 1101 and at least one processor 1102. The at least one memory 1101 stores instructions. When the instructions are executed by the at least one processor 1102, the information processing method according to the exemplary embodiment of the present disclosure is executed.
[0177] As an example, the electronic device 1100 may be a PC, a tablet device, a personal digital assistant, a smart phone, or other device capable of executing the above instructions. Here, the electronic device 1100 is not necessarily a single electronic device, but may also be any device or circuit that can execute the above instructions (or instruction sets) individually or in combination. The electronic device 1100 may also be part of an integrated control system or system manager, or may be configured as a portable electronic device that is interconnected with a local or remote (e.g., via wireless transmission) interface.
[0178] In electronic device 1100, processor 1102 may include a central processing unit (CPU), a graphics processing unit (GPU), a programmable logic device, a dedicated processor system, a microcontroller, or a microprocessor. By way of example and not limitation, the processor may also include an analog processor, a digital processor, a microprocessor, a multi-core processor, a processor array, a network processor, etc.
[0179] The processor 1102 may execute instructions or codes stored in the memory 1101, which may also store data. Instructions and data may also be sent and received over a network via a network interface device, which may employ any known transmission protocol.
[0180] The memory 1101 may be integrated with the processor 1102, for example, by placing RAM or flash memory within an integrated circuit microprocessor or the like. Furthermore, the memory 1101 may comprise a separate device, such as an external disk drive, a storage array, or any other storage device usable by a database system. The memory 1101 and the processor 1102 may be operatively coupled or may communicate with each other, for example, via an I / O port, a network connection, or the like, such that the processor 1102 can access files stored in the memory.
[0181] In addition, the electronic device 1100 may further include a video display (such as a liquid crystal display) and a user interaction interface (such as a keyboard, a mouse, a touch input device, etc.) All components of the electronic device 1100 may be connected to each other via a bus and / or a network.
[0182] According to an exemplary embodiment of the present disclosure, a computer-readable storage medium may also be provided, which, when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, enables the electronic device to perform the above-mentioned information processing method. Examples of computer-readable storage media here include: read-only memory (ROM), random access programmable read-only memory (PROM), electrically erasable programmable read-only memory (EEPROM), random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), flash memory, non-volatile memory, CD-ROM, CD-R, CD+R, CD-RW, CD+RW, DVD-ROM, DVD-R, DVD+R, DVD-RW, DVD+RW, DVD-RAM, BD-ROM, BD-R, BD-R LTH, BD-RE, Blu-ray or optical disk storage, hard disk drive (HDD), solid state drive (SSD), card storage (such as, multimedia card, secure digital (SD) card or ultra-fast digital (XD) card), magnetic tape, floppy disk, magneto-optical data storage device, optical data storage device, hard disk, solid state disk and any other device, any other device configured to store the computer program and any associated data, data files and data structures in a non-transitory manner and provide the computer program and any associated data, data files and data structures to a processor or computer so that the processor or computer can execute the computer program. The computer program in the above-mentioned computer-readable storage medium can be run in an environment deployed in a computer device such as a client, a host, an agent device, a server, etc. In addition, in one example, the computer program and any associated data, data files and data structures are distributed on a networked computer system so that the computer program and any associated data, data files and data structures are stored, accessed and executed in a distributed manner by one or more processors or computers.
[0183] According to exemplary embodiments of the present disclosure, a computer program product may also be provided, including a computer program, which implements the information processing method according to the present disclosure when executed by a processor.
[0184] According to the information processing method, device, electronic device and storage medium disclosed in the present invention, by downloading the module height description information and content information of at least one target module from the server, partial replacement of the native module under a certain service tag can be achieved, avoiding the replacement of all native modules at the same time, which can greatly reduce time and labor costs; and, there is no need to modify the native code in the APP to achieve the replacement of the native module, which can avoid the situation where the size of the APP installation package is too large due to modifying the native code for each native module, and can save storage resources.
[0185] Furthermore, for each RN module, the actual height of the RN module can be determined based on the module height description information of the RN module. This can ensure that when the RN module is mixed with the native module, the height change before and after the RN module is loaded, which causes the page to jump, can be avoided. The RN module can be exposed and displayed at a stable and unchanging height, ensuring the stability of the page display.
[0186] Furthermore, whether to display the label information can be decided based on the number of label elements contained in the detected label information and a preset number threshold. When deciding to display the label information, the height corresponding to the label information can be determined based on the first height pre-configured in the module height description information, making the display of the label information more flexible.
[0187] Furthermore, some modules under the service tag can be mixed with native modules in the form of React Native, thereby achieving the purpose of progressively modifying native modules. That is, in the present disclosure, if the historical native modules are not modified, the development of new modules can no longer occupy the client app's package size. The pressure on the client app's package size can be relieved by progressively modifying the historical native modules to React Native modules.
[0188] Furthermore, by sending exposure notifications to the server, the server can understand user behavior in a timely manner, and can have an intuitive perception of the display status of each module, making it easier to monitor online situations.
[0189] Furthermore, only when the first distance is less than the height of the terminal screen and the sum of the first distance and the height of the list element is greater than a preset threshold, it is determined that the list element has been exposed on the terminal screen. The number of conditions for determining whether the list element has been exposed is large, which can ensure the accuracy of judging whether the list element has been exposed.
[0190] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the following claims.
[0191] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. An information processing method, applied to a terminal, characterized in that: include: In response to a start instruction for a target application, obtaining, from a server, module height description information of at least one target module under each of a plurality of service tags included in the target application, wherein each of the plurality of service tags contains at least one native module, the native module being an original development module obtained by developing for the target application, and the target module being a module used to replace the native module; In response to a selection instruction for a first service tag among the plurality of service tags, acquiring content information of at least one target module under the first service tag from the server; For each target module under the first service tag, determining the actual height of the target module based on the module height description information of the target module; When it is detected that a first target module among the at least one target module under the first service tag is exposed within the screen of the terminal, content information of the first target module is displayed within the first target module based on an actual height of the first target module.
2. The information processing method according to claim 1, wherein: The determining the actual height of the target module based on the module height description information of the target module includes: When it is determined based on the module height description information of the target module that the content information of the target module includes at least one of tag information, multimedia resource information, and list information, determining a height corresponding to each of the at least one item; The sum of at least one height corresponding to the at least one item is determined to be the actual height of the target module.
3. The information processing method according to claim 2, wherein: The content information of the target module includes the tag information, and determining the height corresponding to each of the at least one item includes: Determine a first parameter position corresponding to the tag information in the module height description information of the target module; determining a preconfigured first height at the first parameter position; The first height is determined to be the height corresponding to the tag information.
4. The information processing method according to claim 3, wherein: The determining that the first height is a height corresponding to the tag information includes: Determining the number of tag elements included in the tag information; determining a preset quantity threshold pre-configured at the first parameter position; When the number of the tag elements is greater than or equal to the preset number threshold, the first height is determined to be the height corresponding to the tag information.
5. The information processing method according to claim 2, wherein: The content information of the target module includes the list information, the list information includes at least one list element, and determining the height corresponding to each item of the at least one item includes: Determine a second parameter position corresponding to the list type information in the module height description information of the target module; determining a height of a single list element pre-configured at the second parameter position; The product of the height of a single list element and the number of the at least one list element is determined as the height corresponding to the list type information.
6. The information processing method according to claim 2, wherein: The content information of the target module includes the multimedia resource information, and determining the height corresponding to each of the at least one item includes: Determine a third parameter position corresponding to the multimedia resource information in the module height description information of the target module; Determining a reference height of the multimedia resource information pre-configured at the third parameter position, wherein the reference height is a height based on a reference screen width; The height corresponding to the multimedia resource information is determined based on the reference height, the reference screen width, and the width of the screen of the terminal.
7. The information processing method according to claim 5, wherein: Also includes: For each list element in the at least one list element, obtaining a first distance between a top of the list element and a top of a screen of the terminal; Determining, based on the first distance and the height of the list element, whether the list element included in the target module has been exposed within the screen of the terminal; In a case where the list element included in the target module has been exposed on the screen of the terminal, an exposure notification is sent to the server, wherein the exposure notification is used to indicate that the list element included in the target module has been exposed on the screen of the terminal.
8. The information processing method according to claim 7, wherein: The determining, based on the first distance and the height of the list element, whether the list element included in the target module has been exposed within the screen of the terminal includes: When the first distance is less than the height of the screen of the terminal and the sum of the first distance and the height of the list element is greater than a preset threshold, it is determined that the list element included in the target module has been exposed within the screen of the terminal.
9. The information processing method according to claim 1, wherein: Also includes: Obtaining content information of at least one native module under the first service tag from the server; When it is detected that a first native module among the at least one native module under the first service tag is exposed on the screen of the terminal, content information of the first native module is displayed in the first native module.
10. An information processing device, applied to a terminal, characterized in that: include: a module height description information acquisition module configured to, in response to a startup instruction for a target application, acquire from a server module height description information of at least one target module under each of a plurality of service tags contained in the target application, wherein each of the plurality of service tags contains at least one native module, the native module being an original development module obtained by developing for the target application, and the target module being a module used to replace the native module; a target content information acquisition module, configured to, in response to a selection instruction for a first service tag among the plurality of service tags, acquire content information of at least one target module under the first service tag from the server; an actual height determination module configured to determine, for each target module under the first service tag, an actual height of the target module based on the module height description information of the target module; The target content information display module is configured to display the content information of the first target module in the first target module based on the actual height of the first target module when it is detected that the first target module among the at least one target module under the first service tag is exposed in the screen of the terminal.
11. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the information processing method according to any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the information processing method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Application program processing method, device and equipment
CN111552473A
Runtime management of application components
US10339299B1