Application program updating method and device, electronic equipment and storage medium
By retrieving and rendering the latest version of the translation files from a remote server, the problem of large workload and long time consumption caused by packaging and republishing translation files during application updates is solved, thus improving update efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SF TECH CO LTD
- Filing Date
- 2024-10-25
- Publication Date
- 2026-04-28
AI Technical Summary
In existing technologies, when an application is updated with multilingual support, the translation files need to be modified or added and repackaged, resulting in a large workload, long processing time, and low efficiency.
By acquiring the original application from the server and installing it locally, the system responds to update requests by sending file request instructions to the remote server, receiving and rendering the latest version of the translation files, thus reducing the steps of packaging and redistributing the translation files.
This eliminates the need to repackage translation files during application updates, reducing workload and improving update efficiency.
Smart Images

Figure CN121934856A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of application development technology, and in particular to an application update method and apparatus, electronic device and storage medium. Background Technology
[0002] When an application needs to provide services to multiple regions, it must consider supporting different regional language conventions (such as Chinese and English usage), which is called application internationalization. The implementation of application internationalization involves developing the application in one language, translating the relevant development files into multiple languages to obtain multiple translation files, and then packaging them into the application's code, allowing users to switch between different languages within the application. However, after the application is developed, if updates are needed—for example, due to translation adjustments or business expansion—the translation files must be modified or added, and then repackaged into the code, requiring a redeployment of the application. This results in a large workload, long processing time, and low efficiency. Therefore, reducing the workload of application updates has become a pressing technical problem. Summary of the Invention
[0003] The main objective of this application is to provide an application update method, apparatus, electronic device, and storage medium, which aims to reduce the workload of updating applications.
[0004] To achieve the above objectives, a first aspect of this application proposes an application update method, the method comprising:
[0005] Obtain the original application published by the server and install the original application on the local machine;
[0006] In response to a program update request for updating the original application, a current file request instruction is sent to a remote server; wherein, the current file request instruction includes the application identifier of the original application, the current language type of the original application, and the current interface identifier of the current interface, the current interface being the interface after the original application is launched;
[0007] Receive the current translation file returned by the remote server based on the application identifier, the current language type, and the current interface identifier; wherein, the current translation file is a file obtained by translating the display information to be displayed on the current interface according to the current language type;
[0008] The current interface is rendered based on the current translation file.
[0009] In some embodiments, after rendering the current interface based on the current translation file, the method further includes:
[0010] Obtain the interface access instruction for the next interface; wherein, the next interface is the interface following the current interface;
[0011] A next file request instruction is sent to the remote server according to the interface access instruction; wherein, the next file request instruction includes the application identifier, the next language type, and the next interface identifier of the next interface;
[0012] The system receives a next translation file returned by the remote server based on the application identifier, the next language type, and the next interface identifier; wherein the next translation file is a file obtained by translating the display information to be displayed on the next interface according to the next language type.
[0013] The next interface is rendered based on the next translation file.
[0014] In some embodiments, after rendering the current interface based on the current translation file, the method further includes:
[0015] Obtain candidate launch instructions; wherein, the candidate launch instructions are instructions for launching the original application for the first time, and the current translation file is pre-saved to the local terminal;
[0016] A data request instruction is sent to the remote server according to the candidate launch instruction; wherein the data request instruction includes the application identifier, the current language type, and the current interface identifier;
[0017] Receive file information data returned by the remote server based on the application identifier, the current language type, and the current interface identifier; wherein, the file information data is the information data of the target translation file;
[0018] Obtain cached information data; wherein, the cached information data is the information data of the current translation file;
[0019] Compare the cached information data with the file information data;
[0020] If the cached information data is the same as the file information data, then the current interface is rendered according to the current translation file;
[0021] If the cached information data is different from the file information data, then the target translation file is requested from the remote server, and the current interface is rendered according to the target translation file.
[0022] In some embodiments, after requesting the target translation file from the remote server and rendering the current interface based on the target translation file if the cached information data is different from the file information data, the method further includes:
[0023] Delete the currently translated file in the local terminal;
[0024] Save the target translation file to the local device.
[0025] In some embodiments, after sending a current file request instruction to a remote server in response to a program update request for updating the original application, the method further includes:
[0026] If the current translation file is not received from the remote server within a preset time period, a candidate translation file is obtained from the local terminal; wherein, the candidate translation file is the translation file packaged into the original application during the development of the original application;
[0027] The current interface is rendered based on the candidate translation file.
[0028] In some embodiments, after rendering the current interface based on the candidate translation file, the method further includes:
[0029] Initiate a polling task to send the current file request instruction to the remote server until the current translation file is returned by the remote server;
[0030] The current interface is rendered based on the current translation file.
[0031] In some embodiments, after rendering the current interface based on the current translation file, the method further includes:
[0032] In response to a program update request for updating the original application, a common request instruction is sent to the remote server; wherein the common request instruction includes the application identifier and the current language type;
[0033] Receive a common translation file returned by the remote server based on the application identifier and the current language type; wherein, the common translation file is a file obtained by translating the information displayed by all interfaces in the application according to the current language type;
[0034] The current interface is rendered based on the public translation file.
[0035] To achieve the above objectives, a second aspect of this application provides an application update apparatus, the apparatus comprising:
[0036] The acquisition module is used to acquire the original application published by the server and install the original application on the local machine;
[0037] The sending module is used to send a current file request instruction to a remote server in response to a program update request for updating the original application; wherein the current file request instruction includes the application identifier of the original application, the current language type of the original application, and the current interface identifier of the current interface, wherein the current interface is the interface after the original application is launched;
[0038] The receiving module is configured to receive the current translation file returned by the remote server based on the application identifier, the current language type, and the current interface identifier; wherein, the current translation file is a file obtained by translating the display information to be displayed on the current interface according to the current language type;
[0039] The rendering module is used to render the current interface based on the current translation file.
[0040] To achieve the above objectives, a third aspect of this application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the method described in the first aspect.
[0041] To achieve the above objectives, a fourth aspect of the present application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in the first aspect.
[0042] The application update method, apparatus, electronic device, and storage medium proposed in this application obtain the original application published by the server, install the original application on the local machine, and send a current file request instruction to a remote server in response to a program update request for updating the original application. The current file request instruction includes the application identifier of the original application, the current language type of the original application, and the current interface identifier of the current interface. It receives the current translation file (the latest version translation file of the current interface) returned by the remote server based on the application identifier, current language type, and current interface identifier. The current translation file is a file obtained by translating the display information required to be displayed on the current interface according to the current language type. The current interface is rendered based on the current translation file. Therefore, when updating the application, it is not necessary to package the latest version translation file into the code and redistribute it; instead, the latest version translation file is directly pulled from the remote server and rendered, reducing the workload of updating the application. Attached Figure Description
[0043] Figure 1 This is an optional flowchart of the application update method provided in the embodiments of this application;
[0044] Figure 2 This is a flowchart of an application update method provided in another embodiment of this application;
[0045] Figure 3 This is a flowchart of the application update method provided in the third embodiment of this application;
[0046] Figure 4 This is a flowchart of the application update method provided in the fourth embodiment of this application;
[0047] Figure 5 This is a flowchart of the application update method provided in the fifth embodiment of this application;
[0048] Figure 6 This is a flowchart of the application update method provided in the sixth embodiment of this application;
[0049] Figure 7 This is a flowchart of the application update method provided in the seventh embodiment of this application;
[0050] Figure 8 This is a schematic diagram of the structure of the application update device provided in the embodiments of this application;
[0051] Figure 9 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0052] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0053] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0054] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0055] Once the application is developed, if it needs to be updated, such as due to translation adjustments or business expansion, the translation files need to be modified or added, and the added or modified translation files need to be repackaged into the code and the application redeployed. This results in a large workload, long time consumption and low efficiency in updating the application.
[0056] Based on this, embodiments of this application provide an application update method, apparatus, electronic device, and storage medium, designed to pre-upload the latest version of the translation file to a remote server. When the application needs an update, it requests the latest version of the translation file from the remote server and renders the application based on the latest version of the translation file, thereby updating the application. This eliminates the need to repackage the latest version of the translation file into the code or redeploy the application, reducing the workload of updating the application.
[0057] The application update method, apparatus, electronic device, and storage medium provided in this application embodiment are specifically described through the following embodiments. First, the application update method in this application embodiment is described.
[0058] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.
[0059] Foundational technologies in artificial intelligence generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.
[0060] The application update method provided in this application embodiment can be applied to a terminal, a server, or software running on either a terminal or a server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, etc.; the server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the application update method, but is not limited to the above forms.
[0061] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0062] Please refer to Figure 1 , Figure 1 This is an optional flowchart of the application update method provided in the embodiments of this application. Figure 1 The method may include, but is not limited to, steps S101 to S104.
[0063] Step S101: Obtain the original application published by the server and install the original application on the local machine;
[0064] Step S102: In response to the program update request for updating the original application, a current file request instruction is sent to the remote server; wherein, the current file request instruction includes the application identifier of the original application, the current language type of the original application, and the current interface identifier of the current interface, and the current interface is the interface after the original application is started.
[0065] Step S103: Receive the current translation file returned by the remote server based on the application identifier, the current language type, and the current interface identifier; wherein, the current translation file is a file obtained by translating the display information required to be displayed on the current interface according to the current language type;
[0066] Step S104: Render the current interface based on the current translation file.
[0067] In step S101 of some embodiments, the application, when first released, is referred to as the original application. After obtaining the original application released by the server, the original application is installed on the local device. The local device refers to the device on which the application can run, which can be a user's handheld mobile device, such as a mobile phone or tablet, or a desktop computer or laptop. The original application can be simply referred to as the application.
[0068] In step S102 of some embodiments, after the user launches the application, the current interface is first displayed. It needs to be determined whether the current interface has the latest version of the translation file. Therefore, a program update request for updating the application is automatically triggered. In response to the program update request, the application sends a current file request instruction to the remote server. The current file request instruction includes the application identifier of the original application, the current language type of the original application, and the current interface identifier of the current interface.
[0069] In step S103 of some embodiments, the translation file is a file that translates the application's interface display content. When the application needs to be updated, i.e., when there are translation adjustments or business expansions, the interface display content needs to be changed. Therefore, it is necessary to obtain the latest version of the translation file to render the interface. In related technologies, the latest version of the translation file is packaged into the code and the application file is redistributed, resulting in a large workload for updating the application. In this embodiment, when the application needs to be updated, the latest version of the translation file is uploaded to a remote server in advance. When the application needs to be updated, the latest version of the translation file is pulled from the remote server through an interface, and the interface is rendered based on the latest version of the translation file, reducing the workload of updating the application.
[0070] Specifically, the remote server pre-stores the latest version translation files for each application and each interface in different language types. Therefore, the remote server locates the latest version translation file for the current interface (the current translation file) based on the application identifier, current language type, and current interface identifier, and then returns it to the application. The current translation file is a file obtained by translating the display information required for the current interface according to the current language type. The display information required for the current interface may not be consistent with the display information currently displayed. When the application needs to be updated, the display information required for the current interface will differ from the display information currently displayed; when the application does not need to be updated, the display information required for the current interface will be consistent with the display information currently displayed. The application can switch the displayed language type. If the application displays Chinese, then the current language type is Chinese. If the application switches the language type from Chinese to English, then the current language type is English.
[0071] In step S104 of some embodiments, the current interface is rendered according to the current translation file, thereby updating the application.
[0072] It's important to note that the required translation files may differ depending on the platform the application is installed on. This is because the content displayed on a mobile device may differ from that displayed on a PC. Therefore, in one example, the remote server pre-stores the latest version of the translation files for each application and each interface on different platform types, in different languages. Thus, the current file request instruction also includes the platform type on which the original application is running.
[0073] Steps S101 to S104, as illustrated in this embodiment, involve obtaining the original application published by the server and installing it locally. In response to a program update request for updating the original application, a current file request instruction is sent to a remote server. This current file request instruction includes the application identifier of the original application, the current language type of the original application, and the current interface identifier of the current interface. The remote server returns a current translation file based on the application identifier, current language type, and current interface identifier. This current translation file is the latest version of the translation file for the current interface. Specifically, the current translation file is a file obtained by translating the display information required for the current interface according to the current language type. The current interface is then rendered based on the current translation file. This allows for application updates without needing to package the latest version of the translation file into the code and redistribute it. Instead, the latest version of the translation file is directly retrieved from the remote server and rendered, reducing the workload of updating the application.
[0074] Please see Figure 2In some embodiments, after step S104, the application update method may include, but is not limited to, steps S201 to S204:
[0075] Step S201: Obtain the interface access instruction for the next interface; wherein, the next interface is the interface following the current interface.
[0076] Step S202: Send a next file request instruction to the remote server according to the interface access instruction; wherein, the next file request instruction includes the application identifier, the current language type, and the next interface identifier of the next interface;
[0077] Step S203: Receive the next translation file returned by the remote server based on the application identifier, the current language type, and the next interface identifier; wherein, the next translation file is a file obtained by translating the display information to be displayed in the next interface according to the current language type;
[0078] Step S204: Render the next interface based on the next translation file.
[0079] In step S201 of some embodiments, since each interface of the application is displayed sequentially, to reduce the size of the translation file and prevent long processing times when receiving the translation file returned by the remote server, each interface's display content corresponds to a translation file. Therefore, when the user switches to the next interface, an interface access instruction for the next interface is obtained, and the latest version of the translation file for the next interface is obtained and updated based on the interface access instruction. Here, the next interface is the interface following the current interface. For example, if the application has 10 interfaces, the first interface is the current interface. When switching to the second interface, the second interface becomes the next interface of the first interface, and the third interface becomes the next interface of the second interface. This process continues, thereby enabling updates to all interfaces of the application.
[0080] In step S202 of some embodiments, the application needs to request the translation file of the latest version of the next interface from the remote server. Therefore, it sends a next file request instruction to the remote server according to the interface access instruction. The next file request instruction includes the application identifier, the next language type, and the next interface identifier of the next interface.
[0081] It should be noted that since launching the application and switching to the next screen are generally performed by the same user, the next language type is usually the same as the current language type. Users can also switch to a different language type on the next screen.
[0082] In step S203 of some embodiments, the remote server finds the next translation file based on the application identifier, the next language type, and the next interface identifier. The next translation file is the latest version of the translation file for the next interface and is returned to the application. The next translation file is a file obtained by translating the display information displayed on the next interface according to the next language type, and it is the latest version of the translation file.
[0083] In step S204 of some embodiments, after the application receives the next translation file, it renders the next interface according to the next translation file, thereby updating the next interface.
[0084] It should be noted that application updates are updates for at least one interface. When an interface does not need to be updated, the remote server returns a message indicating that no update is required.
[0085] In one example, the remote server can also store the latest version translation files for all interfaces of each application, thus requiring only one request for the translation files when the application is updated, reducing the number of requests. Users can configure different settings according to their different needs.
[0086] In this embodiment, steps S201 to S204 involve obtaining an interface access instruction for the next interface and sending a next file request instruction to the remote server based on the interface access instruction. The next translation file returned by the remote server based on the application identifier, the next language type, and the next interface identifier is received. The next interface is then rendered based on the next translation file, thereby reducing the workload of updating the application while simultaneously updating the application.
[0087] Please see Figure 3 In some embodiments, after step S104, the application update method may also include, but is not limited to, steps S301 to S307:
[0088] Step S301: Obtain candidate startup instructions; wherein, candidate startup instructions are instructions used for launching the original application for the first time, and the current translation file is saved locally in advance;
[0089] Step S302: Send a data request instruction to the remote server according to the candidate startup instruction; wherein, the data request instruction includes the application identifier, the current language type, and the current interface identifier;
[0090] Step S303: Receive file information data returned by the remote server based on the application identifier, current language type, and current interface identifier; wherein, the file information data is the information data of the target translation file;
[0091] Step S304: Obtain cache information data; wherein, the cache information data is the information data of the current translation file;
[0092] Step S305: Compare the cached information data with the file information data;
[0093] Step S306: If the cached information data is the same as the file information data, then render the current interface according to the current translation file;
[0094] In step S307, if the cached information data is different from the file information data, a target translation file is requested from the remote server, and the current interface is rendered according to the target translation file.
[0095] In step S301 of some embodiments, the application may undergo multiple updates. During the first update, the translation file obtained from the remote server is saved locally. For example, if the first update only updates the current interface, the current translation file is saved locally. The first launch of the application is the launch during the first update. After the first update, when the user launches the application again, the application receives a candidate launch instruction.
[0096] In step S302 of some embodiments, since the application has already saved the current translation file, if the latest version of the translation file for the current interface is still the current translation file, there is no need to obtain the current translation file from the remote server again. Therefore, it is necessary to determine whether the latest version of the translation file in the remote server has been updated, and thus a data request instruction is sent to the remote server according to the candidate startup instruction; wherein, the data request instruction includes the application identifier, the current language type, and the current interface identifier.
[0097] In step S303 of some embodiments, the server returns file information data based on the application identifier, the current language type, and the current interface identifier. The file information data is the information data of the target translation file. The target translation file is the latest version of the translation file stored on a remote server, and the file information data may be the file's version information.
[0098] In steps S304 to S306 of some embodiments, the information data of the current translation file is the version information of the current translation file. In one example, the current translation file used for the first update is the first version, so the cached information data is the first version. If the target translation file is also the first version, then the file information data is also the first version, indicating that the cached information data and the file information data are the same, that is, the latest version of the translation file has not been updated. Therefore, the current translation file can be directly obtained from the local cache to render the current interface, without having to fetch the translation file from a remote server.
[0099] In step S307 of some embodiments, if the current translation file is version 1 and the target translation file is version 2, it indicates that the cached information data and the file information data are different, meaning that the latest version of the translation file has been updated. Therefore, it is necessary to request the target translation file from the remote server and render the current interface based on the target translation file, thereby updating the application again.
[0100] It should be noted that the above explanation uses the current interface as an example for updating again; however, all interfaces of the application can be updated multiple times in the same way.
[0101] In steps S301 to S307 of this embodiment, when the application is updated for the first time, the current translation file is saved locally. So when the application is restarted after the first update, it is first determined whether another update is needed. If no update is needed, the current interface is rendered directly based on the current translation file. If an update is needed, the latest version of the translation file, i.e., the target translation file, is obtained and the current interface is rendered.
[0102] Please see Figure 4 In some embodiments, after step S307, the application update method may also include, but is not limited to, steps S401 to S402:
[0103] Step S401: Delete the current translation file on the local machine;
[0104] Step S402: Save the target translation file to the local machine.
[0105] In steps S401 to S402 of this embodiment, after the application requests a target translation file from a remote server and renders the current interface based on the target translation file, the current translation file is not the latest version. Therefore, the current translation file is deleted from the local machine, and the target translation file is saved locally so that when the application is launched next time, it can determine whether the latest version of the translation file has been updated on the remote server based on the target translation file.
[0106] Please see Figure 5 In some embodiments, after step S102, the application update method further includes, but is not limited to, steps S501 to S502:
[0107] Step S501: If the current translation file is not received from the remote server within a preset time period, a candidate translation file is obtained from the local end; wherein, the candidate translation file is the translation file packaged into the original application during the development of the original application.
[0108] Step S502: Render the current interface based on the candidate translation files.
[0109] In steps S501 to S502 of this embodiment, the application and the remote server exchange information through an interface. When the interface is normal, the application sends a current file request command to the remote server and receives the current translation file returned by the remote server. If the current translation file is not received from the remote server within a preset time period, it indicates that the interface is abnormal. Candidate translation files are pre-packaged into the original application during its development, so that the current interface can be rendered based on the candidate translation files when the interface is abnormal, preventing the inability to render the current interface when the current translation file is not received.
[0110] Please see Figure 6 In some embodiments, after step S502, the application update method may also include, but is not limited to, steps S601 to S602:
[0111] Step S601: Start the polling task to send the current file request instruction to the remote server until the current translation file is received from the remote server;
[0112] Step S602: Render the current interface based on the current translation file.
[0113] In steps S601 to S602 of this embodiment, the candidate translation file is a translation file in the default language. Users may need to switch to other languages. Therefore, a polling task needs to be started to send a current file request instruction to the remote server until the current translation file is received from the remote server, at which point the polling task is closed. The current interface is then rendered based on the current translation file to satisfy the user's language preferences.
[0114] Please refer to Figure 7 In some embodiments, after step S104, the application update method may also include, but is not limited to, steps S701 to S703:
[0115] Step S701: In response to a program update request for updating the original application, a common request instruction is sent to a remote server; wherein the common request instruction includes the application identifier and the current language type;
[0116] Step S702: Receive a common translation file returned by the remote server based on the application identifier and the current language type; wherein, the common translation file is a file obtained by translating the information displayed by all interfaces in the application according to the current language type;
[0117] Step S703: Render the current interface based on the public translation file.
[0118] In step S701 of some embodiments, all interfaces in the application share common display information. Therefore, the common display information for all interfaces can be compiled into a separate common translation file, thereby further reducing the size of the current translation file. In response to a program update request for updating the original application, a common request instruction also needs to be sent to a remote server. The common request instruction includes the application identifier and the current language type.
[0119] In step S702 of some embodiments, a common module is set up in the remote server, which stores common translation files for different language types of each application. When the remote server receives a common request instruction, it locates the common translation file in the common module according to the application identifier and the current language type, and returns it to the application.
[0120] In step S703 of some embodiments, the application receives a common translation file and renders the current interface based on the common translation file. It should be noted that since the common translation file is the translation file required for all interfaces, when the user switches to the next interface, it is not necessary to obtain the common translation file for the next interface again; the next interface can be rendered directly based on the common translation file.
[0121] Steps S701 to S703 of this embodiment further reduce the size of the current translation file by forming a common translation file for all common display information of the interface separately.
[0122] Please see Figure 8 This application also provides an application update apparatus that can implement the above-described application update method. The apparatus includes:
[0123] The acquisition module 801 is used to acquire the original application published by the server and install the original application on the local machine.
[0124] The sending module 802 is used to send a current file request instruction to a remote server in response to a program update request for updating the original application; wherein, the current file request instruction includes the application identifier of the original application, the current language type of the original application, and the current interface identifier of the current interface, and the current interface is the interface after the original application is started.
[0125] The receiving module 803 is used to receive the current translation file returned by the remote server based on the application identifier, the current language type, and the current interface identifier; wherein, the current translation file is a file obtained by translating the display information to be displayed on the current interface according to the current language type;
[0126] Rendering module 804 is used to render the current interface based on the current translation file.
[0127] The specific implementation of the application update device is basically the same as the specific implementation of the application update method described above, and will not be repeated here.
[0128] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described application update method. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.
[0129] Please see Figure 9 , Figure 9 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes:
[0130] The processor 901 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application.
[0131] The memory 902 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 902 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 902 and is called and executed by the processor 901 using the application update method of the embodiments of this application.
[0132] The input / output interface 903 is used to implement information input and output;
[0133] The communication interface 904 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0134] Bus 905 transmits information between various components of the device (e.g., processor 901, memory 902, input / output interface 903, and communication interface 904);
[0135] The processor 901, memory 902, input / output interface 903, and communication interface 904 are connected to each other within the device via bus 905.
[0136] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described application update method.
[0137] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0138] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0139] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0140] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0141] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0142] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0143] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0144] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the apparatus or units may be electrical, mechanical, or other forms.
[0145] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0146] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0147] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0148] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.
Claims
1. An application update method, characterized in that, The method includes: Obtain the original application published by the server and install the original application on the local machine; In response to a program update request for updating the original application, a current file request instruction is sent to a remote server; wherein, the current file request instruction includes the application identifier of the original application, the current language type of the original application, and the current interface identifier of the current interface, the current interface being the interface after the original application is launched; Receive the current translation file returned by the remote server based on the application identifier, the current language type, and the current interface identifier; wherein, the current translation file is a file obtained by translating the display information to be displayed on the current interface according to the current language type; The current interface is rendered based on the current translation file.
2. The method according to claim 1, characterized in that, After rendering the current interface based on the current translation file, the method further includes: Obtain the interface access instruction for the next interface; wherein, the next interface is the interface following the current interface; A next file request instruction is sent to the remote server according to the interface access instruction; wherein, the next file request instruction includes the application identifier, the next language type, and the next interface identifier of the next interface; The system receives a next translation file returned by the remote server based on the application identifier, the next language type, and the next interface identifier; wherein the next translation file is a file obtained by translating the display information to be displayed on the next interface according to the next language type. The next interface is rendered based on the next translation file.
3. The method according to claim 1, characterized in that, After rendering the current interface based on the current translation file, the method further includes: Obtain candidate launch instructions; wherein, the candidate launch instructions are instructions for launching the original application for the first time, and the current translation file is pre-saved to the local terminal; A data request instruction is sent to the remote server according to the candidate launch instruction; wherein the data request instruction includes the application identifier, the current language type, and the current interface identifier; Receive file information data returned by the remote server based on the application identifier, the current language type, and the current interface identifier; wherein, the file information data is the information data of the target translation file; Obtain cached information data; wherein, the cached information data is the information data of the current translation file; Compare the cached information data with the file information data; If the cached information data is the same as the file information data, then the current interface is rendered according to the current translation file; If the cached information data is different from the file information data, then the target translation file is requested from the remote server, and the current interface is rendered according to the target translation file.
4. The method according to claim 3, characterized in that, If the cached information data is different from the file information data, then after requesting the target translation file from the remote server and rendering the current interface based on the target translation file, the method further includes: Delete the currently translated file in the local terminal; Save the target translation file to the local device.
5. The method according to claim 1, characterized in that, After sending a current file request instruction to a remote server in response to a program update request for updating the original application, the method further includes: If the current translation file is not received from the remote server within a preset time period, a candidate translation file is obtained from the local terminal; wherein, the candidate translation file is the translation file packaged into the original application during the development of the original application; The current interface is rendered based on the candidate translation file.
6. The method according to claim 5, characterized in that, After rendering the current interface based on the candidate translation file, the method further includes: Initiate a polling task to send the current file request instruction to the remote server until the current translation file is returned by the remote server; The current interface is rendered based on the current translation file.
7. The method according to claim 1, characterized in that, After rendering the current interface based on the current translation file, the method further includes: In response to a program update request for updating the original application, a common request instruction is sent to the remote server; wherein the common request instruction includes the application identifier and the current language type; Receive a common translation file returned by the remote server based on the application identifier and the current language type; wherein, the common translation file is a file obtained by translating the information displayed by all interfaces in the application according to the current language type; The current interface is rendered based on the public translation file.
8. An application implementation apparatus, characterized in that, The device, used in an application, includes: The acquisition module is used to acquire the original application published by the server and install the original application on the local machine; The sending module is used to send a current file request instruction to a remote server in response to a program update request for updating the original application; wherein the current file request instruction includes the application identifier of the original application, the current language type of the original application, and the current interface identifier of the current interface, wherein the current interface is the interface after the original application is launched; The receiving module is configured to receive the current translation file returned by the remote server based on the application identifier, the current language type, and the current interface identifier; wherein, the current translation file is a file obtained by translating the display information to be displayed on the current interface according to the current language type; The rendering module is used to render the current interface based on the current translation file.
9. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the application implementation method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the application implementation method according to any one of claims 1 to 7.