CN111857782B - Interface updating method and device, computer equipment and storage medium - Google Patents

Interface updating method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN111857782B
CN111857782B CN202010731494.6A CN202010731494A CN111857782B CN 111857782 B CN111857782 B CN 111857782B CN 202010731494 A CN202010731494 A CN 202010731494A CN 111857782 B CN111857782 B CN 111857782B
Authority
CN
China
Prior art keywords
user interface
application program
updating
page layout
updated
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010731494.6A
Other languages
Chinese (zh)
Other versions
CN111857782A (en
Inventor
孙文韬
范世强
丁汉飞
王尔康
吕文钊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qichacha Technology Co ltd
Original Assignee
Qichacha Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qichacha Technology Co ltd filed Critical Qichacha Technology Co ltd
Priority to CN202010731494.6A priority Critical patent/CN111857782B/en
Publication of CN111857782A publication Critical patent/CN111857782A/en
Application granted granted Critical
Publication of CN111857782B publication Critical patent/CN111857782B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

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

Abstract

The application relates to an interface updating method, an interface updating device, computer equipment and a storage medium. The method comprises the steps of responding to a starting instruction of an application program, obtaining an update data model of a user interface of the application program, which is issued by a server connected with the application program, adopting JSCore-based singlecase type analysis to update the page layout file of the user interface when the opening instruction of the user interface is detected, obtaining rendering data updated to the user interface, rendering the user interface by adopting the rendering data, and generating and opening the updated user interface, so that the dynamic update of the user interface in the application program on the iOS terminal is realized, a new version of the application program does not need to be developed and released, the development workload is saved, and the rendering efficiency is greatly improved.

Description

Interface updating method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of internet technologies, and in particular, to an interface updating method and apparatus, a computer device, and a storage medium.
Background
The method comprises the steps that an APP (Application program) on an intelligent terminal generally uses a programming language to carry out Application development to form an installation file, and after the intelligent terminal downloads the installation file through a server, a client is installed and operated on the intelligent terminal to display each user interface of the APP. Since the APP generally uses Native codes (i.e., Native codes, such as iOS (apple mobile device operating System) codes or Android (open source mobile phone operating System) codes) to write a user interface, the user interface of the APP needs to be modified with the change of the APP application scene, so that the APP application program needs to be developed again, and the user is guided to install a new version APP on the intelligent terminal to update the client by releasing the new version APP. Because the development of the APP application program needs to be carried out again when the user interface of the APP is updated every time, the development workload of the APP application program is greatly increased for the continuously changing external environment.
Based on this, many attempts are made in the conventional technology to dynamically update APP, such as pure native development heating update by JSPatch, hybrid development by Html5, and the like. The JSPatch is an iOS dynamic updating frame, any Objective-C/Swift native interface can be called by JavaScript (JS script) only by introducing a tiny engine into a project to obtain a script language, a module is dynamically added to the project, or a project native code is replaced to dynamically repair a bug, but the JSPatch is forbidden by an iOS platform and cannot pass the audit of the iOS platform. And Html5 has high network requirements, resulting in lower update efficiency than native development. Therefore, the traditional technology cannot meet the requirement of effectively updating the user interface on the terminal.
Disclosure of Invention
In view of the above, it is necessary to provide an interface updating method, an apparatus, a computer device and a storage medium capable of effectively updating a user interface, aiming at the technical problem that the above conventional technology cannot satisfy the requirement of effectively updating the user interface.
A method of interface updating, the method comprising:
responding to a starting instruction of the application program, and acquiring a page layout file for updating a user interface of the application program;
when an opening instruction of the user interface is detected, adopting single-case type analysis to update a page layout file of the user interface, and acquiring rendering data for updating the user interface;
and rendering the user interface by adopting the rendering data, and generating and opening the updated user interface.
In one embodiment, obtaining a page layout file for updating a user interface of an application includes: acquiring an updated data model corresponding to the application program; and extracting a page layout file of the user interface needing to be updated in the application program from the updated data model, wherein the page layout file comprises corresponding control layout and corresponding attributes.
In one embodiment, obtaining an updated data model corresponding to an application includes: when a starting instruction of an application program is received, sending an updating data model acquisition request to a server, wherein the updating data model acquisition request is used for indicating the server to return a corresponding updating data model; and receiving a page layout file which is returned by the server and is customized for each user interface in the native user interface system of the application program by adopting the JS language.
In one embodiment, acquiring rendering data for updating a user interface by using a page layout file for updating the user interface by singleton class parsing includes: adopting a single case class based on JSCore to carry out syntax analysis on the page layout file, and obtaining the corresponding control layout and corresponding attributes in the page layout file; and generating rendering data for updating the user interface according to the corresponding control layout and the corresponding attributes in the page layout file.
In one embodiment, obtaining an updated data model corresponding to an application includes: and when a starting instruction of the application program is received, acquiring an updated data model corresponding to the application program from a local storage space.
In one embodiment, the method further includes: receiving an updated data model of an application program issued by a server, wherein the updated data model is issued by the server in the running process of the application program; and saving the updated data model of the application program in a local storage space.
In one embodiment, the opening instruction for the user interface is sent when the application opens the user interface in a routing mode.
An interface updating apparatus comprising: the device comprises an acquisition module, an analysis module and an update module, wherein:
the acquisition module is used for responding to a starting instruction of the application program and acquiring a page layout file for updating a user interface of the application program;
the analysis module is used for adopting single-case analysis to update the page layout file of the user interface and acquiring rendering data for updating the user interface when an opening instruction for the user interface is detected;
and the updating module is used for rendering the user interface by adopting the rendering data, and generating and opening the updated user interface.
A computer device comprising a memory storing a computer program and a processor implementing the steps of the method as described above when executing the computer program.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method as set forth above.
According to the interface updating method, the device, the computer equipment and the storage medium, the updating data model for updating the user interface of the application program is obtained by responding to the starting instruction of the application program, when the opening instruction of the user interface is detected, the page layout file for updating the user interface is analyzed by adopting a single instance type, the rendering data for updating the user interface is obtained, the user interface is rendered by adopting the rendering data, and the updated user interface is generated and opened, so that the dynamic updating of the user interface in the application program on the iOS terminal is realized, the application program of a new version does not need to be developed and released, the development workload is saved, and the rendering efficiency is greatly improved.
Drawings
FIG. 1 is a diagram of an application environment of an interface update method in one embodiment;
FIG. 2 is a flowchart illustrating an interface update method according to an embodiment;
FIG. 3 is a flowchart illustrating the steps of obtaining an updated data model in one embodiment;
FIG. 4 is a flowchart illustrating the steps of parsing a page layout file in one embodiment;
FIG. 5 is an interaction diagram illustrating an interface update method according to an embodiment;
FIG. 6 is a block diagram showing the structure of an interface update apparatus according to an embodiment;
FIG. 7 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The interface updating method provided by the application can be applied to the application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. Specifically, the terminal 102 has various clients for providing applications for users, and the server 104 is a background server corresponding to the clients. Since the user interface of the client on the terminal 102 needs to be updated frequently, the development workload is large because the user interface is updated in a manner of developing and releasing a new version in the conventional technology. Based on the method, whether a starting instruction for the application program exists or not is detected through the terminal, and when the starting instruction for the application program is detected, the starting instruction is responded, and a page layout file for updating a user interface of the application program is obtained; when an opening instruction of the user interface is detected, analyzing a page layout file updated to the user interface by adopting a single instance class, and acquiring rendering data updated to the user interface; and rendering the user interface by adopting the rendering data, and generating and opening the updated user interface, thereby realizing the dynamic update of the user interface in the application program on the terminal.
In this embodiment, the terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and specifically, the terminal 102 may have an iOS (apple mobile device operating System), and the server 104 may be implemented by an independent server or a server cluster composed of a plurality of servers.
In an embodiment, as shown in fig. 2, an interface updating method is provided, which is described by taking the method as an example applied to the terminal in fig. 1, and includes the following steps:
step 202, in response to the start instruction of the application program, acquiring a page layout file for updating the user interface of the application program.
The starting instruction is an instruction or a command for instructing the terminal to start the application program. The User Interface (UI) is an integral design for man-machine interaction, operation logic and Interface beauty of an application program, and is also a medium for interaction and information exchange between the application program and a User, and realizes conversion between an internal form of information and a human acceptable form. The user interface is a bridge between the user and the hardware for interactive communication, and aims to enable the user to conveniently and efficiently operate the hardware to achieve bidirectional interaction and complete the work expected to be completed by the hardware. The page layout file for updating the user interface of the application program refers to a data structure required for updating the user interface, and may include, for example, a control layout and corresponding attributes of a new interface after the user interface is updated. In this embodiment, when the terminal detects a start instruction for an application program, the terminal responds to the start instruction and obtains a page layout file for updating a user interface of the application program, so as to dynamically update the user interface through subsequent steps.
Step 204, when an opening instruction of the user interface is detected, adopting single-instance analysis to update the page layout file of the user interface, and acquiring rendering data for updating the user interface.
The opening instruction is an instruction or a command for instructing the terminal to open the user interface in the application program. Specifically, the opening instruction of the user interface may be sent when the application opens the user interface in a route (router) manner. A singleton class refers to a created unique object with management functions within an application. In particular, a class is a user-defined type of reference data, also called class type, each class containing a description of the data and a set of functions that manipulate the data or pass the message, and instances of the class are called objects. An object is an abstraction of an objective thing, and a class is an abstraction of an object. Briefly, an object is an instance of a class, a class is a template of an object, and a singleton class refers to the only object within an application that has administrative functionality. Rendering data is background data required to update the user interface. In this embodiment, when the terminal detects an opening instruction for the user interface, the page layout file updated for the user interface is analyzed by a single instance, where the analyzing process includes, but is not limited to, performing syntax analysis on the page layout file, so as to obtain a control layout and corresponding attributes in the page layout file, and establish a corresponding data structure based on the control layout and corresponding attributes, so as to form rendering data for updating the user interface.
And step 206, rendering the user interface by adopting the rendering data, and generating and opening the updated user interface.
Specifically, the position, the style and the like of each control in the user interface are calculated by adopting the rendering data, the user interface is rendered according to the calculation result, so that a rendered new user interface is generated, and the updated user interface is opened in response to an opening instruction of the user interface, so that the user interface in an application program on the terminal is dynamically updated.
According to the interface updating method, the page layout file for updating the user interface of the application program is obtained by responding to the starting instruction of the application program, when the opening instruction of the user interface is detected, the page layout file for updating the user interface is analyzed by adopting a single instance type, the rendering data for updating the user interface is obtained, the rendering data is used for rendering the user interface, and the updated user interface is generated and opened, so that the dynamic updating of the user interface in the application program on the terminal is realized when the application program is started, the application program of a new version does not need to be developed and released, the development workload is saved, and the rendering efficiency is greatly improved.
In an embodiment, after the user interface is updated by using the method, when the terminal detects the opening instruction of the user interface again, the updated user interface is directly opened. It can be understood that after the user interface is updated and before the next update, each time the terminal detects an opening instruction for the user interface, the updated user interface is directly opened, so that the user interface does not need to be rendered repeatedly, and the speed of loading the user interface is increased.
In one embodiment, the obtaining of the page layout file for updating the user interface of the application program specifically includes: acquiring an updated data model corresponding to the application program; and extracting the page layout file of the user interface needing to be updated in the application program from the updated data model. The updated data model refers to a data structure required by the application program to be updated, and includes a page layout file of each user interface in the updated application program, and the page layout file includes a corresponding control layout and corresponding attributes. In this embodiment, by obtaining the update data model corresponding to the application program and extracting the page layout file of the user interface that needs to be updated in the application program from the update data model, dynamic update of the user interface in the application program on the terminal is facilitated.
In one embodiment, as shown in FIG. 3, obtaining an updated data model corresponding to an application includes:
step 302, when receiving a start instruction for an application program, sending an update data model acquisition request to a server.
Wherein the update data model acquisition request is a request for acquiring an update data model for updating a user interface in the application from the server. Specifically, when the user interface in the application program needs to be updated, the server can customize the required class and corresponding attributes of the user interface on the basis of the native development of the application program. For example, on the basis of a user interface of native development, a control is customized to be a class of JavaScript statements of "ImageView", and the control has the properties of length, width, round corners, pictures and the like. And the class of the control element 'ImageView' is exposed to a JavaScript terminal through a protocol, so that the JavaScript terminal can directly call the class, and further adopts the JavaScript to write UI logic of the user interface, namely a self-defined page layout file, thereby generating an updated data model for updating the user interface in the application program. Therefore, when the terminal receives a starting instruction of the application program, an acquisition request of the updated data model is sent to the server so as to instruct the server to return the corresponding updated data model.
And step 304, receiving a page layout file which is returned by the server and is customized for the user interface in the native user interface system by adopting the JS language.
The user-defined page layout file comprises corresponding control layout and corresponding attributes. Specifically, the terminal receives a page layout file which is returned by the server and is customized to each user interface in the original user interface system of the application program by adopting the JS language, so that the dynamic update of the user interface in the application program is realized.
In an embodiment, as shown in fig. 4, acquiring rendering data for updating a user interface by adopting singleton-class parsing to update a page layout file of the user interface includes:
step 402, adopting single-case class based on JSCore to perform syntax analysis on the page layout file, and obtaining the corresponding control layout and corresponding attributes in the page layout file.
The singleton class refers to only one object with management function in the application program. In this embodiment, when the terminal detects an open instruction for the user interface, a page layout file updated for the user interface may be parsed by a single instance based on JSCore (JS core), where the parsing process includes, but is not limited to, parsing the page layout file, so as to obtain a control layout and corresponding attributes in the page layout file.
Step 404, generating rendering data for updating the user interface according to the corresponding control layout and the corresponding attributes in the page layout file.
The rendering data is background data required for updating the user interface. In this embodiment, a corresponding data structure is established according to the corresponding control layout and the corresponding attributes in the page layout file to generate rendering data for updating the user interface, and then the rendering data is used to render the user interface, so as to dynamically update the user interface in the application program.
In an embodiment, obtaining the updated data model corresponding to the application program may specifically include: and when a starting instruction of the application program is received, acquiring an updated data model corresponding to the application program from a local storage space. The updated data model may be sent to the terminal by the server in the last operation process of the application program. It can be understood that, in general, when an application is in a running state, the application is in a connected state with a corresponding server. If the developer configures the update data model for the application program through the server, the server may issue the update data model for the application program to the corresponding terminal based on the connection state with the application program. At this time, the application program is in a running state, so that the terminal does not immediately update the application program, but stores the update data model of the application program in the local storage space, and acquires the update data model corresponding to the application program from the local storage space when a start instruction of the application program is subsequently received, so as to update the application program. Therefore, the dependence on the network in the updating process is greatly reduced, and the updating speed and reliability are improved.
Furthermore, the local storage space can be a local cache space, so that the running memory of the terminal is not occupied. And the terminal can also delete the updated data model in the cache space after acquiring the updated data model corresponding to the application program from the local cache space and updating the application program, thereby avoiding unnecessary repeated updating of the terminal.
In an embodiment, as shown in fig. 5, the following further describes the interface updating method of the present application by taking an iOS terminal as an example through a specific interaction embodiment, including the following steps:
step 501, a server obtains classes created by a developer on the basis of native development of an application program.
Specifically, when the user interface in the application needs to be updated, the required class of the user interface can be customized on the basis of the native development of the application, and the class can be a class based on a javascript statement and has corresponding attributes. For example, if the created class is "ImageView," it may have attributes of length, width, rounded corners, pictures, and so on.
Step 502, the server exposes the created class to the JavaScript end through the JSExport protocol provided by JSCore.
For example, the server may expose the above class ImageView to the JavaScript end through a protocol, so that the JavaScript end can directly call the class, where example codes are as follows:
var imageView=ImageView.initWithFrame(0,0,100,100)
imageView.imageUrl=“https:xxxx.xxxx.xxxpicAddress=12345”
in step 503, the server obtains the UI logic of the user interface required for the developer to write using JavaScript.
Specifically, the UI logic of the user interface may be an example describing the user interface through the above-mentioned classes, i.e., a page layout file describing the user interface.
The UI logic example code of the user interface is as follows:
Figure BDA0002603340170000091
the above example code shows that a view is created in the user interface, and a label of "hello world" and a picture are displayed on the view.
In step 504, the server generates an update data model for updating the user interface according to the written UI logic of the user interface.
In step 505, the iOS terminal receives a start instruction of the application program from the user.
In step 506, the iOS terminal sends an update data model acquisition request to the server.
In step 507, the iOS terminal receives the updated data model returned by the server.
The updated data model may specifically be UI logic example code of the user interface.
And step 508, when the iOS terminal detects an opening instruction of the user interface, adopting a single-case type analysis updating data model based on JSCore to update the page layout file updated to the user interface, and acquiring rendering data updated to the user interface.
The JSCore-based single instance class is adopted to analyze the UI logic example code of the user interface, a page configuration method in JavaScript is called, and corresponding page rendering data of the originally developed user interface are obtained. After the method is called, a self-defined View object, namely backsgroudView in the above example code, can be obtained in a native environment.
In step 509, the iOS terminal renders the user interface with the rendering data to generate an updated user interface.
Specifically, the page rendering data is used to call the corresponding native UI class, and various UI data such as font size, font color, frame and the like are given to the corresponding control. According to the code, when an ImageView class is defined, an object of the class can be reflected to a native control UIImageView, so that the object can be reflected to a corresponding UIView object after a user-defined view object is obtained.
For example, native UIView view ═ UIView new;
view.width=backgroundView.width;
view.height=backgroundView.height;
return view;
background View is the page rendering data whose properties are directly assigned to the reflected controls as above.
Step 510, the iOS terminal opens the updated user interface in response to the opening instruction of the user interface.
When the user interface in the application program needs to be updated, the class and the corresponding attribute of the required user interface are defined by the server on the basis of the original development of the application program, then the user interface UI logic is compiled by calling the defined class by JavaScript, the starting instruction of the application program is received at the iOS terminal, the updated data model of the user interface of the application program, which is transmitted by the server connected with the application program, is obtained, when the opening instruction of the user interface is detected, the page layout file updated to the user interface is analyzed by adopting a single-case class based on JSCore, the rendering data updated to the user interface is obtained, the user interface is rendered by adopting the rendering data, the updated user interface is generated and opened, thereby realizing the dynamic update of the user interface in the application program on the iOS terminal when the application program is started, and the development and the release of a new version of application program are not needed, so that the development workload is saved, the dependence on the network in the updating process is reduced, and the reliability of the rendering efficiency is greatly improved.
It should be understood that although the various steps in the flow charts of fig. 1-5 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 1-5 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps.
In one embodiment, as shown in fig. 6, there is provided an interface updating apparatus including: an obtaining module 601, an analyzing module 602, and an updating module 603, wherein:
an obtaining module 601, configured to obtain a page layout file for updating a user interface of an application program in response to a start instruction of the application program;
the parsing module 602 is configured to, when an opening instruction for the user interface is detected, parse a page layout file that updates the user interface by using a singleton class to obtain rendering data for updating the user interface;
the updating module 603 is configured to render the user interface with the rendering data, and generate and open an updated user interface.
In one embodiment, the obtaining module 601 specifically includes: an update data model acquisition unit configured to acquire an update data model corresponding to the application program; and the page layout file acquisition unit is used for extracting a page layout file of the user interface needing to be updated in the application program from the updated data model, and the page layout file comprises the corresponding control layout and the corresponding attributes.
In an embodiment, the update data model obtaining unit is specifically configured to: when a starting instruction of an application program is received, sending an updating data model acquisition request to a server, wherein the updating data model acquisition request is used for indicating the server to return a corresponding updating data model; and receiving a page layout file which is returned by the server and is customized for each user interface in the native user interface system of the application program by adopting the JS language.
In one embodiment, the parsing module is specifically configured to: adopting a single case class based on JSCore to carry out syntax analysis on the page layout file, and obtaining the corresponding control layout and corresponding attributes in the page layout file; and generating rendering data for updating the user interface according to the corresponding control layout and the corresponding attributes in the page layout file.
In an embodiment, the update data model obtaining unit is specifically configured to: and when a starting instruction of the application program is received, acquiring an updated data model corresponding to the application program from a local storage space.
In an embodiment, the obtaining module 601 further includes a receiving unit, configured to receive an updated data model of the application program issued by the server, where the updated data model is issued by the server in an application program running process; and saving the updated data model of the application program in a local storage space. In one embodiment, the opening instruction for the user interface is sent when the application opens the user interface in a routing mode.
For the specific definition of the interface updating device, reference may be made to the above definition of the interface updating method, which is not described herein again. The various modules in the above-described interface update apparatus may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 7. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement an interface update method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 7 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
responding to a starting instruction of the application program, and acquiring a page layout file for updating a user interface of the application program;
when an opening instruction of the user interface is detected, adopting single-case type analysis to update a page layout file of the user interface, and acquiring rendering data for updating the user interface;
and rendering the user interface by adopting the rendering data, and generating and opening the updated user interface.
In one embodiment, the processor, when executing the computer program, further performs the steps of: acquiring an updated data model corresponding to the application program; and extracting a page layout file of the user interface needing to be updated in the application program from the updated data model, wherein the page layout file comprises corresponding control layout and corresponding attributes.
In one embodiment, the processor, when executing the computer program, further performs the steps of: when a starting instruction of an application program is received, sending an updating data model acquisition request to a server, wherein the updating data model acquisition request is used for indicating the server to return a corresponding updating data model; and receiving a page layout file which is returned by the server and is customized for each user interface in the native user interface system of the application program by adopting the JS language, wherein the customized page layout file comprises corresponding control layout and corresponding attributes.
In one embodiment, the processor, when executing the computer program, further performs the steps of: adopting a single case class based on JSCore to carry out syntax analysis on the page layout file, and obtaining the corresponding control layout and corresponding attributes in the page layout file; and generating rendering data for updating the user interface according to the corresponding control layout and the corresponding attributes in the page layout file.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and when a starting instruction of the application program is received, acquiring an updated data model corresponding to the application program from a local storage space.
In one embodiment, the processor, when executing the computer program, further performs the steps of: receiving an updated data model of an application program issued by a server, wherein the updated data model is issued by the server in the running process of the application program; and saving the updated data model of the application program in a local storage space.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
responding to a starting instruction of the application program, and acquiring a page layout file for updating a user interface of the application program;
when an opening instruction of the user interface is detected, adopting single-case type analysis to update a page layout file of the user interface, and acquiring rendering data for updating the user interface;
and rendering the user interface by adopting the rendering data, and generating and opening the updated user interface.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring an updated data model corresponding to the application program; and extracting a page layout file of the user interface needing to be updated in the application program from the updated data model, wherein the page layout file comprises corresponding control layout and corresponding attributes.
In one embodiment, the computer program when executed by the processor further performs the steps of: when a starting instruction of an application program is received, sending an updating data model acquisition request to a server, wherein the updating data model acquisition request is used for indicating the server to return a corresponding updating data model; and receiving a page layout file which is returned by the server and is customized for each user interface in the native user interface system of the application program by adopting the JS language, wherein the customized page layout file comprises corresponding control layout and corresponding attributes.
In one embodiment, the computer program when executed by the processor further performs the steps of: adopting a single case class based on JSCore to carry out syntax analysis on the page layout file, and obtaining the corresponding control layout and corresponding attributes in the page layout file; and generating rendering data for updating the user interface according to the corresponding control layout and the corresponding attributes in the page layout file.
In one embodiment, the computer program when executed by the processor further performs the steps of: and when a starting instruction of the application program is received, acquiring an updated data model corresponding to the application program from a local storage space.
In one embodiment, the processor, when executing the computer program, further performs the steps of: receiving an updated data model of an application program issued by a server, wherein the updated data model is issued by the server in the running process of the application program; and saving the updated data model of the application program in a local storage space.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. An interface updating method is applied to an iOS terminal, and comprises the following steps:
when a starting instruction of an application program is detected, responding to the starting instruction of the application program, and acquiring a page layout file for updating a user interface of the application program, wherein the page layout file is generated by exposing the created class to a JavaScript terminal through a JSEXport protocol provided by JSCore on the basis of the acquired class created by a developer on the basis of the original development of the application program by the server and further writing the UI logic of the required user interface by using the JavaScript on the basis of the developer;
when an opening instruction of the user interface is detected, adopting single-case type analysis to update the page layout file of the user interface, and acquiring rendering data updated for the user interface;
rendering the user interface by adopting the rendering data, and generating and opening an updated user interface;
the acquiring of the page layout file for updating the user interface of the application program includes:
acquiring an update data model corresponding to the application program, wherein the update data model is a data structure required by the application program and comprises a page layout file of each user interface in the updated application program; extracting a page layout file of a user interface needing to be updated in the application program from the updated data model, wherein the page layout file comprises corresponding control layout and corresponding attributes;
the acquiring of the updated data model corresponding to the application program includes: when a starting instruction of the application program is received, sending an updating data model acquisition request to a server, wherein the updating data model acquisition request is used for indicating the server to return an updating data model corresponding to the application program; receiving an updated data model corresponding to the application program, which is returned by the server, wherein the updated data model is a user-defined page layout file for each user interface in a primary user interface system of the application program by adopting a JS language, and the user-defined page layout file comprises corresponding control layout and corresponding attributes;
the acquiring rendering data for updating the user interface by adopting the page layout file for updating the user interface by adopting the singleton class analysis comprises the following steps: adopting a single case class based on JSCore to carry out syntax analysis on the page layout file to obtain the corresponding control layout and corresponding attributes in the page layout file, wherein the analysis process comprises the syntax analysis on the page layout file; and establishing a corresponding data structure according to the corresponding control layout and the corresponding attributes in the page layout file, and generating rendering data for updating the user interface.
2. The interface updating method according to claim 1, wherein the obtaining of the updated data model corresponding to the application program comprises:
and when a starting instruction of the application program is received, acquiring an updated data model corresponding to the application program from a local storage space.
3. The interface updating method according to claim 2, further comprising:
receiving an updated data model of the application program issued by a server, wherein the updated data model is issued by the server in the running process of the application program;
and saving the updated data model of the application program in a local storage space.
4. The interface updating method according to claim 2, wherein the local storage space is a local cache space.
5. The interface updating method according to claim 1, wherein after the rendering of the user interface using the rendering data and the generation and opening of the updated user interface, the method further comprises:
and when the opening instruction of the user interface is detected again, directly opening the updated user interface.
6. The interface updating method according to any one of claims 1 to 5, wherein the opening instruction for the user interface is sent when the application opens the user interface by routing.
7. An interface updating apparatus, wherein the apparatus is applied to an iOS terminal, the apparatus comprising:
the acquisition module is used for responding to a starting instruction of an application program when the starting instruction of the application program is detected, and acquiring a page layout file for updating a user interface of the application program, wherein the page layout file is created by a server on the basis of the acquired developer on the basis of the original development of the application program, and is generated by exposing the created class to a JavaScript terminal through a JSEexport protocol provided by JSCore and further writing the UI logic of the required user interface by using JavaScript on the basis of the developer;
the analysis module is used for adopting single-case analysis to update the page layout file of the user interface and acquiring rendering data updated to the user interface when an opening instruction of the user interface is detected;
the updating module is used for rendering the user interface by adopting the rendering data, and generating and opening an updated user interface;
the acquisition module is specifically configured to: acquiring an update data model corresponding to the application program, wherein the update data model is a data structure required by the application program and comprises a page layout file of each user interface in the updated application program; extracting a page layout file of a user interface needing to be updated in the application program from the updated data model, wherein the page layout file comprises corresponding control layout and corresponding attributes;
the obtaining module is specifically further configured to: when a starting instruction of the application program is received, sending an updating data model acquisition request to a server, wherein the updating data model acquisition request is used for indicating the server to return an updating data model corresponding to the application program; receiving an updated data model corresponding to the application program, which is returned by the server, wherein the updated data model is a user-defined page layout file for each user interface in a primary user interface system of the application program by adopting a JS language, and the user-defined page layout file comprises corresponding control layout and corresponding attributes;
the analysis module is specifically configured to: adopting a single case class based on JSCore to carry out syntax analysis on the page layout file to obtain the corresponding control layout and corresponding attributes in the page layout file, wherein the analysis process comprises the syntax analysis on the page layout file; and establishing a corresponding data structure according to the corresponding control layout and the corresponding attributes in the page layout file, and generating rendering data for updating the user interface.
8. The interface updating apparatus according to claim 7, wherein the obtaining module is further configured to:
and when a starting instruction of the application program is received, acquiring an updated data model corresponding to the application program from a local storage space.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 6.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
CN202010731494.6A 2020-07-27 2020-07-27 Interface updating method and device, computer equipment and storage medium Active CN111857782B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010731494.6A CN111857782B (en) 2020-07-27 2020-07-27 Interface updating method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010731494.6A CN111857782B (en) 2020-07-27 2020-07-27 Interface updating method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111857782A CN111857782A (en) 2020-10-30
CN111857782B true CN111857782B (en) 2021-11-16

Family

ID=72947684

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010731494.6A Active CN111857782B (en) 2020-07-27 2020-07-27 Interface updating method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111857782B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112988155B (en) * 2021-05-17 2021-08-31 成都数联铭品科技有限公司 Method for driving interface change of multiple software systems based on data model

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1758794A (en) * 2005-02-07 2006-04-12 中国联合通信有限公司 Method and system for generating interface of mobile terminal
CN106293765A (en) * 2016-08-23 2017-01-04 乐视控股(北京)有限公司 A kind of layout updates method and device
CN106815055A (en) * 2017-02-15 2017-06-09 深圳创维-Rgb电子有限公司 The method and system of Mobile solution Dynamic Distribution
CN106936871A (en) * 2015-12-30 2017-07-07 阿里巴巴集团控股有限公司 The method and device of showing interface data
CN108804177A (en) * 2018-05-23 2018-11-13 北京五八信息技术有限公司 Update method, apparatus, computer equipment and the storage medium of interface view
CN109408086A (en) * 2018-09-28 2019-03-01 平安普惠企业管理有限公司 Interface updating method, device, computer equipment and the storage medium of APP

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108140089B (en) * 2015-10-19 2021-05-07 日本电信电话株式会社 Analysis device, analysis method, and recording medium
CN107391171B (en) * 2017-06-14 2020-06-09 广东网金控股股份有限公司 Method for solving iOS thermal repair problem and user terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1758794A (en) * 2005-02-07 2006-04-12 中国联合通信有限公司 Method and system for generating interface of mobile terminal
CN106936871A (en) * 2015-12-30 2017-07-07 阿里巴巴集团控股有限公司 The method and device of showing interface data
CN106293765A (en) * 2016-08-23 2017-01-04 乐视控股(北京)有限公司 A kind of layout updates method and device
CN106815055A (en) * 2017-02-15 2017-06-09 深圳创维-Rgb电子有限公司 The method and system of Mobile solution Dynamic Distribution
CN108804177A (en) * 2018-05-23 2018-11-13 北京五八信息技术有限公司 Update method, apparatus, computer equipment and the storage medium of interface view
CN109408086A (en) * 2018-09-28 2019-03-01 平安普惠企业管理有限公司 Interface updating method, device, computer equipment and the storage medium of APP

Also Published As

Publication number Publication date
CN111857782A (en) 2020-10-30

Similar Documents

Publication Publication Date Title
US11119812B2 (en) Method and device for processing application program page according to a common interface container
US20210216700A1 (en) Information Processing Method and System
US10831567B2 (en) Application processing method and apparatus
WO2021218327A1 (en) Page processing method and related device
US10740114B2 (en) Component invoking method and apparatus, and component data processing method and apparatus
CN109901834B (en) Document page generation method, device, computer equipment and storage medium
WO2018077085A1 (en) Application processing method, device and storage medium
CN109814854B (en) Project framework generation method, device, computer equipment and storage medium
CN111045655A (en) Page rendering method and device, rendering server and storage medium
CN108021583B (en) Page loading method and client
CN105518633A (en) Web server system, application development assistance system, multilingual support method in web server system, multi-device support method in web server system, and application development assistance method
CN111176629A (en) Application development method and device
US20110128291A1 (en) Program generation device, program generation method, and computer-readable storage medium
CN114996619A (en) Page display method and device, computer equipment and storage medium
CN111596911A (en) Method and device for generating control, computer equipment and storage medium
WO2023082654A1 (en) Method, apparatus and device for generating service interaction diagram, and storage medium
CN113391808A (en) Page configuration method and device and electronic equipment
CN112650487A (en) Hybrid application development method, system, computer device and storage medium
CN110865863B (en) Interface display method and device for fast application and storage medium
CN114020194A (en) Display data modification method and device, computer equipment and medium
CN112506854A (en) Method, device, equipment and medium for storing page template file and generating page
CN111857782B (en) Interface updating method and device, computer equipment and storage medium
CN112860247B (en) Custom generation method, device, equipment and medium of model component
CN111158777B (en) Component calling method, device and computer readable storage medium
CN117093316A (en) Cross-platform page rendering system, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Room 503, 5 / F, C1 building, 88 Dongchang Road, Suzhou Industrial Park, 215000, Jiangsu Province

Applicant after: Qicha Technology Co.,Ltd.

Address before: Room 503, 5 / F, C1 building, 88 Dongchang Road, Suzhou Industrial Park, Suzhou, Jiangsu 210000

Applicant before: SUZHOU LANGDONG NET TEC Co.,Ltd.

GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: No. 8 Huizhi Street, Suzhou Industrial Park, Suzhou Area, China (Jiangsu) Pilot Free Trade Zone, Suzhou City, Jiangsu Province, 215000

Patentee after: Qichacha Technology Co.,Ltd.

Address before: Room 503, 5 / F, C1 building, 88 Dongchang Road, Suzhou Industrial Park, 215000, Jiangsu Province

Patentee before: Qicha Technology Co.,Ltd.