CN109040182B - Service access method and device, electronic equipment and storage medium - Google Patents
Service access method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN109040182B CN109040182B CN201810673379.0A CN201810673379A CN109040182B CN 109040182 B CN109040182 B CN 109040182B CN 201810673379 A CN201810673379 A CN 201810673379A CN 109040182 B CN109040182 B CN 109040182B
- Authority
- CN
- China
- Prior art keywords
- service
- script file
- server
- interface
- user
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/51—Discovery or management thereof, e.g. service location protocol [SLP] or web services
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention relates to the technical field of computers, in particular to a service access method and device, electronic equipment and a storage medium, wherein the method comprises the steps that a terminal acquires a script file corresponding to a service according to a service triggering instruction input by a user through a current page; interpreting and rendering the obtained script file to generate an interface corresponding to the service; and will the interface show to the current page, so that the user passes through the interface visit the service, so, when the user needs to visit a certain service, the terminal can show the interface of the service through the script file of the service, provide the service for the user, do not need the user to download the APP corresponding to the service, also do not need to reload new page, directly show the interface of the service in the current page, the service distribution is more efficient and direct, and can be applied to the APP of any terminal, the portability and the compatibility are better.
Description
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a service access method and apparatus, an electronic device, and a storage medium.
Background
Generally, when a user needs to access a certain service, the user needs to download a corresponding Application (APP) first, and then use the service through the APP, which requires the user to download different APPs, not only is it troublesome, but also the occupied space is large, and with the rapid development and the commercialization competition of mobile internet applications, how to make the user access the required service more quickly and conveniently becomes a trend that needs to be considered by internet service providers.
In the prior art, there is a service access method without downloading APP, which is mainly a wechat applet, and a user can open an application by scanning or searching without downloading and installing the applet. The applet is based on world wide WEB (WEB) specifications, a set of frames built by Hypertext Transfer Protocol (HTML), Cascading Style Sheets (CSS), java scripts (JavaScript, JS) and the like are adopted, User Interface (UI) views and logic processing of the applet are realized by a plurality of WEB views (webview), when the applet is loaded, a new page needs to be loaded, and the plurality of webview are switched back and forth.
However, in the implementation method in the prior art, the applet adopts a set of self-defined language and an operation framework, is embedded into the wechat client for use, depends on the wechat client, has learning cost, is not easy to transplant, and has poor compatibility, and the applet needs to have a starting entry, i.e., needs to reload a new page, which can reduce the user experience and reduce the efficiency of direct service.
Disclosure of Invention
Embodiments of the present invention provide a service access method and apparatus, an electronic device, and a storage medium, so as to solve the problems of poor portability and compatibility and low efficiency in direct service access in the prior art.
The embodiment of the invention provides the following specific technical scheme:
one embodiment of the present invention provides a service access method, including:
the terminal acquires a script file corresponding to the service according to a service triggering instruction input by a user through a current page;
interpreting and rendering the obtained script file to generate an interface corresponding to the service; and displaying the interface on the current page so that the user can access the service through the interface.
With reference to an embodiment of the present invention, acquiring a script file corresponding to the service specifically includes:
judging whether a script file corresponding to the service is stored locally;
if not, sending a request for pulling the script file to a server, receiving the script file sent by the server according to the request for pulling the script file, and storing the script file to the local corresponding to the service name, wherein: the server stores a service name and a corresponding script file, the pull script file request comprises the service name, and the server searches the corresponding script file according to the service name;
and if yes, directly acquiring the locally stored script file.
In combination with an embodiment of the present invention, the service name and the script file that are stored in the server correspondingly are uploaded to the server through the management terminal.
In connection with an embodiment of the present invention, the script file includes at least a version number;
after directly acquiring the locally stored script file, further comprising: and sending the version number of the script file to the server so that the server judges whether the version number of the script file sent by the terminal is the same as the version number of the script file in the server or not, if not, sending the script file corresponding to the version number in the server to the terminal, and if so, sending a confirmation message of correct version to the terminal.
In connection with one embodiment of the invention, further comprising:
receiving a preset service name and a script file corresponding to the preset service name which are sent by the server when the server determines that the terminal is started; and correspondingly storing the service name and the script file to the local.
In connection with one embodiment of the invention, further comprising:
receiving a service access request sent by a user aiming at the interface, and sending the service access request to the server;
and receiving a service result returned by the server according to the service access request.
Another embodiment of the present invention provides a service access apparatus, including:
the acquisition module is used for acquiring a script file corresponding to the service according to a service triggering instruction input by a user through a current page;
the generating module is used for explaining and rendering the acquired script file and generating an interface corresponding to the service;
and the display module is used for displaying the interface on the current page so that a user can access the service through the interface.
In combination with another embodiment of the present invention, the script file corresponding to the service is acquired, and the acquiring module is specifically configured to:
judging whether a script file corresponding to the service is stored locally;
if not, sending a request for pulling the script file to the server, receiving the script file sent by the server according to the request for pulling the script file, and storing the script file to the local corresponding to the service name, wherein: the server stores a service name and a corresponding script file, the pull script file request comprises the service name, and the server searches the corresponding script file according to the service name;
and if yes, directly acquiring the locally stored script file.
In combination with another embodiment of the present invention, the service name and the script file stored in the server are uploaded to the server through the management terminal.
In combination with another embodiment of the present invention, the script file at least includes a version number;
after directly acquiring the locally stored script file, further comprising:
the first sending module is used for sending the version number of the script file to the server so that the server judges whether the version number of the script file sent by the device is the same as the version number of the script file in the server or not, if not, the first sending module sends the script file corresponding to the version number in the server to the device, and if so, the first sending module sends a confirmation message of correct version to the device.
In combination with another embodiment of the present invention, further comprising:
the first receiving module is used for receiving a preset service name and a script file corresponding to the preset service name which are sent by the server when the device is determined to be started; and the storage module is used for correspondingly storing the service name and the script file to the local.
In combination with another embodiment of the present invention, further comprising:
the second receiving module is used for receiving a service access request sent by a user aiming at the interface;
a second sending module, configured to send the service access request to the server;
and the third receiving module is used for receiving the service result returned by the server according to the service access request.
An electronic device, comprising:
at least one memory for storing program instructions;
at least one processor, for calling the program instruction stored in the memory, and executing any one of the above service access methods according to the obtained program instruction.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of any of the above-mentioned service access methods.
In the embodiment of the invention, a terminal acquires a script file corresponding to a service according to a service triggering instruction input by a user through a current page; interpreting and rendering the obtained script file to generate an interface corresponding to the service; and will the interface demonstrates to on the current page, so that the user passes through the interface visit the service, like this, when the user needs to visit a certain service, the terminal can be through obtaining script file, explain and render, directly demonstrate the interface after rendering on the current page, the user just can visit this service, do not need the user to download the APP that this service corresponds, the download of low frequency APP has been reduced, the memory space at terminal has been practiced thrift, and directly demonstrate the interface in the current page, need not reload new page, direct distribution service, the efficiency of service is through higher, user experience has been promoted, script file development is realized simply, do not rely on a certain concrete APP, the script file of a plurality of different services can be applied to the APP at any terminal, portability and compatibility are better.
Drawings
FIG. 1 is a schematic diagram of an application architecture of a service access method according to an embodiment of the present invention;
fig. 2 is a flowchart of a service access method provided in an embodiment of the present invention;
fig. 3 is a flowchart of uploading and issuing a script file provided in the embodiment of the present invention;
FIG. 4 is a flow chart of another service access method provided in an embodiment of the present invention;
FIG. 5 is a flow chart of a method for a user to access a service in an embodiment of the present invention;
FIG. 6 is a diagram illustrating an effect of a service interface on a current page of a terminal according to an embodiment of the present invention;
FIG. 7 is a diagram illustrating a service access device according to an embodiment of the present invention;
FIG. 8 is a schematic structural diagram of an electronic device according to an embodiment of the invention;
fig. 9 is a schematic diagram of a terminal structure in an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
To facilitate an understanding of the embodiments of the present invention, a few concepts are briefly introduced below:
script language: also known as a build language, or dynamic language, is a programming language used to control software applications, scripts are typically saved as script files, and are only interpreted or compiled when called. The scripting language is an interpretive language, such as java script (JavaScript, JS), action scripting language (ActionScript), and the like, and unlike c \ c + + and the like, which can be compiled into binary codes and exist in the form of executable files, the scripting language does not need to be compiled, can be directly used, and is interpreted by an interpreter, and the mobile terminal can analyze and execute the corresponding scripting language by accessing the interpreter.
Script files: a file written by a scripting language, the scripting file being a text file.
Direct service: generally, a user uses various services on a smart device, such as a mobile phone, through various Applications (APPs) as media, such as an APP that needs a browser to search information; knowing the weather, a weather APP is needed; to order take-out, a take-out APP is needed, that is, before a user wants to enjoy various services, the user must download the corresponding APP first, and the service direct is a way that the user can directly use the background service without downloading and installing the APP.
Fig. 1 is a schematic diagram of an application architecture of a service access method according to an embodiment of the present invention, which at least includes a terminal, a server, and a management end.
The terminal can be any intelligent device such as a smart phone, a tablet computer, a portable personal computer and a smart television, and a user can use required services through the terminal.
The Management terminal may be a Management terminal, a Content Management System (CMS) Management terminal, or the like, and the developer may upload a script file written in advance to the server through the Management terminal.
The terminal and the server, and the management terminal and the server are connected through the Internet to realize mutual communication.
The server may provide various network services for the terminal, and for different terminals or applications on the terminal, and services on the terminal, the server may be considered as a background server providing corresponding network services.
The server may be one server, a server cluster formed by a plurality of servers, or a cloud computing center.
In order to solve the problems of poor portability and compatibility and low efficiency of direct service access in the prior art, the embodiment of the invention provides a service access method, wherein a terminal acquires a script file corresponding to a service according to a service triggering instruction input by a user through a current page; interpreting and rendering the obtained script file to generate an interface corresponding to the service; the interface is displayed on the current page, so that a user can access the service through the interface, when the user needs to access and use a certain service, the terminal is triggered to interpret and render the script file of the service, the rendered interface is displayed on the current page, the interface for the user to access the service is provided, the user does not need to download and install the APP corresponding to the service, the memory space of the terminal is saved, the distance between the user and the service is shortened, the service is more convenient, the interface is directly displayed in the current page, a new page does not need to be reloaded, the service is directly distributed, the service direct efficiency is higher, the user experience is improved, in addition, the corresponding service direct effect can be realized through the script file, the development and the realization are simple, the interface is not dependent on a certain APP, the interface can be applied to the APP of any terminal, namely, the interface can be suitable for different APPs under different operating systems, for example, the apple Operating System (ios), android (android), or the mobile Phone Operating System (Windows Phone) can be applied, and the portability and compatibility are better.
The script file is used for realizing a User Interface (UI) and a service logic of the service, that is, the script file at least comprises Interface description information and service logic information of the service, so that the Interface of the service can be drawn through interpretation and rendering of the script file, and the service logic of the service can be realized.
The script file is written in advance and uploaded to the server through the management terminal, for example, developers can use script language to design and write corresponding script files for different services and upload the script files to the server terminal.
And after receiving the script file corresponding to the service, the server performs corresponding storage, that is, the server stores the service name and the corresponding script file.
Further, in order to improve the efficiency of direct service, when the terminal acquires the script file corresponding to the service, a possible implementation mode is provided, and whether the script file corresponding to the service is stored locally is judged; if the service name is not determined, sending a request for pulling the script file to the server, receiving the script file sent by the server according to the request for pulling the script file, and storing the script file to the local corresponding to the service name; if yes, directly acquiring a locally stored script file; the script file pulling request comprises a service name, and the server searches the corresponding script file according to the service name.
That is to say, the terminal can have two ways of acquiring the script file, if the terminal does not locally exist, the terminal can be pulled from the server, if the terminal stores the corresponding script file, the terminal does not need to acquire the script file from the server, and the script file is directly acquired from the local, so that network interaction is reduced, time is saved, and efficiency is improved.
Optionally, the internet described above uses standard communication techniques and/or protocols. The internet is typically the internet, but can be any Network including, but not limited to, a Local Area Network (LAN), a Metropolitan Area Network (MAN), a Wide Area Network (WAN), any combination of mobile, wireline or wireless networks, private or virtual private networks. In some embodiments, data exchanged over a network is represented using techniques and/or formats including Hypertext Mark-up Language (HTML), Extensible Markup Language (XML), and the like. All or some of the links may also be encrypted using conventional encryption techniques such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPsec). In other embodiments, custom and/or dedicated data communication techniques may also be used in place of, or in addition to, the data communication techniques described above.
It should be noted that the application architecture diagram in the embodiment of the present invention is used to more clearly illustrate the technical solution in the embodiment of the present invention, and does not limit the technical solution provided in the embodiment of the present invention, and for other application architectures and business applications, the technical solution provided in the embodiment of the present invention is also applicable to similar problems, and as long as a mode that a user can directly use a service through a scripting language is implemented, the method belongs to the protection scope of the present invention.
In the embodiments of the present invention, the service access method is schematically illustrated by using the application architecture diagram shown in fig. 1 as an example. It should be noted that the service access method in the embodiment of the present invention may be applied to any APP on the terminal, that is, the user may access a plurality of other different services through a certain APP, for example, may access a weather service through WeChat.
Referring to fig. 2, a flowchart of a service access method according to an embodiment of the present invention is shown, where the method includes:
step 200: and the terminal acquires a script file corresponding to the service according to a service triggering instruction input by the user through the current page.
When step 200 is executed, the method may include:
firstly, receiving a service triggering instruction input by a user through a current page.
Specifically, when searching for a service, the user may, for example, input a service search instruction, and may consider that the terminal receives a service trigger instruction.
For example, the user inputs "take away" in a search box in the terminal and clicks on the search, i.e., the terminal is triggered to obtain a script file corresponding to the "take away" service.
And then, acquiring a script file corresponding to the service according to a service triggering instruction input by the user through the current page.
Specifically, the method comprises the following steps: judging whether a script file corresponding to the service is stored locally; if the service name is determined to be present, directly acquiring a locally stored script file; wherein: the server stores the service name and the corresponding script file, the pull script file request comprises the service name, and the server searches the corresponding script file according to the service name.
That is to say, the way of the terminal acquiring the script file may be directly acquired from the local or pulled from the server, and the two ways are introduced respectively:
1) and pulling from the server side.
And the server receives the script files corresponding to the services uploaded by the developers through the management terminal and stores the script files correspondingly.
When receiving a request for pulling the script file sent by the terminal, the server searches the script file corresponding to the service name according to the service name in the request for pulling the script file, and returns the script file to the terminal.
The service name and the script file which are correspondingly stored in the server are uploaded to the server through the management terminal, and the script file at least comprises interface description information and business logic information of the service.
2) Directly from the local.
At this time, the terminal locally stores the script file corresponding to the service, wherein the script file stored in the terminal locally is also received from the server, and the terminal stores the received script file after receiving the script file sent by the server.
Further, the embodiment of the present invention also provides several situations when the terminal acquires the script file from the server, which specifically include:
in the first case: and receiving a preset service name and a script file corresponding to the preset service name which are sent by the server when the terminal is determined to be started.
The preset service name and the corresponding script file may be set according to actual conditions, for example, the service usage frequency may be counted by a background, and for some services with higher usage frequency, the service may be actively issued to the terminal in advance.
That is to say, the script file can be actively issued by the server when the terminal is started, so that the terminal can directly obtain the script file of the service from the local when the user uses the service, and the terminal is more convenient and faster.
In the second case: and receiving the script file sent by the server according to the pull script file request, and storing the script file to the local corresponding to the service name.
That is, the script file may be pulled from the server only when the user needs to use the service, so that the memory space of the terminal may be reduced, and the script file may be stored after the terminal is pulled once, and then when the user needs to access the service again, the script file corresponding to the service is already stored locally in the terminal, and the script file does not need to be pulled from the server.
In the embodiment of the invention, when the terminal acquires the script file, the judgment is carried out, if the script file of the service is stored in the terminal, the terminal does not need to pull from the server, so that the network interaction and transmission are reduced, the time is saved, the efficiency is improved, and if the script file of the service is not stored in the terminal, the terminal pulls from the server, so that the use of the service by a user is not influenced.
Moreover, the service access method in the embodiment of the present invention may be applied to any APP on the terminal, that is, it is also necessary to access other services through a certain APP, and therefore, a service that can be provided by a certain APP on the terminal and a script file corresponding to the service may also be preset, for example, a user searches for "rented house", but a rented house may correspond to a plurality of APPs, at this time, if the user searches for "rented house" in the WeChat, and a "free" script file corresponds to a rented house preset in the WeChat, then a corresponding "free" script file is acquired by the terminal.
Step 210: and interpreting and rendering the acquired script file to generate an interface corresponding to the service.
Specifically, a script engine corresponding to the script file is integrated in the terminal, the script engine is used for explaining and rendering the script file, and the explaining and rendering are performed according to the interface description information and the service logic description information in the script file to form an interface.
Therefore, according to the script file, the content information, the functions and the like included on the corresponding interface can be analyzed, and the rendering is further performed to form the interface.
Step 220: an interface is exposed to the current page to enable the user to access the service through the interface.
In the embodiment of the invention, the interface of the service can be added into the current page as a part of the current page, and the service can be realized without entering a loading page, namely without reloading a new page, so that the service direct efficiency is improved, the efficiency is more efficient and direct, and a user can access the service through the interface to obtain a required service result.
Further, in order to ensure the validity and reliability of the user accessing the service, the embodiment of the present invention further provides a script file updating method, and after directly obtaining the locally stored script file, the method further includes: sending the version number of the script file to a server so that the server judges whether the version number of the script file sent by the terminal is the same as the version number of the script file in the server or not, if not, sending the script file corresponding to the version number in the server to the terminal, and if so, sending a confirmation message of correct version to the terminal; wherein the script file at least comprises a version number.
Thus, adding version number in script file to realize version control, because script file in server can be updated continuously, script file stored locally in terminal can be old version, when user needs to use the service, terminal judges that the corresponding script file is stored locally, not directly used, but first sends version number to server, server judges whether it is old version, if server determines that version number uploaded by terminal is different from version number of script file in itself, script file in terminal can be considered as old version, at this time, script file corresponding to version number in server needs to be sent to terminal again, then terminal can explain and render according to script file corresponding to version number in server, and display interface, and can replace original script file stored locally, and updating the script file in the terminal is realized.
Furthermore, after the terminal displays the interface, the user can access the service through the interface, a possible implementation manner is provided in the embodiment of the invention, and the service access request sent by the user aiming at the interface is received and sent to the server; and receiving a service result returned by the server according to the service access request. Therefore, the user can obtain a required service result, for example, a takeout interface is displayed on the terminal, the user selects a shop and orders food through the interface, and the server provides corresponding background network service.
In the embodiment of the invention, a terminal acquires a script file corresponding to a service according to a service triggering instruction input by a user through a current page; interpreting and rendering the obtained script file to generate an interface corresponding to the service; and presents the interface to the current page to enable the user to access the service through the interface, such that, through the script file, the required service can be directly presented in the terminal, the downloading of the low-frequency APP is reduced, the memory space of the terminal is saved, the downloading and the installation are not needed, the installation permission is not needed, the service is directly distributed, the limitation of each APP provider on an Operating System (OS) layer is avoided, the distance between a user and the service is shortened, the user can more conveniently use the required service, the user experience is improved, in addition, when the service interface is displayed, the service interface is directly added into the current page without loading a new page, the efficiency of direct service is improved, moreover, the service access method in the embodiment of the invention does not need to depend on the APP of a certain terminal, can be applied to the APPs of all terminals, and has better portability and compatibility.
Based on the foregoing embodiment, the implementation process of the service access method in the embodiment of the present invention can be described by dividing into the following three parts:
a first part: a developer develops and uploads a script file in advance, and a terminal pulls the script file, as shown in fig. 3, the script file uploading and issuing process provided in the embodiment of the present invention specifically includes:
step 300: the developer develops a script file for the service.
Step 301: and uploading to the server through the management terminal.
Thus, as can be seen from fig. 3, the server stores the received script file and the service name correspondingly, for example, the script file and the mapping relationship between the service name and the script file are stored, and the mapping relationship can be cached in the cloud offline.
Step 302: and the user sends a request for pulling the script file to the server through the terminal.
Wherein, the request of pulling the script file at least comprises the service name.
Step 303: the server returns a script file.
Specifically, the server searches for a corresponding script file according to the mapping relationship between the service name and the script file and the service name, and returns the script file corresponding to the service name.
It should be noted that, the execution sequence of the above steps is not limited, and is an exemplary illustration for the sake of clarity.
A second part: the terminal performs interpretation rendering according to the script file, and displays a service interface on a current page, as shown in fig. 4, for another service access method provided in the embodiment of the present invention, specifically including:
step 400: and judging whether a service triggering instruction is received, if so, executing the step 401, otherwise, executing the step 408.
Specifically, the terminal may receive a service trigger instruction input by the user through the current page.
Step 401: and judging whether a script file corresponding to the service is stored locally, if so, executing step 406, and otherwise, executing step 402.
Step 402: and sending a pull script file request to the server.
At this time, if the terminal does not locally store the script file, the script file can be pulled from the server side, wherein the request for pulling the script file includes the service name.
Step 403: and receiving the script file sent by the server according to the pull script file request.
Step 404: the rendering is explained for a script file.
Therefore, the interface corresponding to the service can be generated after the interpretation and rendering are carried out according to the interface description information and the service logic information in the script file.
Step 405: and judging whether the interface is displayed, if so, executing step 406, otherwise, executing step 408.
Specifically, whether to present the interface may be determined based on determining whether the user closed the current page.
In the embodiment of the invention, whether the interface is displayed needs to be judged, because the user can trigger the terminal to acquire the script file through the search service, the terminal performs interpretation rendering on the script file, and because the interpretation rendering also needs a certain time, in the process of performing the interpretation rendering on the script file by the terminal, the user thinks that the service is not needed to be used, closes the current page, closes the APP used during the search, or switches to other pages, and the like, at this time, if the terminal performs the interpretation rendering, the interface of the service does not need to be displayed.
Step 406: and drawing an interface.
Step 407: the interface is added to the current page.
Namely, the interface is displayed on the current page, a new page does not need to be loaded, the time is reduced, and the service direct efficiency is improved.
Step 408: and (6) ending.
And a third part: after the terminal displays the interface, the user can request to access the service through the interface, and referring to fig. 5, the service access flow for the user in the embodiment of the present invention specifically includes:
step 500: and the terminal receives a service access request sent by a user aiming at the interface.
For example, a user inputs service parameters on an interface corresponding to a service on a terminal, that is, submits a required service, and the terminal receives a service access request including the service parameters, for example, when the user uses a weather service, the user inputs service parameters such as a certain city or date, that is, the user needs to know the weather of the city on the date.
Step 501: the service access request is sent to the server.
Step 502: and receiving a service result returned by the server according to the service access request.
Therefore, the embodiment of the invention realizes a mode of directly enabling the user to use the service through the script file, and the service distribution is more efficient and direct.
Based on the above embodiment, referring to fig. 6, a diagram of a display effect of a service interface on a current page of a terminal in an embodiment of the present invention is shown. The upper part in fig. 6, that is, the information including all, application, content, and input arrival city, origin, time, etc., is a service through function implemented by a script file.
Referring to fig. 6, for example, a user inputs a "fixed airline ticket" in an input box, clicks a search on the right side of the input box, that is, sends a service trigger instruction, and after receiving the service trigger instruction, the terminal obtains a corresponding script file, interprets and renders the script file, and adds an interface after interpretation and rendering to a current page, that is, the upper part in fig. 6, without loading a page, which is more direct and convenient.
Furthermore, the user can use the service through the interface, for example, the user selects "press the landing place" on the interface, so that the information of the origin, the arrival city, the time and the like can be input, for example, the origin is Beijing, the arrival city is Kunming, wherein Kunming is not shown in FIG. 6, and the selection time is 5 months and 31 days, so that after the user searches, the server can return the corresponding service result, and the user can obtain the required air ticket information from the terminal, thereby achieving the purpose of determining the air ticket.
Based on the foregoing embodiment, referring to fig. 7, in an embodiment of the present invention, a service access apparatus specifically includes:
an obtaining module 70, configured to obtain a script file corresponding to a service according to a service triggering instruction input by a user through a current page;
the generating module 71 is configured to perform interpretation and rendering on the obtained script file, and generate an interface corresponding to the service;
a presentation module 72, configured to present the interface on the current page, so that the user accesses the service through the interface.
Optionally, the obtaining module 70 is specifically configured to obtain a script file corresponding to the service:
judging whether a script file corresponding to the service is stored locally;
if not, sending a request for pulling the script file to the server, receiving the script file sent by the server according to the request for pulling the script file, and storing the script file to the local corresponding to the service name, wherein: the server stores a service name and a corresponding script file, the pull script file request comprises the service name, and the server searches the corresponding script file according to the service name;
and if yes, directly acquiring the locally stored script file.
Optionally, the service name and the script file stored in the server are uploaded to the server through the management terminal.
Optionally, the script file at least includes a version number;
after directly acquiring the locally stored script file, further comprising:
a first sending module 73, configured to send the version number of the script file to the server, so that the server determines whether the version number of the script file sent by the device is the same as the version number of the script file in the server, if the version number of the script file sent by the server is not the same as the version number of the script file in the server, the script file corresponding to the version number in the server is sent to the device, and if the version number of the script file sent by the device is the same as the version number of the script file in the server, a confirmation message.
Optionally, further comprising:
a first receiving module 74, configured to receive a preset service name and a script file corresponding to the preset service name, which are sent by the server when it is determined that the apparatus is started; and a storage module 75, configured to store the service name and the script file locally.
Optionally, further comprising:
a second receiving module 76, configured to receive a service access request sent by a user for the interface;
a second sending module 77, configured to send the service access request to the server;
a third receiving module 78, configured to receive a service result returned by the server according to the service access request.
Based on the above embodiments, referring to fig. 8, a schematic structural diagram of an electronic device in an embodiment of the present invention is shown.
An embodiment of the present invention provides an electronic device, which may include a processor 810 (CPU), a memory 820, an input device 830, an output device 840, and the like, where the input device 830 may include a keyboard, a mouse, a touch screen, and the like, and the output device 840 may include a Display device, such as a Liquid Crystal Display (LCD), a Cathode Ray Tube (CRT), and the like.
The processor 810 is configured to, by calling the program instructions stored in the memory 820, execute, according to the obtained program instructions:
the terminal acquires a script file corresponding to the service according to a service triggering instruction input by a user through a current page;
interpreting and rendering the obtained script file to generate an interface corresponding to the service; and displaying the interface on the current page so that the user can access the service through the interface.
Optionally, the processor 810 is specifically configured to obtain a script file corresponding to the service:
judging whether a script file corresponding to the service is stored locally;
if not, sending a request for pulling the script file to a server, receiving the script file sent by the server according to the request for pulling the script file, and storing the script file to the local corresponding to the service name, wherein: the server stores a service name and a corresponding script file, the pull script file request comprises the service name, and the server searches the corresponding script file according to the service name;
and if yes, directly acquiring the locally stored script file.
Optionally, the service name and the script file stored in the server are uploaded to the server through the management terminal.
Optionally, the script file at least includes a version number;
after directly retrieving the locally stored script file, the processor 810 is further configured to: and sending the version number of the script file to the server so that the server judges whether the version number of the script file sent by the terminal is the same as the version number of the script file in the server or not, if not, sending the script file corresponding to the version number in the server to the terminal, and if so, sending a confirmation message of correct version to the terminal.
Optionally, the processor 810 is further configured to:
receiving a preset service name and a script file corresponding to the preset service name which are sent by the server when the server determines that the terminal is started; and correspondingly storing the service name and the script file to the local.
Optionally, the processor 810 is further configured to:
receiving a service access request sent by a user aiming at the interface, and sending the service access request to the server; and receiving a service result returned by the server according to the service access request.
For convenience of illustration, the portable multifunction device 900 including a touch screen is used as an example of the embodiments of the present invention, and those skilled in the art will appreciate that the embodiments of the present invention are also applicable to other devices, such as handheld devices, vehicle-mounted devices, wearable devices, computing devices, and various forms of User Equipment (UE), Mobile Stations (MS), terminals (Terminal), Terminal Equipment (Terminal Equipment), and the like.
Fig. 9 illustrates a block diagram of a portable multifunction device 900 including a touch screen according to some embodiments, the device 900 may include an input unit 930, a display unit 940, a gravitational acceleration sensor 951, a proximity light sensor 952, an ambient light sensor 953, a memory 920, a processor 990, a radio frequency unit 910, an audio circuit 1060, a speaker 961, a microphone 962, a WiFi (wireless fidelity) module 970, a bluetooth module 980, a power supply 993, an external interface 997, and the like.
Those skilled in the art will appreciate that fig. 9 is merely an example of a portable multifunction device and is not intended to be limiting and that more or fewer components than those shown, or some components in combination, or different components may be included.
The input unit 930 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the portable multifunction device. Specifically, the input unit 930 may include a touch screen 931 and other input devices 932. The touch screen 931 may collect a touch operation performed by a user on or near the touch screen (e.g., a user's operation on or near the touch screen using a finger, a joint, a stylus, or any other suitable object), and drive the corresponding connection device according to a preset program. The touch screen can detect a touch action of a user on the touch screen, convert the touch action into a touch signal and send the touch signal to the processor 990, and can receive and execute a command sent by the processor 990; the touch signal includes at least contact point coordinate information. The touch screen 931 may provide an input interface and an output interface between the device 900 and a user. In addition, the touch screen may be implemented using various types, such as resistive, capacitive, infrared, and surface acoustic wave. The input unit 930 may include other input devices in addition to the touch screen 931. In particular, other input devices 932 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys 932, switch keys 933, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 940 may be used to display information input by a user or information provided to the user and various menus of the apparatus 900. Further, the touch screen 931 may overlay the display panel 941, and when the touch screen 931 detects a touch operation on or near the touch screen 931, the touch screen is transmitted to the processor 990 to determine the type of touch event, and then the processor 990 provides a corresponding visual output on the display panel 941 according to the type of touch event. In this embodiment, the touch screen and the display unit may be integrated into one component to implement the input, output, and display functions of the device 900; for convenience of description, the embodiment of the present invention represents a functional set of a touch screen and a display unit by the touch screen; in some embodiments, the touch screen and the display unit may also be provided as two separate components.
The acceleration sensor 951 can detect the acceleration in each direction (generally, three axes), and meanwhile, the acceleration sensor 951 can also be used for detecting the gravity and the direction when the terminal is stationary, and can be used for applications of recognizing the gesture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and tapping) and the like.
Device 900 may also include one or more proximity light sensors 952 for turning off and disabling the touch screen when the device 900 is closer to the user (e.g., near the ear when the user is making a phone call) to avoid user malfunction of the touch screen; the device 900 may also include one or more ambient light sensors 953 for keeping the touch screen off when the device 900 is in a user's pocket or other dark area to prevent unnecessary battery power consumption or malfunction of the device 900 when in a locked state, and in some embodiments, the proximity light sensor and the ambient light sensor may be integrated in one piece or may be provided as two separate pieces. As for the apparatus 900, other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor may be further configured, and will not be described herein. Although fig. 9 shows a proximity light sensor and an ambient light sensor, it is understood that they do not belong to the essential constitution of the apparatus 900 and may be omitted entirely as needed within the scope not changing the essence of the invention.
The memory 920 can be used for storing instructions and data, the memory 920 can mainly include an instruction storage area and a data storage area, and the data storage area can store the association relationship between the joint touch gesture and the application program function; the storage instruction area can store an operating system, instructions required by at least one function and the like; the instructions may cause processor 990 to perform a service access method according to an embodiment of the present invention.
The rf unit 910 may be configured to receive and transmit information or signals during a call, and particularly, receive downlink information of a base station and then process the received downlink information to the processor 990; in addition, the data for designing uplink is transmitted to the base station. Typically, the RF circuitry includes, but is not limited to, an antenna, at least one Amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the radio frequency unit 910 may also communicate with network devices and other devices through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), and the like.
WiFi belongs to short-range wireless transmission technology, and the device 900 can help the user send and receive e-mail, browse web pages, access streaming media, etc. through the WiFi module 970, which provides the user with wireless broadband internet access. Although fig. 9 shows WiFi module 970, it is understood that it does not belong to the essential constitution of device 900, and may be omitted entirely as needed within the scope not changing the essence of the invention.
Bluetooth is a short-range wireless communication technology. By using the bluetooth technology, the communication between mobile communication terminal devices such as a palm computer, a notebook computer, a mobile phone and the like can be effectively simplified, and the communication between the devices and the Internet (Internet) can also be successfully simplified, so that the device 900 enables the data transmission between the device 900 and the Internet to be more rapid and efficient through the bluetooth module 980, and the way is widened for wireless communication. Bluetooth technology is an open solution that enables wireless transmission of voice and data. Fig. 9, however, shows a WiFi module 970, but it will be understood that it does not belong to the essential constituents of the device 900 and can be omitted entirely as required within the scope not changing the essence of the invention.
The device 900 also includes a power supply 993 (e.g., a battery) for powering the various components, which may preferably be logically coupled to the processor 990 via a power management system 994 such that the power management system 994 may perform functions of managing charging, discharging, and power consumption.
The device 900 also includes an external interface 997, which may be a standard Micro USB interface, or may be a multi-pin connector that may be used to connect the device 900 for communication with other devices, or may be used to connect a charger for charging the device 900.
Although not shown, the device 900 may also include a camera, a flash, etc., which are not described in detail herein.
Based on the above embodiments, in the embodiments of the present invention, there is provided a computer-readable storage medium on which a computer program is stored, the computer program, when executed by a processor, implementing the service access method in any of the above method embodiments.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made in the embodiments of the present invention without departing from the spirit or scope of the embodiments of the invention. Thus, if such modifications and variations of the embodiments of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to encompass such modifications and variations.
Claims (9)
1. A method for service access, comprising:
the method comprises the steps that a terminal acquires a script file corresponding to a service from a server and stores the corresponding script file to the local according to a service triggering instruction input by a user through a current page of any application program supporting the service, wherein the script file at least comprises interface description information and business logic information of the service;
interpreting and rendering the obtained script file to generate an interface corresponding to the service; and are
Determining that the user does not close the current page, determining to display the interface, taking the interface as a part of the current page, displaying the interface on the current page, and providing an interface for the user to access the service so that the user can access the service through the interface;
and when the user accesses the service again, acquiring the script file corresponding to the service from the terminal so as to access the service.
2. The method of claim 1, wherein obtaining the script file corresponding to the service specifically comprises:
judging whether a script file corresponding to the service is stored locally;
if not, sending a request for pulling the script file to a server, receiving the script file sent by the server according to the request for pulling the script file, and storing the script file to the local corresponding to the service name, wherein: the server stores a service name and a corresponding script file, the pull script file request comprises the service name, and the server searches the corresponding script file according to the service name;
and if yes, directly acquiring the locally stored script file.
3. The method of claim 2, wherein the service name and the script file stored in the server are uploaded to the server through the management side.
4. The method of claim 2, wherein at least a version number is included in the script file;
after directly acquiring the locally stored script file, further comprising:
and sending the version number of the script file to the server so that the server judges whether the version number of the script file sent by the terminal is the same as the version number of the script file in the server or not, if not, sending the script file corresponding to the version number in the server to the terminal, and if so, sending a confirmation message of correct version to the terminal.
5. The method of claim 2, further comprising:
receiving a preset service name and a script file corresponding to the preset service name which are sent by the server when the server determines that the terminal is started; and are
And correspondingly storing the service name and the script file to the local.
6. The method of any one of claims 1-5, further comprising:
receiving a service access request sent by a user aiming at the interface, and sending the service access request to the server;
and receiving a service result returned by the server according to the service access request.
7. A service access apparatus, comprising:
the system comprises an acquisition module, a service processing module and a service processing module, wherein the acquisition module is used for acquiring a script file corresponding to a service from a server and storing the corresponding script file to the local according to a service triggering instruction input by a user through a current page of any application program supporting the service, and the script file at least comprises interface description information and business logic information of the service;
the generating module is used for explaining and rendering the acquired script file and generating an interface corresponding to the service;
the display module is used for determining that the user does not close the current page, determining to display the interface, displaying the interface on the current page as a part of the current page, and providing an interface for the user to access the service so that the user can access the service through the interface;
and the obtaining module is also used for obtaining the script file corresponding to the service from the local to access the service when the user accesses the service again.
8. An electronic device, comprising:
at least one memory for storing program instructions;
at least one processor for calling program instructions stored in said memory and for executing the method of any of the preceding claims 1-6 in accordance with the program instructions obtained.
9. A computer-readable storage medium having stored thereon a computer program, characterized in that: the computer program realizing the steps of the method according to any one of claims 1-6 when executed by a processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810673379.0A CN109040182B (en) | 2018-06-26 | 2018-06-26 | Service access method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810673379.0A CN109040182B (en) | 2018-06-26 | 2018-06-26 | Service access method and device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109040182A CN109040182A (en) | 2018-12-18 |
CN109040182B true CN109040182B (en) | 2020-11-24 |
Family
ID=64611121
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810673379.0A Active CN109040182B (en) | 2018-06-26 | 2018-06-26 | Service access method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109040182B (en) |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109885302A (en) * | 2019-01-29 | 2019-06-14 | 维沃移动通信有限公司 | A kind of methods of exhibiting and terminal device applied fastly |
CN110069737B (en) * | 2019-04-19 | 2020-08-14 | 北京三快在线科技有限公司 | Content generation method and device, computer equipment and storage medium |
CN110069186B (en) * | 2019-04-30 | 2021-10-15 | 上海连尚网络科技有限公司 | Method and equipment for displaying operation interface of application |
CN111156781A (en) * | 2019-12-27 | 2020-05-15 | 合肥美的电冰箱有限公司 | Intelligent equipment control method, control device, refrigerator, terminal and storage medium |
CN111314454A (en) * | 2020-02-12 | 2020-06-19 | 深圳市信锐网科技术有限公司 | Application access method and device, electronic equipment and storage medium |
CN113434063B (en) * | 2021-07-01 | 2023-06-20 | 支付宝(杭州)信息技术有限公司 | Information display method, device and equipment |
CN115934177B (en) * | 2022-05-24 | 2023-08-18 | 北京有限元科技有限公司 | Dynamic docking method and device for storage service, electronic equipment and medium |
CN115314241A (en) * | 2022-06-23 | 2022-11-08 | 江苏金融租赁股份有限公司 | Method for realizing enterprise WeChat access data platform |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103761103A (en) * | 2014-01-26 | 2014-04-30 | 曙光云计算技术有限公司 | Method and system for defining and instantiating cloud computing platform service |
CN104516908A (en) * | 2013-09-29 | 2015-04-15 | 华为技术有限公司 | Database access method and device |
CN104717567A (en) * | 2015-03-30 | 2015-06-17 | 北京奇艺世纪科技有限公司 | Dynamic display method and device for weather information |
CN105630992A (en) * | 2015-12-25 | 2016-06-01 | 网易(杭州)网络有限公司 | Scene display method and device in static page |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9880826B2 (en) * | 2014-02-25 | 2018-01-30 | Red Hat, Inc. | Installing of application resources in a multi-tenant platform-as-a-service (PaS) system |
-
2018
- 2018-06-26 CN CN201810673379.0A patent/CN109040182B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104516908A (en) * | 2013-09-29 | 2015-04-15 | 华为技术有限公司 | Database access method and device |
CN103761103A (en) * | 2014-01-26 | 2014-04-30 | 曙光云计算技术有限公司 | Method and system for defining and instantiating cloud computing platform service |
CN104717567A (en) * | 2015-03-30 | 2015-06-17 | 北京奇艺世纪科技有限公司 | Dynamic display method and device for weather information |
CN105630992A (en) * | 2015-12-25 | 2016-06-01 | 网易(杭州)网络有限公司 | Scene display method and device in static page |
Also Published As
Publication number | Publication date |
---|---|
CN109040182A (en) | 2018-12-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109040182B (en) | Service access method and device, electronic equipment and storage medium | |
US10705780B2 (en) | Method, device, and storage medium for displaying application page | |
CN106970790B (en) | Application program creating method, related equipment and system | |
CN108984548B (en) | Page content caching method and device | |
KR102182917B1 (en) | Graphic code display method and device | |
CN106775637B (en) | Page display method and device for application program | |
CN107040609B (en) | Network request processing method and device | |
CN109857403B (en) | Page updating method and device, page processing method and device | |
CN108156508B (en) | Barrage information processing method and device, mobile terminal, server and system | |
WO2015154670A1 (en) | Method and apparatus for invoking application programming interface | |
CN109857297B (en) | Information processing method and terminal equipment | |
CN110869907A (en) | Method and terminal for browsing application page | |
CN103501485B (en) | Push the method, apparatus and terminal device of application | |
CN106936699A (en) | A kind of information sharing method, device and system | |
WO2017161994A1 (en) | Method and device for displaying page, and computer storage medium | |
CN105955739A (en) | Graphical interface processing method, apparatus and system | |
CN104281568B (en) | Paraphrasing display method and paraphrasing display device | |
CN109948090A (en) | Webpage loading method and device | |
WO2015003636A1 (en) | Method and device for interception of page elements | |
EP2869604B1 (en) | Method, apparatus and device for processing a mobile terminal resource | |
CN106101764A (en) | A kind of methods, devices and systems showing video data | |
CN104750730B (en) | Browser display method and device | |
CN113064635A (en) | Page display method and device of smart television | |
CN108268232B (en) | Picture display method, device, system and storage medium | |
CN106095423B (en) | Method, terminal and server for providing browsing service |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |