Method, device and computer-readable storage medium for adapting to multiple terminal devices

By saving and updating the front-end code of the robot device in the control terminal, the problem of frequent robot control software updates is solved, the automation of device adaptation and cost reduction are realized, and the user experience is improved.

CN112379902BActive Publication Date: 2024-10-18SHENZHEN YUEJIANG TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011232404.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-06
Publication Date
2024-10-18
Estimated Expiration
2040-11-06

AI Technical Summary

Technical Problem

In the existing technology, frequent updates of robot control software make terminal device upgrades time-consuming and laborious. Especially when non-Android systems and terminal devices change frequently, applications need to be frequently upgraded, which increases cost and time overhead.

Method used

By saving the front-end codes of multiple terminal devices in the control terminal, and locally determining whether the code is the latest, if not, downloading the latest code from the backend server, displaying and interacting with it, avoiding the direct upgrade of the control terminal application. .

Benefits of technology

It realizes the adaptation of a variety of terminal devices without changing the control terminal application, reduces development costs and improves user experience, and reduces upgrade time and labor.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112379902B_ABST
    Figure CN112379902B_ABST
Patent Text Reader

Abstract

The present application relates to the field of robot control, and provides a method, device, control terminal and computer-readable storage medium for adapting to multiple terminal devices. The method includes: when starting an application to interact with a terminal device D among multiple terminal devices, determining whether the front-end code of the terminal device D stored locally is the latest front-end code; if the front-end code of the terminal device D stored locally is not the latest front-end code, downloading the latest front-end code of the terminal device D in the background through the front-end code download interface opened by the background server; loading the latest front-end code of the terminal device D and displaying the page corresponding to the latest front-end code; interacting with the terminal device D in response to the user's operation on the page corresponding to the latest front-end code. The present application can achieve the adaptation of the application of the control terminal to multiple terminal devices without modifying the application of the control terminal, thereby reducing various costs for developing the application of the control terminal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of robot control, and in particular, relates to a method, device and computer-readable storage medium adapted to multiple terminal devices. Background Art

[0002] At present, various robots, especially intelligent robots, have been widely used in all walks of life. The control part of the robot is completed by software, which is generally controlled by applications on terminals such as smart phones and industrial computers.

[0003] As the equipment is updated, the robot's control software is updated accordingly. In order to adapt to the robot's control software, the application on the terminal must also be updated. At present, most smart terminals adapt to robots or certain components on robots from different manufacturers by upgrading the applications installed on them.

[0004] However, upgrading applications is a time-consuming and laborious task, especially for some smart terminals that are not based on Android systems (such as iOS). Upgrading applications requires longer approval time. Furthermore, if the manufacturer's terminal devices change frequently, the applications that were upgraded not long ago may not be available, which means that frequent application upgrades will take longer. Summary of the invention

[0005] The present application provides a method, device and computer-readable storage medium for adapting to a variety of terminal devices, thereby eliminating the need to upgrade application programs on the terminal and reducing the cost of adapting the manufacturer's terminal devices.

[0006] A first aspect of the present application provides a method for adapting multiple terminal devices, the method comprising:

[0007] When starting an application to interact with a terminal device D among multiple terminal devices, determining whether the front-end code of the terminal device D stored locally is the latest front-end code;

[0008] If the front-end code of the terminal device D stored locally is not the latest front-end code, the latest front-end code of the terminal device D is downloaded in the background through the front-end code download interface opened by the background server;

[0009] Load the latest front-end code of the terminal device D and display the page corresponding to the latest front-end code;

[0010] In response to the user's operation on the page corresponding to the latest front-end code, interaction is performed with the terminal device D.

[0011] A second aspect of the present application provides a device adapted to multiple terminal devices, the device comprising:

[0012] A determination module, used for determining whether the front-end code of the terminal device D stored locally is the latest front-end code when starting the application to interact with the terminal device D among the multiple terminal devices;

[0013] A download module, used for downloading the latest front-end code of the terminal device D in the background through the front-end code download interface opened by the background server if the front-end code of the terminal device D stored locally is not the latest front-end code;

[0014] A page display module, used to load the latest front-end code of the terminal device D and display the page corresponding to the latest front-end code;

[0015] The interaction module is used to interact with the terminal device D in response to the user's operation on the page corresponding to the latest front-end code.

[0016] In a third aspect of the present application, a control terminal is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following method steps when executing the computer program:

