CN111240788A - Method, device and equipment for generating small program page - Google Patents

Method, device and equipment for generating small program page Download PDF

Info

Publication number
CN111240788A
CN111240788A CN202010048325.2A CN202010048325A CN111240788A CN 111240788 A CN111240788 A CN 111240788A CN 202010048325 A CN202010048325 A CN 202010048325A CN 111240788 A CN111240788 A CN 111240788A
Authority
CN
China
Prior art keywords
page
page data
applet
language
data set
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
CN202010048325.2A
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.)
Shanghai Ant Chuangjiang Information Technology Co ltd
Original Assignee
Alipay Hangzhou 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 Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202010048325.2A priority Critical patent/CN111240788A/en
Publication of CN111240788A publication Critical patent/CN111240788A/en
Priority to PCT/CN2020/132622 priority patent/WO2021143371A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • G06F9/454Multi-language systems; Localisation; Internationalisation

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the specification discloses a method, a device and equipment for generating an applet page, wherein the generation scheme of the applet page comprises the following steps: when a request for generating a page of an applet is received, first language information of a host application can be acquired, and the adopted language is determined to be the language indicated by the first language information and page data corresponding to the request for generating the page, so that the page of the applet is generated based on the page data.

Description

Method, device and equipment for generating small program page
Technical Field
One or more embodiments of the present specification relate to the field of computer technologies, and in particular, to a method, an apparatus, and a device for generating an applet page.
Background
With the rapid development of software technology, applets are widely used. The applet is an application program which can be used without downloading and installing, and a user can call the applet on the host application, so that the use is very convenient. At present, the host application generally has multiple language environments, so that a user can control the language presented by the page data of the host application according to actual requirements. However, the page data of the applet can only be presented in a certain fixed language, and cannot be consistent with the language presented by the page data of the host application, which brings inconvenience to the user in using the applet.
In summary, how to keep the languages presented by the page data of the applet and the host application consistent becomes a technical problem to be solved urgently.
Disclosure of Invention
In view of this, one or more embodiments of the present specification provide a method, an apparatus, and a device for generating an applet page, which are used to implement adaptation of an applet to a language environment of an App, so that languages presented by page data of the applet and page data of a host application are consistent.
In order to solve the above technical problem, the embodiments of the present specification are implemented as follows:
an applet page generation method provided in an embodiment of the present specification includes:
obtaining a first generation request for a page of an applet, the applet being launched in a host application;
acquiring first language information of the host application, wherein the first language information is used for expressing a language used by first page data of the host application;
determining second page data of the page, wherein the language adopted by the second page data is the language represented by the first language information;
and generating the page based on the second page data.
An apparatus for generating an applet page provided in an embodiment of the present specification includes:
a first obtaining module, configured to obtain a first generation request for a page of an applet, where the applet is started in a host application;
a second obtaining module, configured to obtain first language information of the host application, where the first language information is used to indicate a language used by first page data of the host application;
the first determining module is used for determining second page data of the page, and the language adopted by the second page data is the language represented by the first language information;
and the first page generation module is used for generating the page based on the second page data.
An apparatus for generating an applet page provided in an embodiment of the present specification includes:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
obtaining a first generation request for a page of an applet, the applet being launched in a host application;
acquiring first language information of the host application, wherein the first language information is used for expressing a language used by first page data of the host application;
determining second page data of the page, wherein the language adopted by the second page data is the language represented by the first language information;
and generating the page based on the second page data.
One embodiment of the present description achieves the following advantageous effects:
when a request for generating a page of an applet is received, first language information of a host application is acquired, second page data of the page is determined, the language adopted by the second page data is the language indicated by the first language information, and the page of the applet is generated based on the second page data. In the scheme, the second page data which is the same as the language adopted by the host application can be determined, and the page of the small program is generated based on the second page data, so that the languages presented by the page data of the small program and the host application are kept consistent, the self-adaption of the small program to the language environment of the App is realized, and the improvement of user experience is facilitated.
Drawings
The accompanying drawings, which are included to provide a further understanding of one or more embodiments of the disclosure and are incorporated in and constitute a part of this specification, illustrate exemplary embodiments of the disclosure and together with the description serve to explain the embodiments of the disclosure and not to limit the embodiments of the disclosure. In the drawings:
fig. 1 is a schematic application page diagram of an application program according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of a method for generating an applet page according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a page of an applet generated based on the method in FIG. 2 according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an apparatus for generating an applet page corresponding to fig. 2 provided in an embodiment of the present specification;
fig. 5 is a schematic structural diagram of an applet page generation device corresponding to fig. 2 provided in an embodiment of this specification.
Detailed Description
To make the objects, technical solutions and advantages of one or more embodiments of the present disclosure more apparent, the technical solutions of one or more embodiments of the present disclosure will be described in detail and completely with reference to the specific embodiments of the present disclosure and the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present specification, and not all embodiments. All other embodiments that can be derived by a person skilled in the art from the embodiments given herein without making any creative effort fall within the scope of protection of one or more embodiments of the present specification.
The technical solutions provided by the embodiments of the present description are described in detail below with reference to the accompanying drawings.
In the prior art, a host application is an application program deployed on a terminal device, and a user can start an applet by triggering an applet icon in an application page of the host application. And the applet is a web structure framework that can be run by the application program of the host application and is developed independently of the application program of the host application.
At present, a host application generally has multiple language environments, and a user can set the current language environment of the host application according to actual requirements, so that data in an application page of the host application is presented in a language corresponding to the language environment set by the user, and the user can use the host application conveniently. But the page data of the applet can usually only be presented in a certain fixed language.
For example, fig. 1 is a schematic view of an application page of an application program provided in an embodiment of the present specification. As shown in fig. 1(a), an application page 101 of the host application is displayed on the terminal device, and as can be seen, the language used by the page data "MiniPrograms" in the application page 101 is english. Also included in the application page 101 is a "movie" applet icon 102 and a "taxi" applet icon 103. After the user triggers the "taxi" applet icon 103, an application page for the "taxi" applet is displayed on the terminal device. Assume that the page data of the applet can only be presented in simplified chinese. Then the page data "taxi", "start point", "end point", etc. in the application page 104 of the "taxi" applet are presented in simplified chinese as shown in fig. 1 (b). The languages presented by the page data of the applet and the host application cannot be kept consistent, so that the user experience is influenced.
In order to solve the defects in the prior art, the scheme provides the following embodiments:
fig. 2 is a schematic flowchart of a method for generating an applet page according to an embodiment of the present disclosure. From a program perspective, the execution subject of the flow may be an applet running on the terminal device.
As shown in fig. 2, the process may include the following steps:
step 202: a first generation request for a page of an applet is obtained, the applet being launched in a host application.
In this specification embodiment, when a user triggers an icon of an applet, or triggers a partial button or hyperlink in an application page of the applet, the applet may recognize a trigger operation of the user, thereby generating a generation request of a page corresponding to the trigger operation. The applet is started in a host application, which is installed in the terminal device.
Step 204: and acquiring first language information of the host application, wherein the first language information is used for expressing the language used by first page data of the host application.
In this embodiment of the present specification, the applet may obtain, by monitoring a language environment of the host application, first language information of the host application, where a language indicated by the first language information is a language that needs to be presented by data in an application page of the host application.
In practical applications, the language environment of the host application generally refers to the language used by (or required to be presented by) the page data of the host application set by the user, for example, the language corresponding to the language environment of the host application may include: simplified Chinese, traditional Chinese, American English, Thai, Indonesian, Arabic, etc. The user can set the language environment of the host application according to actual requirements, so that the language presented by the page data of the host application is the language corresponding to the language environment set by the user. For example, assuming that the language environment currently set by the user for the host application is en-US, the language represented by the acquired first language information of the host application may be english.
Step 206: and determining second page data of the page, wherein the language adopted by the second page data is the language represented by the first language information.
In this embodiment of the present specification, when the first language information of the host application is acquired, in order to keep the languages presented by the page data of the applet and the host application consistent, page data (i.e., second page data) that is the same as the language indicated by the first language information and corresponds to the page generation request in step 202 may be determined. The page data may include, among other things, text information (e.g., title, description, etc.) in the page, icon information, picture information, hyperlink information, and the like.
In the embodiments of the present specification, there are various implementations of determining the second page data of the page.
First implementation
Step 206 may specifically include: and determining second page data of the page from a page data set of the applet, which is locally stored in a terminal device, wherein the terminal device is loaded with the host application, and the page data set comprises page data corresponding to the page in multiple languages.
In this implementation manner, the terminal device may store a page data set of the applet, where the page data in the page data set may have a language identifier, and the language identifier may be used to indicate a language used by the page data, or the language identifier may be used to indicate a language that the page data needs to be presented in the applet page. Therefore, the language identification corresponding to the language indicated by the first language information and the page data corresponding to the page can be locally acquired from the terminal device as the second page data.
When the second page data in the page is determined based on the implementation mode, the speed is high, so that the efficiency of generating and displaying the small program page corresponding to the page generation request can be improved, the waiting time of a user is reduced, and the user experience is improved.
Second implementation
Step 206 may specifically include: and acquiring second page data of the page from the server of the small program.
In this implementation manner, a page data obtaining request for requesting page data (i.e., second page data) whose language is the language indicated by the first language information and which corresponds to the request for generating the page in step 202 may be sent to the applet server. In practical application, a page data set of the applet may be stored in advance in a server of the applet, and the page data set may include page data of multiple languages. The page data set at the applet server is generated in advance, so that each page data in the page data set can be conveniently calibrated, and the accuracy of the page data in the page data set is high. When the server receives the page data acquisition request, the second page data can be determined from the page data of a plurality of languages stored in advance and fed back to the terminal device.
The implementation mode can quickly determine the second page data with higher accuracy, and does not need the terminal equipment to store the page data of the small program in advance, so that the occupation of the storage space of the terminal equipment can be reduced.
Or, the server of the applet may also pre-store only page data in a single language, and when receiving a page data acquisition request sent by the terminal device, if it is determined that the language used by the page data stored in the server is different from the language indicated by the first language information, translate the pre-stored page data corresponding to the request for generating the page in step 202 to generate the second page data, and feed back the second page data to the terminal device.
When the second page data is determined based on the implementation, the terminal device does not need to store the page data of the applet in advance, so that the occupation of the storage space of the terminal device can be reduced. And because the page data of multiple languages is stored in the server without the small program, the occupation of the storage space of the server can be reduced.
In this embodiment of the present specification, the second page data of the page may include page fixed information or page variable information. The page fixed information refers to information that does not change in the page when the page is displayed at different times, for example, button description information, or partial title information. The page variable information refers to information that can be changed in the page when the page is displayed at different times, for example, information such as news content and user personal data.
In practical application, in order to take account of the page generation efficiency and the real-time property of page data, the page fixed information may be stored locally in the terminal device in advance, so as to obtain the page fixed information locally from the terminal device. And storing the page variable information in the servlet to obtain the page variable information from the servlet. In the embodiment of the present specification, the content and the type of the page data stored in the local terminal device and the applet server are not specifically limited, and the maintenance staff of the applet can set the content and the type according to the actual requirements.
Step 208: and generating the page based on the second page data.
In this embodiment of the present specification, the applet has an Executable Code (Executable Code), and the terminal device may execute the Executable Code of the applet to generate a page for presenting the second page data, and present the generated page on the terminal device.
Specifically, the page data of the applet does not need to be embedded in the executable code of the applet in advance, but the page data of the applet only needs to be called when the executable code of the applet is operated, so that the page of the applet can be generated. That is, the executable code of the applet (or the source code for generating the executable code) does not need to include the page data of the applet, and only the required page data needs to be called according to the actual requirement. The development operation of the small program can be simplified, and the language used by the data in the page can be switched in the running process of the executable program of the small program. Because the language used by the data in the small program page can be switched without stopping the small program and modifying the executable code (or the source code) of the small program, the efficiency of switching the language used by the page data of the small program is improved, and the user experience is also improved.
Fig. 3 is a schematic diagram of a page of an applet generated based on the method in fig. 2 according to an embodiment of the present disclosure. As shown in fig. 3(a), an application page 301 of the host application is displayed on the terminal device, and it is apparent that the language used by the page data "Mini Programs" in the application page 301 is english. Also included in the application page 101 are a "movie" applet icon 302 and a "taxi" applet icon 303. Since the language used by the text information in the taxi applet icon 303 is simplified chinese, it can be known that the initial language preset during development of the taxi applet is simplified chinese. After the user triggers the "taxi" applet icon 303, based on the method of fig. 2, an application page for the "taxi" applet is displayed on the terminal device. As shown in fig. 3(b), the page data "Taxi", "Start", "End", etc. in the application page 304 of the "Taxi" applet are in english. I.e. the page of the applet generated based on the method in fig. 2 is in the same language as the page of the host application.
It should be understood that the order of some steps in the method described in one or more embodiments of the present disclosure may be interchanged according to actual needs, or some steps may be omitted or deleted.
The method in fig. 2 may determine that the second page data corresponds to the request for generating the page of the applet, where a language used by the second page data is the same as a language used by the host application, and generate the page of the applet based on the second page data, so that the languages presented by the page data of the applet and the page of the host application are consistent, thereby implementing the self-adaptation of the applet to the language environment of the host application, and facilitating the improvement of user experience.
Based on the method of fig. 2, the present specification also provides some specific embodiments of the method, which are described below.
In this embodiment of the present description, for the first implementation manner of step 206, before the second page data is determined locally from the terminal device, it may be determined whether the terminal device stores the page data set of the applet locally, and if so, the second page data may be determined locally from the terminal device. If not, two conditions exist, namely, the page data set of the small program which is locally stored by the terminal equipment and is deleted; secondly, the terminal device does not locally store the page data set of the applet, namely, the scene corresponding to the applet started by the user through the host application for the first time; at this time, the page data set of the applet needs to be downloaded from the server of the applet to determine the second page data locally from the terminal device.
Therefore, before determining the second page data of the page from the page data set of the applet locally stored in the terminal device, the method may further include:
and judging whether the page data set of the small program is stored locally in the terminal equipment or not to obtain a first judgment result.
And when the first judgment result shows that the page data set of the small program is locally stored in the terminal equipment, determining second page data of the page from the page data set of the small program locally stored in the terminal equipment.
And when the first judgment result shows that the terminal equipment does not locally store the page data set of the small program, sending a page data set acquisition request to a server of the small program, so that the terminal equipment can acquire the page data set of the small program conveniently. Further, the second page data of the page may be determined from a set of page data of the applet locally stored by the terminal device.
In practical applications, the page data set of the applet in the terminal device is obtained from the applet's server. According to actual requirements, page data in a page data set at a server of an applet and the language of the page data may change. For example, page data in a language may be newly added to a page data set at a server of an applet. Therefore, in order to distinguish different page data sets containing different data, different version information may be set for each page data set containing different data.
To ensure real-time performance of the page data set at the terminal device, before determining second page data of the page from the page data set of the applet stored locally at the terminal device, the method may further include:
first version information of a page data set at a server of the applet is obtained.
And acquiring second version information of the page data set of the small program locally stored by the terminal equipment.
And judging whether the first version information is consistent with the second version information or not to obtain a second judgment result.
And when the second judgment result shows that the first version information is consistent with the second version information, determining second page data of the page from a page data set of the applet locally stored in the terminal equipment.
And when the second judgment result shows that the first version information is inconsistent with the second version information, acquiring a page data set of the first version information from the server. And storing the page data set of the first version information to the local terminal equipment. And determining second page data of the page from a page data set of the first version information locally stored by the terminal equipment.
In practical applications, when the first determination result indicates that the terminal device does not locally store the page data set of the applet, for a scenario in which the user starts the applet through the host application for the first time, the first generation request for the page of the applet in step 202 may be a loaded page for requesting generation of the applet.
The sending a page data set acquisition request to the servlet server may specifically include: sending a page data set acquisition request corresponding to the loaded page to a server of the applet, so that the terminal device can acquire the page data set corresponding to the loaded page, wherein the page data set corresponding to the loaded page comprises page data of the loaded page in multiple languages.
The determining the second page data of the page may specifically include: and determining second page data of the loaded page from a page data set which is acquired by the mobile terminal and corresponds to the loaded page, wherein the language adopted by the second page data is the language represented by the first language information.
The generating the page based on the second page data may specifically include: and generating the loading page based on the second page data of the loading page.
In this embodiment of the present specification, when a user starts an applet through an applet entry in a host application for the first time, a load page of the applet is entered first, and page data (i.e., metadata) in the load page may include an applet name, an applet icon, applet description information, and the like. Since the terminal device may locally store page data of a loaded page of an applet in multiple languages, at this time, page data (i.e., second page data) which is the same as the language indicated by the first language information of the host application and corresponds to the loaded page of the applet may be determined from the page data locally stored in the terminal device, and the loaded page of the applet is generated based on the second page data.
In this embodiment of the present specification, because the language of the second page data of the loaded page of the applet that is determined is the same as the language used by the host application (i.e., the language indicated by the first language information), the loaded page of the applet that is generated based on the second page data is the same as the language presented by the application page of the host application, which is beneficial to improving user experience.
Currently, some terminal devices have an intelligent split screen function, that is, application pages of multiple applications can be simultaneously displayed on the terminal device, for example, an application page of a host application and a page of an applet started in the host application can be simultaneously displayed on the terminal device. At this time, if the user modifies the language used by the host application, in order to facilitate the user to use the applet, the applet may automatically update the page of the applet after monitoring that the language information of the host application changes, so that the language of the applet page is consistent with the language currently used by the host application.
Specifically, step 206: after generating the page based on the second page data, the method may further include:
and monitoring second language information after the language information of the host application is changed during the display period of the page.
And determining third page data of the page, wherein the language adopted by the third page data is the language represented by the second language information.
Updating the page based on the third page data.
In this embodiment of the present specification, when the applet page generated in step 206 is displayed on the terminal device, after it is monitored that the language used by the host application is changed, the applet page may be automatically updated without the user performing an operation, so that the language presented by the page data in the applet page is consistent with the language currently used by the host application. The method and the device simplify the operation required to be executed by the user when the small program page is updated, are favorable for improving the updating efficiency of the small program page, and are also favorable for improving the user experience.
In this embodiment of the present specification, during the running of the applet (including the foreground running and the background running), the language information of the host application may be continuously monitored, and when a generation request for the page of the applet in step 202 is received again after step 206 is executed, the page of the applet mentioned in step 202 may be generated again based on the currently monitored language information of the host application.
Specifically, step 206: after generating the page based on the second page data, the method may further include:
and acquiring a second generation request aiming at the page.
And acquiring the third language information of the host application.
And determining fourth page data of the page, wherein the language adopted by the fourth page data is the language indicated by the third language information.
And generating the page based on the fourth page data.
In the embodiment of the present specification, the third language information of the host application may be the same as or different from the first language information of the host application. When the third language information of the host application is the same as the first language information, the determined fourth page data of the page may be the same as the determined second page data of the page. And when the third language information of the host application is different from the first language information, determining that the fourth page data of the page is different from the language used by the second page data of the page, and further, the language presented by the page generated based on the fourth page data is different from the language presented by the page generated based on the second page data. However, the language in which the page generated based on the fourth page data is required to be presented is consistent with the application page of the current host application.
It can be seen that, in the embodiment of the present specification, during the running of the applet, after the language adopted by the host application is changed, the languages used by the page of the applet and the page of the host application can still be kept consistent. The languages used by the small program page can be switched without stopping the small program and modifying the executable code (or the source code) of the small program, so that the efficiency of switching the languages used by the small program page is improved, and the user experience is also improved.
Based on the same idea, the embodiment of the present specification further provides a device corresponding to the above method. Fig. 4 is a schematic structural diagram of an apparatus for generating an applet page corresponding to fig. 2 provided in an embodiment of this specification. As shown in fig. 4, the apparatus may include:
a first obtaining module 402, configured to obtain a first generation request for a page of an applet, the applet being started in a host application;
a second obtaining module 404, configured to obtain first language information of the host application, where the first language information is used to indicate a language used by first page data of the host application;
a first determining module 406, configured to determine second page data of the page, where a language adopted by the second page data is a language indicated by the first language information;
a first page generating module 408, configured to generate the page based on the second page data.
The examples of this specification also provide some specific embodiments of the process based on the apparatus of fig. 4, which is described below.
Optionally, the first determining module 406 may be specifically configured to:
and determining second page data of the page from a page data set of the applet, which is locally stored in a terminal device, wherein the terminal device is loaded with the host application, and the page data set comprises page data corresponding to the page in multiple languages.
Optionally, the apparatus may further include: and the first judgment module is used for judging whether the page data set of the applet is stored locally in the terminal equipment or not to obtain a first judgment result.
Correspondingly, the first determining module 406 may specifically include:
and the page data set acquisition unit is used for sending a page data set acquisition request to a server of the applet when the first judgment result shows that the terminal device does not locally store the page data set of the applet, so that the terminal device can acquire the page data set of the applet.
In practical applications, when the first determination result indicates that the terminal device does not locally store the page data set of the applet, the first generation request for the page of the applet may be used to request generation of a loaded page of the applet.
The page data set obtaining unit may be specifically configured to send a page data set obtaining request corresponding to the loaded page to the servlet server, so that the terminal device obtains the page data set corresponding to the loaded page, where the page data set corresponding to the loaded page includes page data of the loaded page in multiple languages.
The first determining module 406 may further include: and a second page data determining unit, configured to determine second page data of the loaded page from a page data set, which is obtained by the mobile terminal and corresponds to the loaded page, where a language used by the second page data is a language indicated by the first language information.
Correspondingly, the first page generating module 408 is specifically configured to generate the loaded page based on the second page data of the loaded page.
Optionally, the first determining module 406 may be further configured to determine, when the first determination result indicates that the page data set of the applet is locally stored in the terminal device, second page data of the page from the page data set of the applet locally stored in the terminal device.
Optionally, the apparatus may further include:
a fourth obtaining module, configured to obtain, from a page data set of the applet locally stored in the terminal device, first version information of the page data set at a server of the applet before determining second page data of the page.
And the fifth acquiring module is used for acquiring second version information of the page data set of the applet, which is locally stored by the terminal equipment.
And the second judgment module is used for judging whether the first version information is consistent with the second version information or not to obtain a second judgment result.
Correspondingly, the first determining module 406 may be specifically configured to determine, when the second determination result indicates that the first version information is consistent with the second version information, second page data of the page from a page data set of the applet locally stored in the terminal device.
The first determining module 406 is further configured to obtain a page data set of the first version information from the server when the second determination result indicates that the first version information is inconsistent with the second version information; storing the page data set of the first version information to the local terminal equipment; and determining second page data of the page from a page data set of the first version information locally stored by the terminal equipment.
Optionally, the first determining module 406 may be specifically configured to: and acquiring second page data of the page from the server of the small program.
Optionally, the apparatus may further include:
and the monitoring module is used for monitoring the second language information after the language information of the host application is changed during the display period of the page.
And the second determining module is used for determining third page data of the page, wherein the language adopted by the third page data is the language represented by the second language information.
And the page updating module is used for updating the page based on the third page data.
Optionally, the apparatus may further include:
and the third acquisition module is used for acquiring a second generation request aiming at the page.
And the fourth obtaining module is used for obtaining the third language information of the host application.
And the third determining module is used for determining fourth page data of the page, wherein the language adopted by the fourth page data is the language indicated by the third language information.
And the second page generation module is used for generating the page based on the fourth page data.
Based on the same idea, the embodiment of the present specification further provides a device corresponding to the above method.
Fig. 5 is a schematic structural diagram of an applet page generation device corresponding to fig. 2 provided in an embodiment of this specification. As shown in fig. 5, the apparatus 500 may include:
at least one processor 510;
and a memory 530 communicatively coupled to the at least one processor;
wherein the memory 530 stores instructions 520 executable by the at least one processor 510 to enable the at least one processor 510 to:
a first generation request for a page of an applet is obtained, the applet being launched in a host application.
And acquiring first language information of the host application, wherein the first language information is used for expressing the language used by first page data of the host application.
And determining second page data of the page, wherein the language adopted by the second page data is the language represented by the first language information.
And generating the page based on the second page data.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an integrated Circuit chip, such programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean expression Language), ahdl (alternate Language Description Language), traffic, pl (core universal programming Language), HDCal (jhdware Description Language), lang, Lola, HDL, laspam, hardward Description Language (vhr Description Language), and vhjraygurg-Language (Hardware Description Language), which is currently used by Hardware-Language. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, AtmelAT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the various elements may be implemented in the same one or more software and/or hardware implementations in implementing one or more embodiments of the present description.
One skilled in the art will recognize that one or more embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, one or more embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
One or more embodiments of the present description are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to one or more embodiments of the description. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium which can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that 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.
One or more embodiments of the present description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. One or more embodiments of the specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is merely exemplary of the present disclosure and is not intended to limit one or more embodiments of the present disclosure. Various modifications and alterations to one or more embodiments described herein will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of one or more embodiments of the present specification should be included in the scope of claims of one or more embodiments of the present specification.

Claims (18)

1. A generation method of an applet page comprises the following steps:
obtaining a first generation request for a page of an applet, the applet being launched in a host application;
acquiring first language information of the host application, wherein the first language information is used for expressing a language used by first page data of the host application;
determining second page data of the page, wherein the language adopted by the second page data is the language represented by the first language information;
and generating the page based on the second page data.
2. The method according to claim 1, wherein the determining the second page data of the page specifically includes:
and determining second page data of the page from a page data set of the applet, which is locally stored in a terminal device, wherein the terminal device is loaded with the host application, and the page data set comprises page data corresponding to the page in multiple languages.
3. The method according to claim 2, wherein before determining the second page data of the page from the page data set of the applet locally stored in the terminal device, further comprising:
judging whether the page data set of the small program is stored locally in the terminal equipment or not to obtain a first judgment result;
determining second page data of the page from a page data set of the applet locally stored by the slave terminal device, specifically including:
and when the first judgment result shows that the page data set of the small program is locally stored in the terminal equipment, determining second page data of the page from the page data set of the small program locally stored in the terminal equipment.
4. The method according to claim 3, wherein before determining the second page data of the page from the page data set of the applet stored locally in the terminal device, further comprising:
acquiring first version information of a page data set at a server of the applet;
acquiring second version information of a page data set of the small program locally stored by the terminal equipment;
judging whether the first version information is consistent with the second version information or not to obtain a second judgment result;
determining second page data of the page from a page data set of the applet locally stored by the slave terminal device, specifically including:
and when the second judgment result shows that the first version information is consistent with the second version information, determining second page data of the page from a page data set of the applet locally stored in the terminal device.
5. The method of claim 4, after determining whether the first version information and the second version information are consistent, further comprising:
when the second judgment result shows that the first version information is inconsistent with the second version information, acquiring a page data set of the first version information from the server;
storing the page data set of the first version information to the local terminal equipment;
determining second page data of the page from a page data set of the applet locally stored by the slave terminal device, specifically including:
and determining second page data of the page from a page data set of the first version information locally stored by the terminal equipment.
6. The method according to claim 3, wherein after determining whether the page data set of the applet is stored locally in the terminal device, the method further comprises:
and when the first judgment result shows that the terminal equipment does not locally store the page data set of the small program, sending a page data set acquisition request to a server of the small program, so that the terminal equipment can acquire the page data set of the small program conveniently.
7. The method according to claim 6, when the first determination result indicates that the terminal device does not store the page data set of the applet locally, the first generation request for the page of the applet is used for requesting generation of a loaded page of the applet;
the sending of the page data set acquisition request to the servlet server specifically includes:
sending a page data set acquisition request corresponding to the loaded page to a server of the applet, so that the terminal device can acquire the page data set corresponding to the loaded page, wherein the page data set corresponding to the loaded page comprises page data of the loaded page in multiple languages;
the determining the second page data of the page specifically includes:
determining second page data of the loaded page from a page data set which is acquired by the mobile terminal and corresponds to the loaded page, wherein the language adopted by the second page data is the language represented by the first language information;
generating the page based on the second page data specifically includes:
and generating the loading page based on the second page data of the loading page.
8. The method according to claim 1, wherein the determining the second page data of the page specifically includes:
and acquiring second page data of the page from the server of the small program.
9. The method of claim 1, after generating the page based on the second page data, further comprising:
monitoring second language information after the language information of the host application is changed during the display period of the page;
determining third page data of the page, wherein the language adopted by the third page data is the language represented by the second language information;
updating the page based on the third page data.
10. The method of claim 1, after generating the page based on the second page data, further comprising:
acquiring a second generation request aiming at the page;
acquiring third language information of the host application;
determining fourth page data of the page, wherein the language adopted by the fourth page data is the language indicated by the third language information;
and generating the page based on the fourth page data.
11. An applet page generation apparatus comprising:
a first obtaining module, configured to obtain a first generation request for a page of an applet, where the applet is started in a host application;
a second obtaining module, configured to obtain first language information of the host application, where the first language information is used to indicate a language used by first page data of the host application;
the first determining module is used for determining second page data of the page, and the language adopted by the second page data is the language represented by the first language information;
and the first page generation module is used for generating the page based on the second page data.
12. The apparatus of claim 11, wherein the first determining module is specifically configured to:
and determining second page data of the page from a page data set of the applet, which is locally stored in a terminal device, wherein the terminal device is loaded with the host application, and the page data set comprises page data corresponding to the page in multiple languages.
13. The method of claim 12, the apparatus further comprising:
the first judgment module is used for judging whether the page data set of the small program is stored locally in the terminal equipment or not to obtain a first judgment result;
the first determining module specifically includes:
and the page data set acquisition unit is used for sending a page data set acquisition request to a server of the applet when the first judgment result shows that the terminal device does not locally store the page data set of the applet, so that the terminal device can acquire the page data set of the applet.
14. The apparatus according to claim 13, when the first determination result indicates that the terminal device does not store the page data set of the applet locally, a first generation request for a page of the applet is used to request generation of a loaded page of the applet;
the page data set obtaining unit is specifically configured to send a page data set obtaining request corresponding to the loaded page to a server of the applet, so that the terminal device obtains a page data set corresponding to the loaded page, where the page data set corresponding to the loaded page includes page data of the loaded page in multiple languages;
the first determining module further includes:
a second page data determining unit, configured to determine second page data of the loaded page from a page data set, which is obtained by the mobile terminal and corresponds to the loaded page, where a language used by the second page data is a language indicated by the first language information;
the first page generating module is specifically configured to generate the loaded page based on the second page data of the loaded page.
15. The apparatus of claim 11, wherein the first determining module is specifically configured to:
and acquiring second page data of the page from the server of the small program.
16. The apparatus of claim 11, further comprising:
the monitoring module is used for monitoring second language information after the language information of the host application is changed during the display period of the page;
a second determining module, configured to determine third page data of the page, where a language used by the third page data is a language indicated by the second language information;
and the page updating module is used for updating the page based on the third page data.
17. The apparatus of claim 11, further comprising:
the third acquisition module is used for acquiring a second generation request aiming at the page;
a fourth obtaining module, configured to obtain third language information of the host application;
a third determining module, configured to determine fourth page data of the page, where a language used by the fourth page data is a language indicated by the third language information;
and the second page generation module is used for generating the page based on the fourth page data.
18. An applet page generation apparatus comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
obtaining a first generation request for a page of an applet, the applet being launched in a host application;
acquiring first language information of the host application, wherein the first language information is used for expressing a language used by first page data of the host application;
determining second page data of the page, wherein the language adopted by the second page data is the language represented by the first language information;
and generating the page based on the second page data.
CN202010048325.2A 2020-01-16 2020-01-16 Method, device and equipment for generating small program page Pending CN111240788A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010048325.2A CN111240788A (en) 2020-01-16 2020-01-16 Method, device and equipment for generating small program page
PCT/CN2020/132622 WO2021143371A1 (en) 2020-01-16 2020-11-30 Method, apparatus, and device for generating applet page

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010048325.2A CN111240788A (en) 2020-01-16 2020-01-16 Method, device and equipment for generating small program page

