CN114416033A - Data processing method and device, electronic equipment and storage medium - Google Patents

Data processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114416033A
CN114416033A CN202111662963.4A CN202111662963A CN114416033A CN 114416033 A CN114416033 A CN 114416033A CN 202111662963 A CN202111662963 A CN 202111662963A CN 114416033 A CN114416033 A CN 114416033A
Authority
CN
China
Prior art keywords
card
page
data
page card
application program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111662963.4A
Other languages
Chinese (zh)
Inventor
况众文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing 58 Information Technology Co Ltd
Original Assignee
Beijing 58 Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing 58 Information Technology Co Ltd filed Critical Beijing 58 Information Technology Co Ltd
Priority to CN202111662963.4A priority Critical patent/CN114416033A/en
Publication of CN114416033A publication Critical patent/CN114416033A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Software Systems (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a data processing method, a data processing device, electronic equipment and a storage medium. Receiving first card data provided by a server and a first card identifier of a first page card used for rendering the first card data. And searching the first page card in the dynamic packet according to the first card identification. And downloading the first page card from the server according to the first card identifier under the condition that the first page card is not found in the dynamic package of the application program, wherein the first page card is developed in advance and stored in the server. Rendering the first card data based on the first page card. Therefore, through the application, the AB test on the new page card can be realized for the published application program of the old version, the AB test on the new page card can be realized without waiting for the release of the application program of the new version, the AB test period is shortened, the real-time property of the AB test is improved, and the AB test on the new page card is prevented from being delayed.

Description

Data processing method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a data processing method and apparatus, an electronic device, and a storage medium.
Background
Currently, there are more and more applications on the market, and in order to enable the applications to better provide services for users so as to increase the stickiness of the users to the applications, developers often deploy a plurality of page cards in the applications, and the page cards may display some content helpful to the users, such as a search bar, navigation buttons, and entity information corresponding to each navigation button.
With the application program used by the broad users, the developer can analyze the preferences of the broad users, analyze the needs of the broad users according to the preferences of the broad users, and then update the page cards of the application program according to the needs of the broad users (for example, the number of the updated page cards, the number and the types of the updated page cards, and/or the layout of the updated page cards in the page, etc.), for example, the developer can develop a new page card, replace an old page card with the new page card in the page, or add a new page card on the basis of the page cards included in the page, etc.
However, if it is necessary to replace an old page card with a new page card on a page of an application, a developer is required to add the code of the new page card to the computer program code of the application (the code related to the page) so that the computer program code of the application includes both the code of the new page card and the code of the old page card. And then compiling the computer program code of the application program to obtain the application program of the new version, carrying out the normal flow test on the application program of the new version internally, and releasing the application program of the new version externally after the test is passed.
After a large number of users install a new version of application program on their terminals, for example, data that needs to be rendered on an old version of page card is provided for some application programs used by the users, so that the application programs used by some users can render data on the old version of page card, and data that needs to be rendered on a new version of page card is provided for some application programs used by other users, so that the application programs used by other users can render data on the new version of page card. And then, the developer observes the response effect of another part of users on the data rendered on the page card of the new version to complete the AB test.
However, the inventor finds that if a new page card needs to be used to replace an old page card on a page of an application program, the new page card needs to follow the development rhythm of the new version of the application program to perform an AB test, that is, the AB test can not be implemented until the new version of the application program is developed and released, the new version of the application program is tested and released, and the new version of the application program is released externally.
However, the new version of the application relates to the development and testing processes, that is, it takes a while from the development of the new version of the application to the release of the new version of the application, so after the requirement that a new page card is used to replace an old page card on a page of the application is provided, the AB test needs to be completed after a long time, the test period is long, and the test real-time performance is low.
Disclosure of Invention
The application discloses a data processing method, a data processing device, electronic equipment and a storage medium.
In a first aspect, the present application shows a data processing method, which is applied to a terminal, where the terminal includes an application program, and a dynamic package is integrated in the application program, and the dynamic package is used to store a page card in the application program; the method comprises the following steps:
receiving first card data provided by a server and a first card identifier of a first page card used for rendering the first card data;
searching the first page card in the dynamic packet according to the first card identifier;
downloading the first page card from a server according to the first card identifier under the condition that the first page card is not found in the dynamic package, wherein the first page card is developed in advance and stored in the server;
rendering the first card data based on the first page card.
In an optional implementation, the method further includes:
storing the first page card in the dynamic package.
In an optional implementation manner, the dynamic package includes a second page card; under the condition that the first card data and the first card identification are received, second card data provided by the server and a second card identification of a second page card used for rendering the second card data are also received; the second card data is not rendered if the first card data is rendered;
the method further comprises the following steps:
calling the second page card in the dynamic package under the condition that the first page card is not found in the dynamic package;
rendering the second card data based on the second page card.
In an optional implementation manner, the first page card does not exist in the dynamic package in the application program when the application program is developed in advance;
the method further comprises the following steps:
downloading the first page card from the server according to the first card identifier under the condition that the first page card is not found in the dynamic package;
storing the first page card in the dynamic package.
In an optional implementation, the method further includes:
deleting the second page card in the dynamic package if card data for rendering based on the first page card is received multiple times in succession and card data for rendering based on the second page card is not received in the process of receiving card data for rendering based on the first page card multiple times in succession.
In an optional implementation, the method further includes:
and deleting the second page card in the dynamic packet under the condition that card data used for rendering based on the second page card is not received within a preset time length.
In an optional implementation, the method further includes:
and under the condition of receiving a deleting instruction which is sent by a server and used for indicating to delete the second page card, deleting the second page card in the dynamic packet.
In a second aspect, the present application shows a data processing apparatus, which is applied to a terminal, where the terminal includes an application program, and a dynamic package is integrated in the application program, and the dynamic package is used for storing a page card in the application program; the device comprises:
the receiving module is used for receiving first card data provided by a server and a first card identifier of a first page card used for rendering the first card data;
the searching module is used for searching the first page card in the dynamic packet according to the first card identifier;
the first downloading module is used for downloading the first page card from a server according to the first card identifier under the condition that the first page card is not found in the dynamic package, wherein the first page card is developed in advance and stored in the server;
a first rendering module to render the first card data based on the first page card.
In an optional implementation, the apparatus further comprises:
and the first storage module is used for storing the first page card in the dynamic package.
In an optional implementation manner, the dynamic package includes a second page card; under the condition that the first card data and the first card identification are received, second card data provided by the server and a second card identification of a second page card used for rendering the second card data are also received; the second card data is not rendered if the first card data is rendered;
the device further comprises:
the calling module is used for calling the second page card in the dynamic package under the condition that the first page card is not found in the dynamic package;
and the second rendering module is used for rendering the second card data based on the second page card.
In an optional implementation manner, the first page card does not exist in the dynamic package in the application program when the application program is developed in advance;
the device further comprises:
the second downloading module is used for downloading the first page card from the server according to the first card identifier under the condition that the first page card is not found in the dynamic package;
and the second storage module is used for storing the first page card in the dynamic package.
In an optional implementation, the apparatus further comprises:
and the first deleting module is used for deleting the second page card in the dynamic packet under the condition that the card data used for rendering based on the first page card is continuously received for multiple times and the card data used for rendering based on the second page card is not received in the process of continuously receiving the card data used for rendering based on the first page card for multiple times.
In an optional implementation, the apparatus further comprises:
and the second deleting module is used for deleting the second page card in the dynamic packet under the condition that the card data used for rendering based on the second page card is not received within the preset time length.
In an optional implementation, the apparatus further comprises:
and the third deleting module is used for deleting the second page card in the dynamic packet under the condition of receiving a deleting instruction which is sent by the server and used for indicating to delete the second page card.
In a third aspect, the present application shows an electronic device comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the data processing method of the first aspect.
In a fourth aspect, the present application shows a non-transitory computer readable storage medium having instructions which, when executed by a processor of an electronic device, enable the electronic device to perform the data processing method of the first aspect.
In a fifth aspect, the present application shows a computer program product, in which instructions, when executed by a processor of an electronic device, enable the electronic device to perform the data processing method according to the first aspect.
The technical scheme provided by the application can comprise the following beneficial effects:
in the application, the terminal comprises an application program, wherein a dynamic package is integrated in the application program and used for storing a page card in the application program; the integration of the dynamic package in the application program may enable the application program to have a function of dynamically loading a new page card based on the dynamic package, thereby enabling the application program to render card data based on the new page card dynamically loaded by the dynamic package. In this way, in the case where the developer needs to make the application have card rendering data based on a new page card, the developer can develop the new page card and deploy the new page card in the server.
Then, for the server, an AB test may be performed on the new page card, for example, when data that the application program needs to render needs to be provided for a part of users, card data that needs to be rendered on the new page card may be provided, so that the application program used by the part of users may render card data on the new page card.
For the application program used by the part of users, first card data provided by the server and a first card identification of a first page card used for rendering the first card data can be received. And searching the first page card in the dynamic packet according to the first card identification. And downloading the first page card from the server according to the first card identifier under the condition that the first page card is not found in the dynamic package of the application program, wherein the first page card is developed in advance and stored in the server. Rendering the first card data based on the first page card.
Therefore, through the application, the AB test on the new page card can be realized for the published application program of the old version, the AB test on the new page card can be realized without waiting for the release of the application program of the new version, the AB test period is shortened, the real-time property of the AB test is improved, and the AB test on the new page card is prevented from being delayed.
In addition, the page card in the application program is dynamically loaded in the application program by means of the dynamic package, so that the page card is decoupled from other functional components in the application program, the influence of the update of the page card on the other functional components in the application program is avoided, the subsequent maintenance of the other functional components in the application program, the maintenance of the page card and the like are facilitated, and the maintenance cost is reduced.
Drawings
FIG. 1 is a flow chart of the steps of a data processing method of the present application.
Fig. 2 is a block diagram of a data processing apparatus according to the present application.
Fig. 3 is a block diagram of an electronic device of the present application.
Fig. 4 is a block diagram of an electronic device of the present application.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a flowchart of steps of a data processing method of the present application is shown, and the data processing method is applied to a terminal, where the terminal includes an application program, and a dynamic package is integrated in the application program, and the dynamic package is used for storing a page card in the application program.
The Dynamic package includes a Dynamic Feature package and the like, and the Dynamic package may include a package developed based on apppbundle and the like.
In the process of developing the application program, a dynamic package can be integrated in the development environment of the application program, the dynamic package is used for dynamically loading page cards in the application program, the page cards are used for rendering card data, and in the application, the card data displayed on different page cards can be different. In addition, the size, internal layout, and position within the page of different page cards, etc. may all be different. The page card may include an underlying framework layer for rendering data, with the ability to parse card data, the ability to render data, and the like.
After the application program is obtained by compiling codes and the like in the development environment of the application program, a dynamic package is integrated in the application program, and the dynamic package comprises page cards developed for the application program.
Wherein, the method comprises the following steps:
in step S101, first card data provided by the server and a first card identifier of a first page card used for rendering the first card data are received.
In this application, a user may start an application on a terminal and browse a page using the application, for example, refresh content on the page on the application for the user to browse the page, where the process of refreshing the page on the application is as follows: the method comprises the steps that an application program obtains data needing to be rendered from a server and renders the data needing to be rendered.
The page can include a plurality of page cards, the application program can acquire card data which needs to be rendered respectively based on each page card from the server, and then can render the card data which needs to be rendered respectively based on each page card, and the like, so that the page can be refreshed. Thus, from the visual perspective, a plurality of page cards are presented in the page, and the card data presented in each page card is presented in each page card, so that the card data presented in each page card can be seen on the page.
When data to be rendered is acquired from the server, the data to be rendered may be acquired from the server according to the page, for example, the data to be rendered in different pages is different, and therefore, the data to be rendered in the page may be acquired from the server according to the page, for example, the data to be rendered in the page may be acquired from the server according to a page identifier of the page (for example, a URL (Uniform Resource Locator) of the page, etc.).
The page comprises a plurality of page cards, the process of rendering the card data which need to be rendered on each page card is independent, and the card data which need to be rendered on each page card can also be independent, so that when the data which need to be rendered in the page is obtained from the server, the data which need to be rendered in the page can be obtained from the server according to the dimension of the page card, for example, the card data which need to be rendered in each page card in the page can be obtained respectively.
On the other hand, in order to distinguish which card data needs to be rendered on which page cards, card identifiers of the page cards for rendering the respective card data and the like can be acquired from the server, so that the page cards for rendering the card data are uniquely determined by the card identifiers.
In one embodiment, when the terminal needs to acquire data to be rendered from the server based on the application program, the URL of the page may be sent to the server, and the server may receive the URL and then acquire the card identification of the page card included in the page bound by the URL and the card data for rendering on each page card included in the page bound by the URL. Then, the card identification of the page card included in the URL-bound page and the card data for rendering on each page card included in the URL-bound page may be sent to the terminal, and the terminal may receive the card identification of the page card included in the URL-bound page and the card data for rendering on each page card included in the URL-bound page.
In the application, after the application program is developed in advance, which page cards included in the URL-bound page are temporarily fixed, and the page cards included in the URL-bound page may be stored in a dynamic package of the application program.
However, as the broad users use the application, the developer may analyze the preferences of the broad users, and analyze the needs of the broad users according to the preferences of the broad users, and then update the page cards of the application according to the needs of the broad users (e.g., update the number of the page cards, the number and the types of the page cards, and/or update the layout of the page cards in the page, etc.), for example, the developer may develop a new page card, and in the URL-bound page, replace an old page card in the URL-bound page with the new page card, or add a new page card on the basis of the page cards included in the URL-bound page.
The example of "in the URL-bound page, replacing an old page card in the URL-bound page with the first page card" is taken as an example for illustration, but not limiting the scope of the present application.
For example, after a developer develops a new page card, the server may perform an AB test on the new page card, for example, subsequently when data of the URL-bound page needs to be provided to a part of users, card data that needs to be rendered on the old page card may be provided, so that an application used by the part of users may render card data on the old version of page card on the URL-bound page. And subsequently providing card data needing to be rendered on the new page card when the data of the URL bound page needs to be provided for another part of users, so that the application program used by another part of users can render the card data on the new page card on the URL bound page.
And then, the developer observes the response effect of another part of users on the card data rendered on the new page card, and under the condition that the response effect meets the requirement, the card data which needs to be rendered on the new page card can be provided subsequently when the data of the page bound by the URL needs to be provided for each user, so that the application program used by each user can render the card data on the new page card on the page bound by the URL, and the purpose of replacing one old page card in the page bound by the URL with the first page card in the page bound by the URL is achieved.
In one embodiment of the present application, in one example, there may be a plurality of page cards in the URL bound page, and there may be a second page card. Subsequent developers develop a first page card in the server, and need to replace a second page card with the first page card in the page bound by the URL, that is, when the page bound by the URL needs to be rendered in the application program, data that needs to be rendered on the first page card may be rendered based on the first page card, and card data may not be rendered based on the second page card, and the like.
However, the second page card is set in the application program during the process of developing the application program, that is, the application program has the second page card after the application program is developed. After the first page card is developed, a developer additionally develops in the server, that is, the application may not have the first page card, so that the application cannot render the first card data to be rendered on the first page card based on the first page card, and the purpose of replacing the second page card with the first page card in the URL-bound page cannot be achieved.
Therefore, in the above case, in order to achieve the purpose of "replacing the second page card with the first page card in the URL-bound page", it is necessary to achieve the purpose of "rendering the URL-bound page in the application program, data that needs to be rendered on the first page card may be rendered based on the first page card, and card data may not be rendered based on the second page card".
In order to achieve the purpose that "when the page bound by the URL is rendered in the application program, the data required to be rendered on the first page card may be rendered based on the first page card, and the card data may not be rendered based on the second page card", step S102 may be performed.
In step S102, a first page card is searched for in the dynamic package according to the first card identifier.
In one embodiment of the present application, the card may be located in a dynamic package of the application at the first page.
For example, before the application program receives the first card data provided by the server and the first card identifier of the first page card used for rendering the first card data this time, the application program has already received one card data provided by the server and the first card identifier of the first page card used for rendering the one card data, and has downloaded the first page card from the server according to the first card identifier of the first page card, and has rendered the one card data based on the first page card, and has stored the first page card in the dynamic package of the application program. Thus, in this case, in step S101, when the first card data provided by the server and the first card identifier of the first page card used for rendering the first card data are received, the dynamic package of the application program includes the first page card, so that the first page card can be found in the dynamic package of the application program, and then step S103 can be executed.
In another embodiment of the present application, the card may not be located in the dynamic package of the application at the first page.
For example, before the application program receives the first card data provided by the server and the first card identifier of the first page card for rendering the first card data this time, the application program does not receive the first card identifier of the first page card for rendering the card data provided by the server, does not download the first page card from the server according to the first card identifier of the first page card, does not render the card data based on the first page card, and does not store the first page card in the dynamic package of the application program. Thus, in the case that the first card data provided by the server and the first card identifier of the first page card used for rendering the first card data are received in step S101 this time, the dynamic package of the application program does not include the first page card, so that the first page card cannot be found in the dynamic package of the application program.
In the case that the first page card is not found in the dynamic package of the application program, in step S103, the first page card is downloaded from the server according to the first card identifier, where the first page card is developed in advance and stored in the server.
In order to render the first card data based on the first page card, the first page card may be downloaded from the server in real time according to the first card identifier, for example, the terminal may send a download request carrying the first card identifier to the server, the server receives the download request, then may obtain the first page card according to the first card identifier in the download request, and returns the first page card to the terminal, and the terminal may receive the first page card returned by the server. Then step S104 is performed.
In step S104, first card data is rendered based on the first page card.
Through the application, the user can see the first page card on the interface of the application program and can see the first card data rendered on the first page card.
In the application, the terminal comprises an application program, wherein a dynamic package is integrated in the application program and used for storing a page card in the application program; the integration of the dynamic package in the application program may enable the application program to have a function of dynamically loading a new page card based on the dynamic package, thereby enabling the application program to render card data based on the new page card dynamically loaded by the dynamic package. In this way, in the case where the developer needs to make the application have card rendering data based on a new page card, the developer can develop the new page card and deploy the new page card in the server.
Then, for the server, an AB test may be performed on the new page card, for example, when data that the application program needs to render needs to be provided for a part of users, card data that needs to be rendered on the new page card may be provided, so that the application program used by the part of users may render card data on the new page card.
For the application program used by the part of users, first card data provided by the server and a first card identification of a first page card used for rendering the first card data can be received. And searching the first page card in the dynamic packet according to the first card identification. And downloading the first page card from the server according to the first card identifier under the condition that the first page card is not found in the dynamic package of the application program, wherein the first page card is developed in advance and stored in the server. Rendering the first card data based on the first page card.
Therefore, through the application, the AB test on the new page card can be realized for the published application program of the old version, the AB test on the new page card can be realized without waiting for the release of the application program of the new version, the AB test period is shortened, the real-time property of the AB test is improved, and the AB test on the new page card is prevented from being delayed.
In addition, the page card in the application program is dynamically loaded in the application program by means of the dynamic package, so that the page card is decoupled from other functional components in the application program, the influence of the update of the page card on the other functional components in the application program is avoided, the subsequent maintenance of the other functional components in the application program, the maintenance of the page card and the like are facilitated, and the maintenance cost is reduced.
In one embodiment, the development page card can be a page card developed based on Mocha, so that the page card follows the underlying logic, interfaces and the like of Mocha, and thus, the development of a new page card can not be concerned about the development logic of a previously developed page card, and multiplexing and the like of application programs of various versions can be realized as long as the underlying logic and interfaces of Mocha are followed.
Further, in order to avoid downloading the first page card from the server in real time when the next application receives the card data for rendering based on the first page card, so as to achieve the purposes of saving network resources and improving the efficiency of rendering the card data, in another embodiment of the present application, after the first page card is downloaded from the server according to the first card identifier, the first page card may be stored in a dynamic package of the application.
Therefore, when the next application program receives the card data for rendering based on the first page card, the first page card can be directly called from the dynamic package of the application program, and the card data can be rendered based on the first page card, so that network resources can be saved, and the efficiency of rendering the card data can be improved.
Based on the embodiment shown in fig. 1, sometimes, due to a network reason, a long time is consumed in a process of downloading a first page card from a server according to a first card identifier, so that a user cannot see data to be rendered on a page of an application program after waiting for a long time, and further user experience is reduced.
Therefore, in order to improve the user experience, the situation that the user cannot see the data which should be rendered on the page of the application program for a long time can be avoided.
In order to avoid the situation that the user cannot see the data which should be rendered on the page of the application program after waiting for a long time, under the condition that the server provides the first card data and the first card identification of the first page card used for rendering the first card data to the client according to the request of the client, the server can also provide the second card data and the second card identification of the second page card used for rendering the second card data to the client.
Wherein the second card data is not rendered if the first card data is rendered. For example, a first page card is used to replace a second page card in a page (the rendered position of the first card data in the application may be the same as the rendered position of the first card data in the application). The first page card is a new page card, the second page card is an old page card, etc.
For example, the second page card is set in the application program in the process of developing the application program. Thus, the dynamic package of the application includes the second page card.
In this way, when the application program receives the first card data and the first card identifier, the application program also receives second card data provided by the server and a second card identifier of a second page card used for rendering the second card data.
In this way, when the first page card is not found in the dynamic package of the application program, in order to enable the user to see the rendered data on the page of the application program as early as possible, step S103 may not be executed, and the second page card may be called from the dynamic package of the application program, and the second card data may be rendered based on the second page card.
Because the phase is in the AB test phase, it is not much influenced by the user whether the first card data is rendered based on the first page card or the second card data is rendered based on the second page card, so that the first card data may not be rendered based on the first page card in this time and the second card data may be rendered based on the second page card under the condition that the first page card is not found in the dynamic package of the application program.
Further, the first page card does not exist in the dynamic package in the application program when the application program is developed in advance. In order to enable the next time when the application program receives the card data for rendering based on the first page card, the card data can be rendered based on the first page card (for completing the AB test of the server) and the efficiency of rendering the card data based on the first page card can be improved, so that a user can see the data rendered on the page of the application program as soon as possible, the user experience can be improved, and the first page card is downloaded from the server according to the first card identifier under the condition that the first page card is not found in the dynamic package. The first page card is stored in the dynamic package.
Therefore, when the next application program receives the card data used for rendering based on the first page card, the first page card can be directly called from the dynamic package of the application program, the card data can be rendered based on the first page card, the efficiency of rendering the card data based on the first page card can be improved, a user can see the card data rendered based on the first page card on the page of the application program as soon as possible, and the user experience can be improved.
Further, after the AB test is finished, if the developer statistically analyzes that the response effect of the majority of users to the first page card is very good, the developer decides to replace the second page card with the first page card on the page of the application program, for example, then the application program is not caused to render the card data based on the second page card, but is caused to render the card data based on the first page card.
The second page card is usually not used by the application program any longer, and thus, the second page card in the dynamic package of the application program is usually not used, and thus, in order to save the storage resource occupied by the application program and further save the storage resource of the terminal, the second page card can be deleted in the dynamic package under a proper condition.
For example, in one embodiment of the present application, in a case where card data for rendering based on a first page card is received a plurality of times in succession, and card data for rendering based on a second page card is not received in the course of receiving card data for rendering based on a first page card a plurality of times in succession, the second page card is deleted in the dynamic package.
Or, in another embodiment of the present application, in a case that card data for rendering based on the second page card is not received within a preset time period, the second page card is deleted from the dynamic package. The preset time period may include 1 hour, 2 hours, 5 hours, 24 hours, etc., which may be determined according to actual situations and will not be described in detail herein.
The above embodiment is that the application program automatically determines the deletion timing for deleting the second page card in the dynamic package.
In another embodiment, the developer may also control the server to send a deletion instruction for instructing to delete the second page card to each application program, so that each application program deletes the second page card in the dynamic package when receiving the deletion instruction for instructing to delete the second page card sent by the server.
In one embodiment, the application program basic package needs to access Mocha in advance, and the Mocha is used for preferentially processing the previous parsing and rendering processes of the page card. And the server issues new card data, Mocha searches whether a dynamic package has been downloaded and installed with a new page card for rendering the new card data, and if the dynamic package has been downloaded and installed with the new page card for rendering the new card data, the server can render the new card data based on the new page card.
The dynamic package can include new page cards downloaded based on a Mocha framework, the page cards need to acquire unique page card identifiers, realize a resolver, realize a renderer and the like, and the dynamic package is dynamically issued after development and testing are completed. The Mocha template does not distinguish service lines and is not required to be limited by any service interface/base class. the type is the only identification of one template, and the page card can be normally rendered and loaded as long as the mocha capability is accessed to the list and the type issued in the server list data is the type. Mocha has small invasion to the server data structure and processes the server data structure in a mode of adding new data. Mocha facilitates the integration of dynamic packet traffic into the main branch: it is only necessary to move the dynamic package service code directly past and register the page card in the basic package (which is equivalent to the basic package having the page card built therein).
It is noted that, for simplicity of explanation, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will appreciate that the present application is not limited by the order of acts, as some steps may, in accordance with the present application, occur in other orders and concurrently. Further, those skilled in the art will also appreciate that the embodiments described in the specification are exemplary and that no action is necessarily required in this application.
Referring to fig. 2, a block diagram of a data processing apparatus of the present application is shown, and is applied to a terminal, where the terminal includes an application program, and a dynamic package is integrated in the application program, and the dynamic package is used for storing a page card in the application program; the device comprises:
the receiving module 11 is configured to receive first card data provided by a server and a first card identifier of a first page card used for rendering the first card data;
the searching module 12 is configured to search the first page card in the dynamic packet according to the first card identifier;
a first downloading module 13, configured to, when the first page card is not found in the dynamic package, download the first page card from a server according to the first card identifier, where the first page card is developed in advance and stored in the server;
a first rendering module 14, configured to render the first card data based on the first page card.
In an optional implementation, the apparatus further comprises:
and the first storage module is used for storing the first page card in the dynamic package.
In an optional implementation manner, the dynamic package includes a second page card; under the condition that the first card data and the first card identification are received, second card data provided by the server and a second card identification of a second page card used for rendering the second card data are also received; the second card data is not rendered if the first card data is rendered;
the device further comprises:
the calling module is used for calling the second page card in the dynamic package under the condition that the first page card is not found in the dynamic package;
and the second rendering module is used for rendering the second card data based on the second page card.
In an optional implementation manner, the first page card does not exist in the dynamic package in the application program when the application program is developed in advance;
the device further comprises:
the second downloading module is used for downloading the first page card from the server according to the first card identifier under the condition that the first page card is not found in the dynamic package;
and the second storage module is used for storing the first page card in the dynamic package.
In an optional implementation, the apparatus further comprises:
and the first deleting module is used for deleting the second page card in the dynamic packet under the condition that the card data used for rendering based on the first page card is continuously received for multiple times and the card data used for rendering based on the second page card is not received in the process of continuously receiving the card data used for rendering based on the first page card for multiple times.
In an optional implementation, the apparatus further comprises:
and the second deleting module is used for deleting the second page card in the dynamic packet under the condition that the card data used for rendering based on the second page card is not received within the preset time length.
In an optional implementation, the apparatus further comprises:
and the third deleting module is used for deleting the second page card in the dynamic packet under the condition of receiving a deleting instruction which is sent by the server and used for indicating to delete the second page card.
In the application, the terminal comprises an application program, wherein a dynamic package is integrated in the application program and used for storing a page card in the application program; the integration of the dynamic package in the application program may enable the application program to have a function of dynamically loading a new page card based on the dynamic package, thereby enabling the application program to render card data based on the new page card dynamically loaded by the dynamic package. In this way, in the case where the developer needs to make the application have card rendering data based on a new page card, the developer can develop the new page card and deploy the new page card in the server.
Then, for the server, an AB test may be performed on the new page card, for example, when data that the application program needs to render needs to be provided for a part of users, card data that needs to be rendered on the new page card may be provided, so that the application program used by the part of users may render card data on the new page card.
For the application program used by the part of users, first card data provided by the server and a first card identification of a first page card used for rendering the first card data can be received. And searching the first page card in the dynamic packet according to the first card identification. And downloading the first page card from the server according to the first card identifier under the condition that the first page card is not found in the dynamic package of the application program, wherein the first page card is developed in advance and stored in the server. Rendering the first card data based on the first page card.
Therefore, through the application, the AB test on the new page card can be realized for the published application program of the old version, the AB test on the new page card can be realized without waiting for the release of the application program of the new version, the AB test period is shortened, the real-time property of the AB test is improved, and the AB test on the new page card is prevented from being delayed.
In addition, the page card in the application program is dynamically loaded in the application program by means of the dynamic package, so that the page card is decoupled from other functional components in the application program, the influence of the update of the page card on the other functional components in the application program is avoided, the subsequent maintenance of the other functional components in the application program, the maintenance of the page card and the like are facilitated, and the maintenance cost is reduced.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
Optionally, an embodiment of the present invention further provides an electronic device, including: the processor, the memory, and the computer program stored in the memory and capable of running on the processor, when executed by the processor, implement the processes of the data processing method embodiments described above, and can achieve the same technical effects, and in order to avoid repetition, details are not described here.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when being executed by a processor, the computer program implements each process of the data processing method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
Fig. 3 is a block diagram of an electronic device 800 shown in the present application. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 3, electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814, and a communication component 816.
The processing component 802 generally controls overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operation at the device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, images, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 806 provides power to the various components of the electronic device 800. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.
The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the device 800 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the electronic device 800. For example, the sensor assembly 814 may detect an open/closed state of the device 800, the relative positioning of components, such as a display and keypad of the electronic device 800, the sensor assembly 814 may also detect a change in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, orientation or acceleration/deceleration of the electronic device 800, and a change in the temperature of the electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 may access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G, or 5G), or a combination thereof. In an exemplary embodiment, the communication component 816 receives broadcast signals or broadcast operation information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 820 of the electronic device 800 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Fig. 4 is a block diagram of an electronic device 1900 shown in the present application. For example, the electronic device 1900 may be provided as a server.
Referring to fig. 4, electronic device 1900 includes a processing component 1922 further including one or more processors and memory resources, represented by memory 1932, for storing instructions, e.g., applications, executable by processing component 1922. The application programs stored in memory 1932 may include one or more modules that each correspond to a set of instructions. Further, the processing component 1922 is configured to execute instructions to perform the above-described method.
The electronic device 1900 may also include a power component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input/output (I/O) interface 1958. The electronic device 1900 may operate based on an operating system stored in memory 1932, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, or the like.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (16)