[0017] When starting an application to interact with a terminal device D among multiple terminal devices, determining whether the front-end code of the terminal device D stored locally is the latest front-end code;

[0018] If the front-end code of the terminal device D stored locally is not the latest front-end code, the latest front-end code of the terminal device D is downloaded in the background through the front-end code download interface opened by the background server;

[0019] Load the latest front-end code of the terminal device D and display the page corresponding to the latest front-end code;

[0020] In response to the user's operation on the page corresponding to the latest front-end code, interaction is performed with the terminal device D.

[0021] A fourth aspect of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the following method are implemented:

[0022] When starting an application to interact with a terminal device D among multiple terminal devices, determining whether the front-end code of the terminal device D stored locally is the latest front-end code;

[0023] If the front-end code of the terminal device D stored locally is not the latest front-end code, the latest front-end code of the terminal device D is downloaded in the background through the front-end code download interface opened by the background server;

[0024] Load the latest front-end code of the terminal device D and display the page corresponding to the latest front-end code;

[0025] In response to the user's operation on the page corresponding to the latest front-end code, interaction is performed with the terminal device D.

[0026] From the technical solution provided by the present application, it can be seen that, unlike the prior art in which the type of the manufacturer's terminal device changes or a new manufacturer's terminal device appears, it is necessary to upgrade the mobile application of the control terminal, which is time-consuming and laborious. The technical solution of the present application is to save the front-end code used to control its respective terminal device in the control terminal, and only when the front-end code of a certain terminal device saved locally is not the latest front-end code, download the latest front-end code of the terminal device from the background server for display. Since the latest front-end code of the terminal device is loaded locally or downloaded locally and then loaded, there is no need to change the application of the control terminal, so the application of the control terminal can be adapted to multiple terminal devices, eliminating the various inconveniences caused by upgrading the application, thereby reducing the various costs of developing the application of the control terminal. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0028] Figure 1 It is a schematic diagram of the implementation flow of the method for adapting to multiple terminal devices provided in an embodiment of the present application;

[0029] Figure 2 This is a schematic diagram of a structure adapted to various terminal devices provided in an embodiment of the present application;

[0030] Figure 3 is a schematic diagram of the structure of the control terminal provided in an embodiment of the present application;

[0031] Figure 4 It is a communication connection diagram between the manufacturer's terminal device, the control terminal, the background server and the manufacturer's server of the terminal device provided in the embodiment of the present application;

[0032] Figure 5 It is a flowchart of an implementation method for adapting to multiple terminal devices provided in another embodiment of the present application. DETAILED DESCRIPTION

[0033] The technical solution of the present application will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.

[0034] In the description of the present application, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present application. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.

[0035] In the description of this application, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, it can also be the internal connection of two components, it can be a wireless connection, or it can be a wired connection. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0036] In addition, the technical features involved in the different embodiments of the present application described below can be combined with each other as long as they do not conflict with each other.

[0037] In order to illustrate the technical solution of the present application, a specific embodiment is provided below for illustration.

[0038] Attached Figure 1 1 is a schematic diagram of the implementation flow of the method for adapting multiple terminal devices provided in an embodiment of the present application, which mainly includes the following steps S101 to S104, which are described in detail below:

[0039] Step S101: when starting an application to interact with a terminal device D among multiple terminal devices, determining whether the front-end code of the terminal device D stored locally is the latest front-end code.

[0040] In the embodiments of the present application, the application refers to an application installed on the control terminal and capable of interacting with the terminal device, and the terminal device may be a device provided by various device manufacturers, for example, an industrial robot provided by a robot manufacturer, etc. The local refers to the control terminal where the application is located, for example, a smart phone or an industrial computer, etc. The terminal device D is any one of a plurality of terminal devices.