Publications (1)

Publication Number Publication Date
CN111240788A true CN111240788A (en) 2020-06-05

Family

ID=70879494

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010048325.2A Pending CN111240788A (en) 2020-01-16 2020-01-16 Method, device and equipment for generating small program page

Country Status (2)

Country Link
CN (1) CN111240788A (en)
WO (1) WO2021143371A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112416374A (en) * 2020-11-18 2021-02-26 北京字跳网络技术有限公司 Data processing method, device, terminal and storage medium
WO2021143371A1 (en) * 2020-01-16 2021-07-22 支付宝(杭州)信息技术有限公司 Method, apparatus, and device for generating applet page
CN113961286A (en) * 2021-10-11 2022-01-21 支付宝(杭州)信息技术有限公司 Page generation method, device and equipment for application program
CN114253641A (en) * 2020-09-25 2022-03-29 支付宝实验室(新加坡)有限公司 Data processing method, mobile terminal and open platform

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114707976A (en) * 2022-03-24 2022-07-05 中国银联股份有限公司 Payment method, user terminal, device, equipment, system and medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101398845A (en) * 2008-11-05 2009-04-01 深圳市金蝶中间件有限公司 Multi-language binding method and system in web applications
US20090172710A1 (en) * 2007-12-28 2009-07-02 Arman Toorians Method and system for enabling a mini program on a computing device to access an auxiliary system
CN106873971A (en) * 2016-12-29 2017-06-20 武汉斗鱼网络科技有限公司 The multilingual methods of exhibiting and system of a kind of flash applications
CN108804175A (en) * 2018-05-21 2018-11-13 Oppo(重庆)智能科技有限公司 Multilingual adaptation method, mobile terminal and computer readable storage medium
CN109032717A (en) * 2018-06-15 2018-12-18 福建天晴数码有限公司 A kind of method and system updating interface display language
CN109918166A (en) * 2019-03-12 2019-06-21 天津字节跳动科技有限公司 Applet process method, apparatus and electronic equipment
CN110597595A (en) * 2019-09-30 2019-12-20 腾讯科技(深圳)有限公司 Method for providing multi-language information, method for configuring multi-language information, device, equipment and medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107329788A (en) * 2017-06-29 2017-11-07 广州优视网络科技有限公司 application program loading method, device and user terminal
CN108681547A (en) * 2018-03-27 2018-10-19 厦门欣旅通科技有限公司 A kind of web content converting method and device based on small routine
CN109947433A (en) * 2019-03-28 2019-06-28 优信拍(北京)信息科技有限公司 A kind of generation method of small routine, update method and device
CN111240788A (en) * 2020-01-16 2020-06-05 支付宝(杭州)信息技术有限公司 Method, device and equipment for generating small program page

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090172710A1 (en) * 2007-12-28 2009-07-02 Arman Toorians Method and system for enabling a mini program on a computing device to access an auxiliary system
CN101398845A (en) * 2008-11-05 2009-04-01 深圳市金蝶中间件有限公司 Multi-language binding method and system in web applications
CN106873971A (en) * 2016-12-29 2017-06-20 武汉斗鱼网络科技有限公司 The multilingual methods of exhibiting and system of a kind of flash applications
CN108804175A (en) * 2018-05-21 2018-11-13 Oppo(重庆)智能科技有限公司 Multilingual adaptation method, mobile terminal and computer readable storage medium
CN109032717A (en) * 2018-06-15 2018-12-18 福建天晴数码有限公司 A kind of method and system updating interface display language
CN109918166A (en) * 2019-03-12 2019-06-21 天津字节跳动科技有限公司 Applet process method, apparatus and electronic equipment
CN110597595A (en) * 2019-09-30 2019-12-20 腾讯科技(深圳)有限公司 Method for providing multi-language information, method for configuring multi-language information, device, equipment and medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021143371A1 (en) * 2020-01-16 2021-07-22 支付宝(杭州)信息技术有限公司 Method, apparatus, and device for generating applet page
CN114253641A (en) * 2020-09-25 2022-03-29 支付宝实验室(新加坡)有限公司 Data processing method, mobile terminal and open platform
CN112416374A (en) * 2020-11-18 2021-02-26 北京字跳网络技术有限公司 Data processing method, device, terminal and storage medium
CN112416374B (en) * 2020-11-18 2022-10-25 北京字跳网络技术有限公司 Data processing method, device, terminal and storage medium
CN113961286A (en) * 2021-10-11 2022-01-21 支付宝(杭州)信息技术有限公司 Page generation method, device and equipment for application program