1. A data processing method is characterized in that the method is applied to a terminal, the terminal comprises an application program, a dynamic package is integrated in the application program, and the dynamic package is used for storing a page card in the application program; the method comprises the following steps:
receiving first card data provided by a server and a first card identifier of a first page card used for rendering the first card data;
searching the first page card in the dynamic packet according to the first card identifier;
downloading the first page card from a server according to the first card identifier under the condition that the first page card is not found in the dynamic package, wherein the first page card is developed in advance and stored in the server;
rendering the first card data based on the first page card.
2. The method of claim 1, further comprising:
storing the first page card in the dynamic package.
3. The method of claim 1, wherein the dynamic package includes a second page card; under the condition that the first card data and the first card identification are received, second card data provided by the server and a second card identification of a second page card used for rendering the second card data are also received; the second card data is not rendered if the first card data is rendered;
the method further comprises the following steps:
calling the second page card in the dynamic package under the condition that the first page card is not found in the dynamic package;
rendering the second card data based on the second page card.
4. The method of claim 3, wherein the first page card is not present in the dynamic package in the application when the application was previously developed;
the method further comprises the following steps:
downloading the first page card from the server according to the first card identifier under the condition that the first page card is not found in the dynamic package;
storing the first page card in the dynamic package.
5. The method of claim 4, further comprising:
deleting the second page card in the dynamic package if card data for rendering based on the first page card is received multiple times in succession and card data for rendering based on the second page card is not received in the process of receiving card data for rendering based on the first page card multiple times in succession.
6. The method of claim 4, further comprising:
and deleting the second page card in the dynamic packet under the condition that card data used for rendering based on the second page card is not received within a preset time length.
7. The method of claim 4, further comprising:
and under the condition of receiving a deleting instruction which is sent by a server and used for indicating to delete the second page card, deleting the second page card in the dynamic packet.
8. A data processing device is characterized in that the data processing device is applied to a terminal, the terminal comprises an application program, a dynamic package is integrated in the application program, and the dynamic package is used for storing a page card in the application program; the device comprises:
the receiving module is used for receiving first card data provided by a server and a first card identifier of a first page card used for rendering the first card data;
the searching module is used for searching the first page card in the dynamic packet according to the first card identifier;
the first downloading module is used for downloading the first page card from a server according to the first card identifier under the condition that the first page card is not found in the dynamic package, wherein the first page card is developed in advance and stored in the server;
a first rendering module to render the first card data based on the first page card.
9. The apparatus of claim 8, further comprising:
and the first storage module is used for storing the first page card in the dynamic package.
10. The apparatus of claim 8, wherein the dynamic package includes a second page card; under the condition that the first card data and the first card identification are received, second card data provided by the server and a second card identification of a second page card used for rendering the second card data are also received; the second card data is not rendered if the first card data is rendered;
the device further comprises:
the calling module is used for calling the second page card in the dynamic package under the condition that the first page card is not found in the dynamic package;
and the second rendering module is used for rendering the second card data based on the second page card.
11. The apparatus of claim 10, wherein the first page card is not present in the dynamic package in the application when the application was previously developed;
the device further comprises:
the second downloading module is used for downloading the first page card from the server according to the first card identifier under the condition that the first page card is not found in the dynamic package;
and the second storage module is used for storing the first page card in the dynamic package.
12. The apparatus of claim 11, further comprising:
and the first deleting module is used for deleting the second page card in the dynamic packet under the condition that the card data used for rendering based on the first page card is continuously received for multiple times and the card data used for rendering based on the second page card is not received in the process of continuously receiving the card data used for rendering based on the first page card for multiple times.
13. The apparatus of claim 11, further comprising:
and the second deleting module is used for deleting the second page card in the dynamic packet under the condition that the card data used for rendering based on the second page card is not received within the preset time length.
14. The apparatus of claim 11, further comprising:
and the third deleting module is used for deleting the second page card in the dynamic packet under the condition of receiving a deleting instruction which is sent by the server and used for indicating to delete the second page card.
15. An electronic device, comprising: processor, memory and a computer program stored on the memory and executable on the processor, which computer program, when executed by the processor, carries out the steps of the data processing method according to any one of claims 1 to 7.
16. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the data processing method according to any one of claims 1 to 7.
CN202111662963.4A 2021-12-30 2021-12-30 Data processing method and device, electronic equipment and storage medium Pending CN114416033A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111662963.4A CN114416033A (en) 2021-12-30 2021-12-30 Data processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111662963.4A CN114416033A (en) 2021-12-30 2021-12-30 Data processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114416033A true CN114416033A (en) 2022-04-29