[0041] It should be noted that in the embodiment of the present application, the local control terminal or the control terminal where the application is located stores front-end codes provided by various manufacturers and used to control their respective terminal devices. These front-end codes are downloaded by the application from the background server in advance or stored in the control terminal through other means. Figure 1 In the example method, the front-end codes of various terminal devices are developed by various manufacturers in accordance with the front-end code development specifications and uploaded to the background server through the front-end code upload interface provided to the various manufacturers, wherein the front-end code development specifications output to the various manufacturers include the user interface (UI) style of the front-end code and the interface information of the interface between the front-end code and the native layer (native) code of the mobile application, etc. These interface information include parameter type, interface name, etc. The reason for outputting the front-end code development specifications to various manufacturers is that, on the one hand, the interface between the front-end code of the terminal devices of each manufacturer and the native layer code of the mobile application must be unified, otherwise, it will result in the consequence of being unable to communicate. On the other hand, after the interface between the front-end code of the terminal devices of each manufacturer and the native layer code of the mobile application is unified, the workload of the mobile application developers to adapt the native layer code of the mobile application to the front-end code of the terminal devices of different manufacturers is eliminated. After developing the latest front-end code for the terminal device in accordance with the front-end code development specifications, each manufacturer can upload the latest front-end code for its terminal device to a background server that can communicate with the control terminal by calling the front-end code upload interface open to them. The background server can save the latest front-end code for each terminal device according to the mapping relationship between the latest front-end code identifier and the latest front-end code.

[0042] As an embodiment of the present application, determining whether the front-end code of the terminal device D stored locally is the latest front-end code can be: through the interface provided by the background of the control terminal to which the application belongs, the identifier of the latest front-end code of the terminal device D is passed; if the identifier of the front-end code of the terminal device D stored locally is the same as the identifier of the latest front-end code of the terminal device D, then the front-end code of the terminal device D stored locally is determined to be the latest front-end code, otherwise, the front-end code of the terminal device D stored locally is determined not to be the latest front-end code. Specifically, the application of the control terminal sends a front-end code resource acquisition request to the background server through the interface provided by the background server; as a response to the request, the background server returns the identifier of the latest front-end code of the terminal device D to the application, including information such as the name, version number (usually a release timestamp) and storage address; since the front-end code and identifier of the terminal device D are also stored locally before, the identifier of the latest front-end code of the terminal device D returned by the background server can be compared with the identifier of the front-end code of the terminal device D stored locally. If the two are the same, it indicates that the front-end code of the terminal device D stored locally is the latest front-end code, otherwise, the front-end code of the terminal device D stored locally is not the latest front-end code.

[0043] Since the control terminal to which the application belongs uses the front-end code download interface opened by the background server to download the latest front-end code of the terminal device D in the background, these front-end codes are all transmitted from the manufacturer's server of the terminal device. Once the manufacturer's server of the terminal device is invaded, it is likely that the latest front-end code of the terminal device D transmitted from the manufacturer's server will be unsafe. Therefore, in the embodiment of the present application, the background server also receives the verification mark of the latest front-end code of the terminal device D from the manufacturer's server of the terminal device D; accordingly, the control terminal to which the application belongs receives the verification mark of the latest front-end code of the terminal device D, and performs a security verification on the latest front-end code of the terminal device D according to the verification mark of the latest front-end code of the terminal device D. Specifically, the manufacturer server writes the latest front-end code of the terminal device D into file f, and writes the verification mark of the latest front-end code into file f to generate a file header self-signature; generates a corresponding description file based on file f; encrypts the description file using a preset private key to generate a signature file corresponding to the description file; and compresses and packages file f, the description file, and the signature file, and asymmetrically encrypts the compressed package using the private key; the manufacturer server transmits the verification mark of the latest front-end code of the terminal device D to the background server, and the control terminal to which the application belongs receives the verification mark of the latest front-end code of the terminal device D, and can perform a security verification on the latest front-end code of the terminal device D based on the verification mark of the latest front-end code of the terminal device D.

[0044] Step S102: If the front-end code of the terminal device D stored locally is not the latest front-end code, the latest front-end code of the terminal device D is downloaded in the background through the front-end code download interface opened by the background server.

[0045] As mentioned above, the background server opens a front-end code upload interface to the manufacturer or the manufacturer's terminal device for uploading its latest front-end code. In addition, the background server also opens a front-end code download interface to the application or the control terminal. Therefore, after determining that the front-end code of the terminal device D stored locally is not the latest front-end code, the application or the control terminal where the application is located can download the latest front-end code of the terminal device D in the background through the front-end code download interface opened by the background server. Figure 4 It is a communication connection diagram among the manufacturer terminal device 401, the control terminal 402, the backend server 403 and the manufacturer server 404 of the terminal device involved in the embodiment of the present application. The manufacturer server 404 of the terminal device uploads the latest front-end code of the manufacturer terminal device 401 to the backend server 403 through the front-end code upload interface opened by the backend server 403, and the control terminal 401 loads the latest front-end code of the manufacturer terminal device 401 uploaded by the manufacturer server 404 of the terminal device saved locally or downloaded from the backend server 403, loads the latest front-end code of the terminal device 401 and displays the corresponding page of the latest front-end code, and then interacts with the manufacturer terminal device 401.