Also Published As

Publication number Publication date
WO2021143371A1 (en) 2021-07-22

Similar Documents

Publication Publication Date Title
CN111240788A (en) Method, device and equipment for generating small program page
WO2018103550A1 (en) Application program page processing method and apparatus
CN111796823A (en) Method and device for updating page and displaying page and page maintenance system
CN112631679A (en) Preloading method and device for micro-application
CN113259224B (en) Method and device for sending customer service data
CN108959341B (en) Data synchronization method, device and equipment
CN111488167B (en) Applet updating method, device, equipment and computer readable medium
CN111796821A (en) Page updating method and device
CN108268289B (en) Parameter configuration method, device and system for web application
WO2021197140A1 (en) Generation of applet file package
CN110496395B (en) Component operation method, system and equipment for illusion engine
CN108549562A (en) A kind of method and device of image load
CN108460035B (en) Method and device for obtaining barrier-free function state and processing page
CN111273965B (en) Container application starting method, system and device and electronic equipment
CN107479868B (en) Interface loading method, device and equipment
CN111881393A (en) Page rendering method, device, medium and electronic equipment
CN111880990B (en) Exception handling method and device
CN112559934A (en) Page popup display method and device
CN111898056A (en) Webpage display method and device, storage medium and electronic equipment
CN110427237B (en) Method and device for cross-application access to target page and electronic equipment
CN107341155B (en) File naming method and device
CN111538667A (en) Page testing method and device
CN109582388B (en) Parameter configuration method, device and equipment
CN112035117A (en) Page display system, method and device
CN113556260A (en) Flow monitoring method and device, storage medium and electronic equipment

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40030601

Country of ref document: HK

TA01 Transfer of patent application right

Effective date of registration: 20240229

Address after: Room 1408, No. 447 Nanquan North Road, China (Shanghai) Pilot Free Trade Zone, Pudong New Area, Shanghai, 200120

Applicant after: Shanghai Ant Chuangjiang Information Technology Co.,Ltd.

Country or region after: China

Address before: 310000 801-11 section B, 8th floor, 556 Xixi Road, Xihu District, Hangzhou City, Zhejiang Province

Applicant before: Alipay (Hangzhou) Information Technology Co.,Ltd.

Country or region before: China

TA01 Transfer of patent application right