Family

ID=81271446

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111662963.4A Pending CN114416033A (en) 2021-12-30 2021-12-30 Data processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114416033A (en)

Similar Documents

Publication Publication Date Title
CN107329743B (en) Application page display method and device and storage medium
CN109032606B (en) Native application compiling method and device and terminal
US20170068527A1 (en) Device control method and apparatus
CN105808305B (en) Static resource loading method and device
CN107357613B (en) Application updating method and device and computer readable storage medium
CN107220059B (en) Application interface display method and device
CN107423218B (en) Application testing method, device and terminal
CN107463372B (en) Data-driven page updating method and device
CN111695064A (en) Embedded point loading method and device
CN112087544B (en) Prompting method and device
CN110457084B (en) Loading method and device
CN114416033A (en) Data processing method and device, electronic equipment and storage medium
CN111597106A (en) Point burying management method and device
CN110989987A (en) Portal webpage generation method, portal webpage generation device, client, server and storage medium
CN111767063A (en) Resource updating method, device and equipment for application program
CN107257384B (en) Service state monitoring method and device
CN111221613A (en) Program calling method and device and storage medium
CN112083981A (en) Method and device for creating page view component
CN112214252A (en) Information expansion method and device and electronic equipment
CN113946346B (en) Data processing method and device, electronic equipment and storage medium
CN116126320B (en) Data processing method and device, electronic equipment and storage medium
CN114416084B (en) Data processing method and device, electronic equipment and storage medium
CN110311968B (en) Method and device for loading file in streaming mode and intelligent equipment
CN114489641B (en) Data processing method and device, electronic equipment and storage medium
CN113934452B (en) Data processing method and device, electronic equipment and storage medium

Legal Events

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