[0046] It should be noted that, whether the manufacturer's terminal device uploads its latest front-end code through the front-end code upload interface, or the application downloads the latest front-end code of the terminal device D through the front-end code download interface, since they are all performed automatically in the background through the program, the application user will not perceive these actions, so the user experience is better.

[0047] Step S103: Load the latest front-end code of the terminal device D and display the page corresponding to the latest front-end code.

[0048] In order to speed up the loading of pages and further enhance the user experience, in an embodiment of the present application, loading the latest front-end code of the terminal device D and displaying the corresponding page of the latest front-end code can be: when loading the latest front-end code of the terminal device D, identify whether there are loading blocking resources in the page loading process; if there are loading blocking resources, then based on the strategy of alleviating resource loading blocking, output the corresponding page of the latest front-end code. The so-called loading blocking resources refer to those resources that block or delay the loading progress of the page during the page loading process, such as some large-capacity pictures. The general method of identifying whether there are loading blocking resources in the page loading process is to monitor the page loading progress. If the time from the start of loading to the completion of loading of the page resource is greater than a certain threshold, then the page resource is determined to be a loading blocking resource, or if the time for the page resource to wait for loading is greater than a certain threshold, then the page resource can also be determined to be a loading blocking resource, and so on.

[0049] As an embodiment of the present application, based on the strategy of reducing resource loading congestion, the latest front-end code corresponding page of the output terminal device D can be: if the loading blocking resource is a picture resource, the picture resource is replaced with a specified picture and then the latest front-end code corresponding page of the output terminal device D is output, wherein the size of the specified picture is smaller than the size of the picture resource or the size of the specified picture is smaller than the size of the picture resource, and the specified picture contains prompt information for prompting the user whether to continue waiting for loading; if the loading blocking resource is a non-picture resource, the loading-related information of the loading blocking resource is used, and the latest front-end code corresponding page of the output terminal device D is output after the blocking resource is loaded. In the above embodiment, since the size of the designated image is smaller than the size of the image resource that exists as a loading blocking resource, when there is a loading blocking resource in the page loading process, the designated image is used to replace the image resource loading, and the designated image can be quickly loaded and displayed to improve the user experience. When the loading blocking resource is a non-image resource, the loading associated information of the loading blocking resource includes the Uniform Resource Locator (URL) and type of the loading blocking resource, which can be stored in association with the URL of the loading blocking resource. The loading associated information of the loading blocking resource can also include the URL of the Cascading Style Sheets (CSS) and JavaScript information of the loading blocking resource and the resource type information indicating whether the loading blocking resource is JavaScript or CSS. Since the page parser will stop parsing after encountering these loading blocking resources until the loading of the loading blocking resources is completed, after the loading blocking resource is loaded using the loading associated information of the loading blocking resource, the above loading associated information can be pre-loaded before the page is parsed to the loading blocking resource, thereby improving the page display speed.

[0050] As another embodiment of the present application, based on the strategy of alleviating resource loading congestion, outputting the latest front-end code corresponding page of terminal device D may be: using parallel processing to parse the JavaScript file and cascading style sheet file of the latest front-end code corresponding page of terminal device D; based on the results of parsing the JavaScript file and cascading style sheet file, outputting the latest front-end code corresponding page of terminal device D, wherein the cascading style sheet file is compiled from the style information of the latest front-end code corresponding page. The above-mentioned use of parallel processing to parse the JavaScript file and cascading style sheet file of the latest front-end code corresponding page of terminal device D may be to use the main thread to process the JavaScript file, and use other threads outside the main thread to process the cascading style sheet file. Specifically, the main thread parses the template object and the script object from the JavaScript file to obtain an instance of the view template, and uses other threads outside the main thread to parse the style object from the cascading style sheet file, and the style object is stored in the control terminal through registration for subsequent use in rendering the page. Since the file of the page corresponding to the latest front-end code of terminal device D is divided into two parts, JavaScript file and cascading style sheet file, it can be processed in parallel during loading, and the JavaScript file and cascading style sheet file can be parsed at the same time. At the same time, the file size of the JavaScript file is greatly reduced, thereby improving the loading speed of the page corresponding to the latest front-end code of terminal device D.

[0051] As another embodiment of the present application, based on the strategy of alleviating resource loading congestion, the latest front-end code corresponding page of the output terminal device D can be: if the latest front-end code corresponding page of the terminal device D is a page in which the page architecture code and the business data code are separated, then the page architecture is rendered according to the page architecture data and then a portion of the latest front-end code corresponding page of the terminal device D is re-rendered, and the latest front-end code corresponding page of the terminal device D is output. Specifically, the page architecture of the latest front-end code corresponding page of the terminal device D can be rendered according to the page architecture data. If the business data has been received when the page architecture of the latest front-end code corresponding page of the terminal device D is rendered, then the page architecture of the latest front-end code corresponding page of the terminal device D is partially re-rendered according to the received business data.

[0052] Step S104: interacting with the terminal device D in response to the user's operation on the page corresponding to the latest front-end code.

[0053] Specifically, step S104 can be implemented by transmitting the control instructions corresponding to the user's operations on the page corresponding to the latest front-end code to the native layer code through the interface between the latest front-end code of the terminal device D and the native layer code of the application, and implementing the actions corresponding to the control instructions to the terminal device D through the interface between the native layer code and the terminal device D.

[0054] From the above attached Figure 1 It can be seen from the example method of adapting to multiple terminal devices that, unlike the prior art in which the type of manufacturer's terminal device changes or a new manufacturer's terminal device appears, it is time-consuming and laborious to upgrade the mobile application of the control terminal, the technical solution of the present application is to save the front-end code used to control its respective terminal device in the control terminal, and only when the front-end code of a terminal device saved locally is not the latest front-end code, download the latest front-end code of the terminal device from the background server for display. Since the latest front-end code of the terminal device is loaded locally or downloaded locally and then loaded, the application of the control terminal does not need to be changed to achieve the adaptation of the application of the control terminal to multiple terminal devices, eliminating the various inconveniences caused by upgrading the application, thereby reducing the various costs of developing the application of the control terminal.

[0055] In order to further illustrate the technical solution of this application, Figure 5 A flow chart of a method for adapting to multiple terminal devices is provided, which mainly includes steps S501 to S510, as described below:

[0056] Step S501: The identifier of the latest front-end code of the terminal device D is transmitted through the interface provided by the background of the control terminal to which the application belongs.

[0057] Step S502: Determine whether the identifier of the front-end code of the terminal device D stored locally is the same as the identifier of the latest front-end code of the terminal device D?

[0058] If they are the same, the process goes to step S503; otherwise, the process goes to step S504.

[0059] Step S503: Determine whether the front-end code of the terminal device D stored locally is the latest front-end code.

[0060] After determining that the front-end code of the terminal device D stored locally is the latest front-end code, the process goes to step S506.

[0061] Step S504: Determine that the front-end code of the terminal device D stored locally is not the latest front-end code.

[0062] After determining that the front-end code of the terminal device D stored locally is not the latest front-end code, the process goes to step S505.

[0063] Step S505: Download the latest front-end code of the terminal device D in the background through the front-end code download interface opened by the background server.

[0064] To ensure security, step S505 may also include step S5051 and step S5052, wherein step S5051: receiving the verification identifier of the latest front-end code of terminal device D; step S5052: performing security verification on the latest front-end code of terminal device D based on the verification identifier of the latest front-end code of terminal device D.

[0065] Step S506: Identify whether there are any loading blocking resources during the page loading process?

[0066] If there are loading blocking resources, the process goes to step S507, otherwise, it goes to step S510.

[0067] Step S507: Determine whether the loading blocking resource is a picture resource?

[0068] If the loading blocking resource is a picture resource, the process goes to step S508, otherwise, it goes to step S509.

[0069] Step S508: Replace the image resource with the specified image.

[0070] Here, the size of the designated image is smaller than the size of the image resource, or the size of the designated image is smaller than the size of the image resource and the designated image includes prompt information for prompting the user whether to continue waiting for loading.

[0071] Step S509: Use the load-related information of the load-blocking resource to load the load-blocking resource.

[0072] Step S510: Output the page corresponding to the latest front-end code.

[0073] Please refer to the attached Figure 2 , is a schematic diagram of the structure of a device adapted to multiple terminal devices provided in an embodiment of the present application. For the convenience of description, only the parts related to the present application are shown. Figure 2 The exemplary apparatus for adapting to multiple terminal devices mainly includes a determination module 201, a download module 202, a page display module 203 and an interaction module 204, which are described in detail as follows:

[0074] The determination module 201 is used to determine whether the front-end code of the terminal device D stored locally is the latest front-end code when starting the application to interact with the terminal device D among the multiple terminal devices;

[0075] The download module 202 is used to download the latest front-end code of the terminal device D in the background through the front-end code download interface opened by the background server if the front-end code of the terminal device D stored locally is not the latest front-end code;

[0076] The page display module 203 is used to load the latest front-end code of the terminal device D and display the page corresponding to the latest front-end code of the terminal device D;

[0077] The interaction module 204 is used to interact with the terminal device D in response to the user's operation on the page corresponding to the latest front-end code of the terminal device D.

[0078] It should be noted that the device adapted to a variety of terminal devices provided in the embodiment of the present application is based on the same concept as the method embodiment of the present application, and the technical effect it brings is the same as the method embodiment of the present application. The specific content can be found in the description in the method embodiment of the present application, and will not be repeated here.

[0079] In an optional embodiment, Figure 2 The front-end codes of the various terminal devices in the example are developed by various manufacturers according to the front-end code development specifications and uploaded to the background server through the front-end code upload interface provided to the various manufacturers.

[0080] In an optional embodiment, the above-mentioned determination module 201 is specifically used to pass the identifier of the latest front-end code of the terminal device D through the interface provided by the background of the control terminal to which the application belongs. If the identifier of the front-end code of the terminal device D stored locally is the same as the identifier of the latest front-end code of the terminal device D, it is determined that the front-end code of the terminal device D stored locally is the latest front-end code; otherwise, it is determined that the front-end code of the terminal device D stored locally is not the latest front-end code.

[0081] In an optional embodiment, Figure 2 The example backend server also receives the verification mark of the latest front-end code of the terminal device D from the manufacturer server of the terminal device D. Accordingly, Figure 2 The example apparatus also includes:

[0082] An identification receiving module, used to receive a verification identification of the latest front-end code of the terminal device D;

[0083] The verification module is used to perform security verification on the latest front-end code of the terminal device D according to the verification identifier of the latest front-end code of the terminal device D.

[0084] In an optional embodiment, the above-mentioned page display module 203 is specifically used to identify whether there are loading blocking resources during the page loading process when loading the latest front-end code of the terminal device D. If there are loading blocking resources, based on the strategy of reducing resource loading blocking, the latest front-end code corresponding to the terminal device D is output.

[0085] In an optional embodiment, the above-mentioned strategy based on alleviating resource loading congestion, the latest front-end code corresponding page of the output terminal device D can be: if the loading blocking resource is a picture resource, then the picture resource is replaced with a specified picture and the latest front-end code corresponding page is output; if the loading blocking resource is a non-picture resource, then the loading blocking resource is loaded using the loading associated information of the loading blocking resource and then the latest front-end code corresponding page of the terminal device D is output, wherein the size of the specified picture is smaller than the size of the picture resource, or the size of the specified picture is smaller than the size of the picture resource and the specified picture includes prompt information for prompting the user whether to continue waiting for loading.

[0086] In an optional embodiment, the above-mentioned strategy based on alleviating resource loading congestion can output the latest front-end code corresponding page of terminal device D by: parsing the JavaScript file and cascading style sheet file of the latest front-end code corresponding page of terminal device D in a parallel processing manner, and based on the results of parsing the JavaScript file and cascading style sheet file of the latest front-end code corresponding page, output the latest front-end code corresponding page of terminal device D.

[0087] In an optional embodiment, the above-mentioned strategy based on alleviating resource loading congestion can output the latest front-end code corresponding page of terminal device D as follows: if the latest front-end code corresponding page of terminal device D is a page in which the page architecture code and the business data code are separated, then after rendering the page architecture according to the page architecture data, a part of the latest front-end code corresponding page of terminal device D is re-rendered, and the latest front-end code corresponding page of terminal device D is output.

[0088] Figure 3 Schematic diagram of the structure of a control terminal provided by an embodiment of the present application. Figure 3 As shown, the control terminal 3 of this embodiment mainly includes: a processor 30, a memory 31, and a computer program 32 stored in the memory 31 and executable on the processor 30, such as a program for a method of adapting to multiple terminal devices. When the processor 30 executes the computer program 32, the steps in the above-mentioned method of adapting to multiple terminal devices are implemented. Alternatively, when the processor 30 executes the computer program 32, the functions of each module / unit in the above-mentioned system embodiments are implemented, such as Figure 2 The functions of the determination module 201, the download module 202, the page display module 203 and the interaction module 204 are shown.

[0089] Exemplarily, the computer program 32 of the method for adapting to multiple terminal devices mainly includes: when starting an application to interact with a terminal device D among multiple terminal devices, determining whether the front-end code of the terminal device D stored locally is the latest front-end code; if the front-end code of the terminal device D stored locally is not the latest front-end code, downloading the latest front-end code of the terminal device D in the background through the front-end code download interface opened by the background server; loading the latest front-end code of the terminal device D and displaying the page corresponding to the latest front-end code; interacting with the terminal device D in response to the user's operation on the page corresponding to the latest front-end code. The computer program 32 can be divided into one or more modules / units, one or more modules / units are stored in the memory 31, and are executed by the processor 30 to complete the present application. One or more modules / units can be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program 32 in the control terminal 3. For example, the computer program 32 can be divided into the functions of a determination module 201, a download module 202, a page display module 203 and an interaction module 204 (modules in the virtual device), and the specific functions of each module are as follows: the determination module 201 is used to determine whether the locally stored front-end code of the terminal device D is the latest front-end code when starting an application to interact with a terminal device D among multiple terminal devices; the download module 202 is used to download the latest front-end code of the terminal device D in the background through the front-end code download interface opened by the background server if the locally stored front-end code of the terminal device D is not the latest front-end code; the page display module 203 is used to load the latest front-end code of the terminal device D and display the corresponding page of the latest front-end code of the terminal device D; the interaction module 204 is used to interact with the terminal device D in response to the user's operation on the corresponding page of the latest front-end code of the terminal device D.

[0090] The control terminal 3 may include but is not limited to a processor 30 and a memory 31. Those skilled in the art will appreciate that Figure 3 It is only an example of the control terminal 3 and does not constitute a limitation on the control terminal 3. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the control terminal may also include input and output devices, network access devices, buses, etc.

[0091] The processor 30 may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0092] The memory 31 may be an internal storage unit of the control terminal 3, such as a hard disk or memory of the control terminal 3. The memory 31 may also be an external storage device of the control terminal 3, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the control terminal 3. Further, the memory 31 may also include both an internal storage unit of the control terminal 3 and an external storage device. The memory 31 is used to store computer programs and other programs and data required by the control terminal. The memory 31 may also be used to temporarily store data that has been output or is to be output.

[0093] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0094] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0095] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0096] In the embodiments provided in the present application, it should be understood that the disclosed device / control terminal and method can be implemented in other ways. For example, the device / control terminal embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0097] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0098] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0099] If the integrated module / unit is implemented in the form of 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 present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program of the method for adapting multiple terminal devices can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of each of the above-mentioned method embodiments can be implemented, that is, when the application is started to interact with the terminal device D among the multiple terminal devices, it is determined whether the front-end code of the terminal device D stored locally is the latest front-end code; if the front-end code of the terminal device D stored locally is not the latest front-end code, the latest front-end code of the terminal device D is downloaded in the background through the front-end code download interface opened by the background server; the latest front-end code of the terminal device D is loaded and the corresponding page of the latest front-end code is displayed; in response to the user's operation on the corresponding page of the latest front-end code, the terminal device D is interacted with. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. Computer-readable media may include: any entity or device capable of carrying computer program code, recording media, USB flash drives, mobile hard disks, magnetic disks, optical disks, computer memories, read-only memories (ROM), random access memories (RAM), electric carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals. The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application is described in detail with reference to the aforementioned embodiments, ordinary technicians in this field should understand that they can still modify the technical solutions recorded in the aforementioned embodiments, or replace some of the technical features therein by equivalent; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.

Claims

1. A method for adapting to multiple terminal devices, characterized in that: The method comprises: When the application is started to interact with any terminal device D among the multiple terminal devices, the identifier of the latest front-end code of the terminal device D is transmitted through the interface provided by the background of the control terminal to which the application belongs; Determine whether the front-end code of the terminal device D stored locally is the latest front-end code; If the identifier of the front-end code of the terminal device D stored locally is the same as the identifier of the latest front-end code of the terminal device D, it is determined that the front-end code of the terminal device D stored locally is the latest front-end code; otherwise, it is determined that the front-end code of the terminal device D stored locally is not the latest front-end code; If the front-end code of the terminal device D stored locally is not the latest front-end code, the latest front-end code of the terminal device D is downloaded in the background through the front-end code download interface opened by the background server; Load the latest front-end code of the terminal device D and display the corresponding page of the latest front-end code; In response to the user's operation on the corresponding page of the latest front-end code, interaction is performed with the terminal device D.

2. The method for adapting multiple terminal devices as claimed in claim 1, characterized in that: The front-end codes of the various terminal devices are developed by various manufacturers according to the front-end code development specifications and uploaded to the back-end server through the front-end code upload interface provided to the various manufacturers.

3. The method for adapting multiple terminal devices as claimed in claim 2, characterized in that: The backend server also receives a verification mark of the latest front-end code of the terminal device D from the manufacturer server of the terminal device D, and the method further includes: Receive the verification mark of the latest front-end code of the terminal device D; According to the verification mark of the latest front-end code of the terminal device D, the latest front-end code of the terminal device D is subjected to security verification.

4. The method for adapting multiple terminal devices according to any one of claims 1 to 3, characterized in that: The loading of the latest front-end code of the terminal device D and displaying the page corresponding to the latest front-end code includes: When loading the latest front-end code of the terminal device D, identifying whether there are loading blocking resources during the page loading process; If the loading blocking resource exists, the page corresponding to the latest front-end code is output based on the strategy of alleviating resource loading blocking.

5. The method for adapting multiple terminal devices as claimed in claim 4, characterized in that: The strategy based on alleviating resource loading blockage outputs the page corresponding to the latest front-end code, including: If the loading blocking resource is a picture resource, the picture resource is replaced with a specified picture and then the page corresponding to the latest front-end code is output, the size of the specified picture is smaller than the size of the picture resource, or the size of the specified picture is smaller than the size of the picture resource and the specified picture includes prompt information for prompting the user whether to continue waiting for loading; If the loading-blocking resource is a non-image resource, the loading-related information of the loading-blocking resource is used to load the loading-blocking resource and then the page corresponding to the latest front-end code is output.

6. The method for adapting to multiple terminal devices as claimed in claim 4, characterized in that: The strategy based on alleviating resource loading blockage outputs the page corresponding to the latest front-end code, including: The JavaScript file and the cascading style sheet file of the page corresponding to the latest front-end code are parsed in a parallel processing manner; Based on the results of parsing the JavaScript file and the cascading style sheet file, the page corresponding to the latest front-end code is output.

7. The method for adapting to multiple terminal devices as claimed in claim 4, characterized in that: The strategy based on alleviating resource loading blockage outputs the page corresponding to the latest front-end code, including: If the page corresponding to the latest front-end code is a page in which the page architecture code and the business data code are separated, then after rendering the page architecture according to the page architecture data, a portion of the page corresponding to the latest front-end code is re-rendered to output the page corresponding to the latest front-end code.

8. A device adapted to multiple terminal devices, characterized in that: The device comprises: A determination module, used for, when starting an application to interact with a terminal device D among multiple terminal devices, passing in the identifier of the latest front-end code of the terminal device D through an interface provided by the background of the control terminal to which the application belongs, and determining whether the front-end code of the terminal device D stored locally is the latest front-end code; If the identifier of the front-end code of the terminal device D stored locally is the same as the identifier of the latest front-end code of the terminal device D, it is determined that the front-end code of the terminal device D stored locally is the latest front-end code; otherwise, it is determined that the front-end code of the terminal device D stored locally is not the latest front-end code; Among them: the front-end codes provided by various manufacturers and used to control their respective terminal devices are stored locally; A download module, used for downloading the latest front-end code of the terminal device D in the background through the front-end code download interface opened by the background server if the front-end code of the terminal device D stored locally is not the latest front-end code; A page display module, used to load the latest front-end code of the terminal device D and display the page corresponding to the latest front-end code; The interaction module is used to interact with the terminal device D in response to the user's operation on the page corresponding to the latest front-end code.

9. A control terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Application program opening method, apparatus, computer device and storage medium

    CN109408139A

  • System customization method and device, electronic device and storage medium

    CN109542427A