CN109582395B - Applet running method and device, electronic equipment and storage medium - Google Patents

Applet running method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN109582395B
CN109582395B CN201910024134.XA CN201910024134A CN109582395B CN 109582395 B CN109582395 B CN 109582395B CN 201910024134 A CN201910024134 A CN 201910024134A CN 109582395 B CN109582395 B CN 109582395B
Authority
CN
China
Prior art keywords
link
applet
program
unique identifier
small program
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
CN201910024134.XA
Other languages
Chinese (zh)
Other versions
CN109582395A (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.)
Beijing Sankuai Online Technology Co Ltd
Original Assignee
Beijing Sankuai Online 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 Beijing Sankuai Online Technology Co Ltd filed Critical Beijing Sankuai Online Technology Co Ltd
Priority to CN201910024134.XA priority Critical patent/CN109582395B/en
Publication of CN109582395A publication Critical patent/CN109582395A/en
Application granted granted Critical
Publication of CN109582395B publication Critical patent/CN109582395B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses an applet running method, belongs to the technical field of computers, and is used for solving the problem that in the prior art, the applet running efficiency is low due to low identification degree of an applet two-dimensional code. The applet running method disclosed by the embodiment of the application comprises the following steps: acquiring a short link corresponding to an original link of the applet; generating a two-dimensional code of the small program according to the short link; responding to the operation of starting the small program by scanning the two-dimensional code, and acquiring a unique identifier of an original link carried in the two-dimensional code; acquiring a program operation parameter corresponding to the unique identifier through an applet server; and continuing to operate the small program based on the program operation parameters. According to the small program running method disclosed by the embodiment of the application, the processing flows of the small program and the small program server are improved, the original link of the small program is converted into the short link for generating the two-dimensional code, the recognition degree of the two-dimensional code of the small program is improved, and therefore the running efficiency of the small program is improved.

Description

Applet running method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to an applet running method and apparatus, an electronic device, and a storage medium.
Background
The applet is an application that can be used without downloading, does not need to be installed and downloaded, can be opened by scanning or searching by a user, and can be run. In the prior art, in the process of operating the applet by scanning the two-dimensional code, an applet developer first needs to generate a two-dimensional code for the applet, wherein the two-dimensional code comprises the link of the applet and necessary data for operating the applet. When a user scans the two-dimensional code of the small program through application software (for example, WeChat), the application software acquires an access link of the small program by identifying the two-dimensional code, and acquires the parameters for operating the small program through the link so as to operate the small program. However, when the operating parameters of the applet are large, the two-dimensional code of the applet is very complicated and difficult to identify.
Therefore, the small program running method in the prior art has at least the defect that the two-dimension code is difficult to identify.
Disclosure of Invention
The application provides a small program running method which is beneficial to solving the problem that two-dimensional codes of small programs are difficult to identify.
In order to solve the above problem, in a first aspect, an embodiment of the present application provides an applet running method, including:
acquiring a short link corresponding to an original link of an applet, wherein the short link comprises a unique identifier of the original link;
generating a two-dimensional code of the small program according to the short link;
responding to the operation of starting the small program by scanning the two-dimensional code, and acquiring the unique identifier of the original link carried in the two-dimensional code;
acquiring a program operation parameter corresponding to the unique identifier through an applet server;
and continuing to operate the small program based on the program operation parameters.
In a second aspect, an embodiment of the present application provides an applet running apparatus, including:
the short link acquisition module is used for acquiring a short link corresponding to an original link of an applet, wherein the short link comprises a unique identifier of the original link;
the two-dimensional code generating module is used for generating the two-dimensional code of the small program according to the short link;
the unique identifier acquisition module is used for responding to the operation of starting the small program by scanning the two-dimensional code and acquiring the unique identifier of the original link carried in the two-dimensional code;
the program operation parameter acquisition module is used for acquiring the program operation parameters corresponding to the unique identifier through the small program server;
and the small program running module is used for continuously running the small program based on the program running parameters.
In a third aspect, an embodiment of the present application provides an applet running method, including:
receiving an original link sent by an applet;
in response to receiving the original link operation, generating a short link according to the original link, and returning the short link, wherein the short link comprises a unique identifier of the original link;
receiving a unique identifier of the original link, which is obtained by scanning a two-dimensional code of the applet, wherein the two-dimensional code is generated according to the short link;
and returning the program operation parameters of the small program corresponding to the unique identifier, so that the small program continues to operate based on the program operation parameters.
In a fourth aspect, an embodiment of the present application provides an applet running apparatus, including:
the original link receiving module is used for receiving an original link sent by the applet;
the short link returning module is used for responding to the received original link operation, generating a short link according to the original link and returning the short link, wherein the short link comprises a unique identifier of the original link;
the unique identifier receiving module is used for receiving the unique identifier of the original link, which is obtained by scanning the two-dimensional code of the applet, wherein the two-dimensional code is generated according to the short link;
and the program operation parameter returning module is used for returning the program operation parameters of the small program corresponding to the unique identifier so that the small program can continuously operate based on the program operation parameters.
In a fifth aspect, an embodiment of the present application further discloses an electronic device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the applet running method according to the embodiment of the present application when executing the computer program.
In a sixth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor, and the steps of the applet running method disclosed in the present application are executed.
According to the small program running method disclosed by the embodiment of the application, a short link corresponding to an original link of a small program is obtained, wherein the short link comprises a unique identifier of the original link; generating a two-dimensional code of the small program according to the short link; responding to the operation of starting the small program by scanning the two-dimensional code, and acquiring the unique identifier of the original link carried in the two-dimensional code; acquiring a program operation parameter corresponding to the unique identifier through an applet server; and based on the program operation parameters, the small program is continuously operated, so that the problem of low small program operation efficiency caused by high difficulty in two-dimensional code identification of the small program in the prior art is solved. According to the small program running method disclosed by the embodiment of the application, the processing flows of the small program and the small program server are improved, the original link of the small program is converted into the short link for generating the two-dimensional code, the recognition degree of the two-dimensional code of the small program is improved, and therefore the running efficiency of the small program is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a flowchart of an applet running method according to a first embodiment of the present application;
FIG. 2 is a flowchart of an applet running method according to a second embodiment of the present application;
FIG. 3 is a schematic application diagram of an applet running method in a third embodiment of the present application;
FIG. 4 is a schematic structural diagram of an applet running device according to a fourth embodiment of the present application;
fig. 5 is a schematic structural diagram of an applet running device according to a fifth embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. 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 application.
Example one
As shown in fig. 1, the applet running method disclosed in this embodiment includes: step 110 to step 150.
Step 110, a short link corresponding to the original link of the applet is obtained.
Wherein the short link comprises a unique identifier of the original link.
In the prior art, the applet is run by accessing a link corresponding to the page of the applet, and this link is the original link of the applet. In some embodiments of the present application, the original link of the applet includes various information such as a unique identifier of the applet and program operation parameters. The original link of the applet is generated according to a preset rule, for example, the original link of an applet may be in the following format: unique identification of applet/? Parameter 1& parameter 2 parameter 3.
In some embodiments of the present application, a short link may be generated from an original link of an applet, thereby generating a two-dimensional code from the short link.
In some embodiments of the present application, the obtaining a short link corresponding to an original link of an applet includes: sending an original link of an applet to the applet server; and acquiring a short link generated by the applet server according to the prefix in the original link and the unique identifier after the unique identifier of the original link is generated according to the original link. Wherein, the original link includes a unique identifier of an applet and program operating parameters of the applet, and the prefix may be the unique identifier of the applet. First, the applet sends its original link to the applet server. The original links of the applets are: https:// dm.meitan.com/asourceType ═ 3& partnerId ═ 106& poiId ═ 0& product no ═ 106113377427& product skuno ═ 10611337742700& product type ═ 3& distributor ═ txdvilasddvr 0szNFk9CgGFVD, for example, https:// dm.meitan.com is the unique identifier of the applet, sourceType:3 & partnerId ═ 106& poiId ═ 0& product no ═ 106113377427& product skuno ═ 10611337742700& product type ═ 3& distributor txuvddasddvr 0 szgfk 9CgGFVD is the program run parameter. After receiving the original link sent by the applet, the applet server first generates a unique identifier, such as b0a9b, of the original link according to the original link. When the method is implemented specifically, the unique identifier of the original link may be a character string, and the unique identifier of the original link generated according to the original link may be generated by using an identifier generation method in the prior art, which is not limited in this application.
In some embodiments of the present application, the unique identification of the original link may be generated from all information of the original link, for example, the unique identification of the original link may be generated from https:// dm.meiutan.com/asourceType ═ 3& partnerId ═ 106& poiId ═ 0& product no ═ 106113377427& product skuno ═ 10611337742700& product type ═ 3& distributor ═ txdvilasdvr 0szNFk9 CgGFVD. In other embodiments of the present application, the unique identifier of the original link may also be generated according to part of the information of the original link, for example, the unique identifier of the original link is generated according to a prefix in the original link. Taking the original link as an example, by analyzing the original link, it can be determined that the prefix in the original link is https:// dm.
And then, the applet server generates a short link according to the generated unique identifier of the original link and the unique identifier of the applet. For example, the short link obtained from the aforementioned raw link is https:// dm. b0a9 b.
In some embodiments of the present application, when obtaining a short link corresponding to an original link of an applet, the method further comprises: analyzing the program operating parameters of the small program carried in the original link, and then storing the corresponding relation between the unique identifier and the program operating parameters at the small program server.
Taking the original link as an example, by parsing the original link according to a preset rule, it may be determined that the program operation parameter of the applet carried in the original link is "sourceType ═ 3& partnerId ═ 106& poiId ═ 0& product no ═ 106113377427& product skuno ═ 10611337742700& product type ═ 3& distributor ═ txdvisaddvr 0szNFk9 CgGFVD".
Then, the applet server stores the generated unique identifier (such as b0a9b) of the original link and the determined corresponding relation of the program operation parameters of the applet, so as to facilitate subsequent retrieval.
And after the applet server successfully stores the corresponding relation between the unique identifier of the original link and the program operation parameter, returning the short link to the applet.
And 120, generating a two-dimensional code of the small program according to the short link.
After receiving a short link returned by an applet service end, the applet generates a two-dimensional code of the applet according to the short link. See the prior art for a specific implementation of generating a two-dimensional code according to a short link, which is not described in detail in the embodiments of the present application.
Step 130, responding to the operation of starting the applet by scanning the two-dimensional code, and acquiring the unique identifier of the original link carried in the two-dimensional code.
In a specific application process, when a user scans the two-dimensional code of the applet through an application program, the application program analyzes the two-dimensional code of the applet and starts the applet through a short link carried in the two-dimensional code. After the applet is started to run, the short link can be further acquired, and the unique identifier carried in the short link can be acquired. The unique identification is the unique identification of the small program at the small program service end.
And 140, acquiring the program operation parameters corresponding to the unique identifier through the applet server.
And the applet sends the unique identifier to the applet server to request the actual program operating parameters.
In some embodiments of the present application, the obtaining, by the applet server, the program operation parameter corresponding to the unique identifier includes: and determining the program operation parameters corresponding to the unique identifier according to the corresponding relation stored by the applet server. After receiving the unique identifier sent by the applet, the applet server traverses the corresponding relation between the pre-stored unique identifier and the program operation parameter, and determines the program operation parameter corresponding to the unique identifier. The determined program operating parameters are actual operating parameters of the applet.
And then, the applet server side returns the determined actual operation parameters of the applet to the applet.
And 150, continuing to operate the small program based on the program operation parameters.
And after receiving the program operation parameters returned by the applet server, the applet continues to perform subsequent processing based on the program operation parameters. For example, after the application starts the applet through the short link, the applet initializes the program template, and then the applet loads the operating data and completes the interactive logic through the acquired program operating parameters.
According to the small program running method disclosed by the embodiment of the application, a short link corresponding to an original link of a small program is obtained, wherein the short link comprises a unique identifier of the original link; generating a two-dimensional code of the small program according to the short link; responding to the operation of starting the small program by scanning the two-dimensional code, and acquiring the unique identifier of the original link carried in the two-dimensional code; acquiring a program operation parameter corresponding to the unique identifier through an applet server; and based on the program operation parameters, the small program is continuously operated, so that the problem of low small program operation efficiency caused by high difficulty in two-dimensional code identification of the small program in the prior art is solved. According to the small program running method disclosed by the embodiment of the application, the processing flows of the small program and the small program server are improved, the original link of the small program is converted into the short link for generating the two-dimensional code, the recognition degree of the two-dimensional code of the small program is improved, and therefore the running efficiency of the small program is improved.
In the prior art, for some complicated or long-length links, short link technology is generally used in the industry for optimization, and the realization principle is as follows: firstly, converting a complex link according to a certain rule to generate a unique identifier of the complex link; then, generating a new link address according to the unique identifier, wherein the link address is usually simpler and has a short length; when a user accesses the link through the browser, after a request reaches the short link server, the server finds the original link according to the identification, and then the browser redirects to the original link for access. Because the applet does not use the browser, the small program does not have a jump request called by the browser, and the access request of the short-chain grounding address can not be redirected to a long-link address by domain name redirection by using a common short-chain-link technology in the industry.
Therefore, when the method is implemented specifically, the running process of the small program and the data processing process of the small program server are improved simultaneously, the small program server generates the unique identifier of the original connection of the small program and stores the mapping relation between the unique identifier and the program running parameters of the small program, the small program provides the two-dimensional code generated by the short link only carrying the unique identifier externally, after the application program scans the code and enters the small program, the small program calls the small program server interface according to the unique identifier to obtain the actual running parameters, the original complex long-link two-dimensional code is shortened into the extremely simple short-link two-dimensional code, the definition and the identification degree of the ordinary link two-dimensional code of the small program are improved, and the running efficiency of the small program is improved.
Example two
As shown in fig. 2, the applet running method disclosed in this embodiment includes: step 210 to step 240.
Step 210, receive the original link sent by the applet.
In the prior art, the applet is run by accessing a link corresponding to the page of the applet, and this link is the original link of the applet. In some embodiments of the present application, the original link of the applet includes various information such as a unique identifier of the applet and program operation parameters. The original link of the applet is generated according to a preset rule, for example, the original link of an applet may be in the following format: unique identification of applet/? Parameter 1& parameter 2 parameter 3. In the prior art, before an applet is released, a two-dimensional code is generally required to be generated according to the original link, so that other application programs can start the applet to run by scanning the two-dimensional code.
In some embodiments of the application, before the applet is released, the short link is generated according to the original link of the applet, and the two-dimensional code is further generated according to the short link, so that other application programs can start the applet to run by scanning the two-dimensional code. Therefore, in the implementation, the applet server detects and receives the original link sent by the applet.
Step 220, in response to receiving the original link operation, generating a short link according to the original link, and returning the short link.
Wherein the short link comprises a unique identification of the original link.
After receiving the original link of the applet, the applet server generates a short link according to the original link and returns the short link.
In some embodiments of the present application, the step of generating a short link from the original link includes: generating a unique identifier of the original link according to the original link; and generating a short link according to the prefix in the original link and the unique identification combination. The original link of the applet is https:// dm.meiutan.com/adourcettype ═ 3& partnerId ═ 106& poiId ═ 0& product no ═ 106113377427& product skuno ═ 10611337742700& product type ═ 3& distributor ═ txdviladdvr 0szNFk9CgGFVD, for example, where https:// dm.meiutan.com is the unique identifier of the applet and sourceType ═ 3& partnerId ═ 106& poiId 0& product no ═ 106113377427& product skun ═ 10611337742700& product type ═ 3& distributorsdddd10 ═ CgGFVD is the running program CgGFVD. After receiving the original link sent by the applet, the applet server first generates a unique identifier, such as b0a9b, of the original link according to the original link. When the method is implemented specifically, the unique identifier of the original link may be a character string, and the unique identifier of the original link generated according to the original link may be generated by using an identifier generation method in the prior art, which is not limited in this application.
In some embodiments of the present application, the unique identification of the original link may be generated from all information of the original link, for example, the unique identification of the original link may be generated from https:// dm.meiutan.com/asourceType ═ 3& partnerId ═ 106& poiId ═ 0& product no ═ 106113377427& product skuno ═ 10611337742700& product type ═ 3& distributor ═ txdvilasdvr 0szNFk9 CgGFVD. In other embodiments of the present application, the unique identifier of the original link may also be generated according to part of the information of the original link, for example, the unique identifier of the original link is generated according to a prefix in the original link. Taking the original link as an example, by analyzing the original link, it can be determined that the prefix in the original link is "https:// dm.
And then, the applet server generates a short link according to the generated unique identifier of the original link and the unique identifier of the applet. For example, the short link obtained from the aforementioned raw link is https:// dm. b0a9 b.
In some embodiments of the present application, the step of generating a short link according to the original link further includes: analyzing the program operation parameters of the small program carried in the original link; and storing the corresponding relation between the unique identification and the program operation parameters. Taking the original link as an example, by parsing the original link according to a preset rule, it may be determined that the program operation parameter of the applet carried in the original link is "sourceType ═ 3& partnerId ═ 106& poiId ═ 0& product no ═ 106113377427& product skuno ═ 10611337742700& product type ═ 3& distributor ═ txdvisaddvr 0szNFk9 CgGFVD".
And then, the applet server stores the generated unique identifier of the original link and the determined corresponding relation of the program operation parameters of the applet, so that subsequent retrieval is facilitated.
And after the applet server successfully stores the corresponding relation between the unique identifier of the original link and the program operation parameter, returning the short link to the applet.
Step 230, receiving the unique identifier of the original link obtained by scanning the two-dimensional code of the applet.
And the two-dimensional code is generated according to the short link. The short link includes a unique identification of the original link.
After the original link is sent to the applet server by the applet, the short link returned by the applet server is detected and received, and a two-dimensional code is further generated according to the received short link, so that a user can conveniently scan to start the applet. The technical scheme for the applet to generate the two-dimensional code according to the short link refers to the first embodiment, which is not described in detail herein.
In a specific application process, when a user scans the two-dimensional code of the applet through an application program, the application program analyzes the two-dimensional code of the applet and starts the applet through a short link carried in the two-dimensional code. After the applet is started to run, the short link can be further acquired, and the unique identifier carried in the short link can be acquired. The unique identification is the unique identification of the small program at the small program service end.
The small program further sends the acquired unique identifier to the small program server to acquire the actual operation parameters of the small program.
And the applet server detects and receives the unique identifier sent by the applet.
And 240, returning the program operation parameters of the small program corresponding to the unique identifier, so that the small program continues to operate based on the program operation parameters.
And after the applet server receives the unique identifier sent by the applet, determining the program operating parameters corresponding to the unique identifier according to the corresponding relation between the unique identifier stored when the short link is generated and the program operating parameters. And the program operating parameters corresponding to the unique identifier are the actual operating parameters of the small program.
And then, the applet server returns the program operation parameters of the applet corresponding to the unique identifier to the applet, so that the applet continues to operate based on the program operation parameters.
According to the applet running method disclosed by the embodiment of the application, original links sent by the applet are received; in response to receiving the original link operation, generating a short link according to the original link, and returning the short link, wherein the short link comprises a unique identifier of the original link; receiving a unique identifier of the original link, which is obtained by scanning a two-dimensional code of the applet, wherein the two-dimensional code is generated according to the short link; and returning the program operating parameters of the small program corresponding to the unique identifier, so that the small program continues to operate based on the program operating parameters, and the problem of low small program operating efficiency caused by high difficulty in two-dimension code identification of the small program in the prior art is solved. According to the small program running method disclosed by the embodiment of the application, the processing flow of the small program and the small program server is improved, the original link of the small program is converted into the short link for generating the two-dimensional code, and the recognition degree of the two-dimensional code of the small program is improved, so that the running efficiency of the small program is improved; the operating parameters of the small program are mapped into the unique identifier and carried by the short link, and then the corresponding mapping relation is stored in the server, so that the small program can further obtain the actual program operating parameters after being started, the subsequent processing can be continuously executed, and the original functions of the small program are realized. According to the small program running method disclosed by the embodiment of the application, under the condition that the normal running of the small program is ensured, the running efficiency of the small program is improved by simplifying the two-dimensional code of the small program.
EXAMPLE III
The embodiment describes a specific technical scheme of an applet running method in combination with a specific application scenario. As shown in fig. 3, the method includes: step 310 to step 380.
Step 310, sending the original link of the applet to the applet server.
At step 320, the applet server receives the original link sent by the applet.
Step 330, in response to receiving the original link operation, the applet server generates a short link according to the original link, and returns the short link, wherein the short link includes a unique identifier of the original link.
In some embodiments of the present application, the step of generating a short link from the original link comprises: substeps 3301 to 3304.
Substep 3301, generating a unique identification of the original link from the original link.
And a substep 3302 of analyzing the program operating parameters of the applet carried in the original link.
And a substep 3303 of storing a correspondence between the unique identifier and the program operating parameter.
Substep 3304, generating a short link from the prefix in the original link and the unique identification combination.
And then, the applet service end generates a short link and returns the short link to the applet.
In the present embodiment, the execution sequence of the sub-steps 3301 and 3302 is not limited.
And 340, generating a two-dimensional code of the small program by the small program according to the short link.
Step 350, responding to the operation of starting the small program by scanning the two-dimensional code, and acquiring the unique identifier of the original link carried in the two-dimensional code.
And step 360, the applet sends the unique identifier to the applet server.
And the small program obtains the program operation parameters corresponding to the unique identifier through the small program server.
Step 370, the applet server determines the program running parameters corresponding to the unique identifier according to the corresponding relationship stored in the applet server, and returns the program running parameters to the applet.
In specific implementation, the applet server returns the program operation parameters of the applet corresponding to the unique identifier, so that the applet continues to operate based on the program operation parameters.
And 380, the small program continuously runs the small program based on the program running parameters.
According to the small program running method disclosed by the embodiment of the application, the processing flow of the small program and the small program server is improved, the original link of the small program is converted into the short link for generating the two-dimensional code, and the recognition degree of the two-dimensional code of the small program is improved, so that the running efficiency of the small program is improved; the operating parameters of the small program are mapped into the unique identifier and carried by the short link, and then the corresponding mapping relation is stored in the server, so that the small program can further obtain the actual program operating parameters after being started, the subsequent processing can be continuously executed, and the original functions of the small program are realized. According to the small program running method disclosed by the embodiment of the application, under the condition that the normal running of the small program is ensured, the running efficiency of the small program is improved by simplifying the two-dimensional code of the small program.
Taking the applet as an example of the wechat applet, when the original link of the wechat applet is too long (for example, the program running parameters are more), the two-dimensional code of the wechat applet generated according to the method in the prior art is very complex, and the recognition degree is low. By using the method disclosed by the application, the mapping relation between the unique identifier generated according to the original link and the program operation parameter is stored through the small program server, and the short-link two-dimensional code only carrying the unique identifier is provided for the micro credit user. After the user scans the code through the WeChat, the WeChat applet analyzes the unique identifier in the two-dimensional code, and operates the WeChat applet according to the mode that the WeChat applet obtains the corresponding program operation parameters, so that the operation process of the WeChat applet is optimized.
Example four
As shown in fig. 4, the applet running apparatus disclosed in this embodiment includes:
a short link obtaining module 410, configured to obtain a short link corresponding to an original link of an applet, where the short link includes a unique identifier of the original link;
a two-dimension code generating module 420, configured to generate a two-dimension code of the applet according to the short link;
a unique identifier obtaining module 430, configured to obtain a unique identifier of the original link carried in the two-dimensional code in response to an operation of starting the applet by scanning the two-dimensional code;
a program running parameter obtaining module 440, configured to obtain, by the applet server, a program running parameter corresponding to the unique identifier;
and an applet running module 450 configured to continue to run the applet based on the program running parameter.
Optionally, in some embodiments of the present application, the short link obtaining module 410 is further configured to:
sending an original link of an applet to the applet server;
and acquiring a short link generated by the applet server according to the prefix in the original link and the unique identifier after the unique identifier of the original link is generated according to the original link.
Optionally, in some embodiments of the present application, the short link obtaining module 410 is further configured to:
analyzing the program operation parameters of the small program carried in the original link;
and storing the corresponding relation between the unique identifier and the program operation parameter at the applet server.
Optionally, in some embodiments of the present application, the program operation parameter obtaining module 440 is further configured to:
and determining the program operation parameters corresponding to the unique identifier according to the corresponding relation stored by the applet server.
The applet running apparatus disclosed in this embodiment is configured to implement each step of the applet running method described in the first embodiment of the present application, and for specific implementation of each module of the apparatus, reference is made to the corresponding step, which is not described herein again.
The applet running device disclosed by the embodiment of the application obtains a short link corresponding to an original link of an applet, wherein the short link comprises a unique identifier of the original link; generating a two-dimensional code of the small program according to the short link; responding to the operation of starting the small program by scanning the two-dimensional code, and acquiring the unique identifier of the original link carried in the two-dimensional code; acquiring a program operation parameter corresponding to the unique identifier through an applet server; and based on the program operation parameters, the small program is continuously operated, so that the problem of low small program operation efficiency caused by high difficulty in two-dimensional code identification of the small program in the prior art is solved. The applet running device disclosed in the embodiment improves the processing flow of the applet and the applet server, converts the original link of the applet into the short link, and is used for generating the two-dimensional code, so that the recognition degree of the two-dimensional code of the applet is improved, and the running efficiency of the applet is improved.
In the prior art, for some complicated or long-length links, short link technology is generally used in the industry for optimization, and the realization principle is as follows: firstly, converting a complex link according to a certain rule to generate a unique identifier of the complex link; then, generating a new link address according to the unique identifier, wherein the link address is usually simpler and has a short length; when a user accesses the link through the browser, after a request reaches the short link server, the server finds the original link according to the identification, and then the browser redirects to the original link for access. Because the applet does not use the browser, the small program does not have a jump request called by the browser, and the access request of the short-chain grounding address can not be redirected to a long-link address by domain name redirection by using a common short-chain-link technology in the industry.
Therefore, when the method is implemented specifically, the running process of the small program and the data processing process of the small program server are improved simultaneously, the small program server generates the unique identifier of the original connection of the small program and stores the mapping relation between the unique identifier and the program running parameters of the small program, the small program provides the two-dimensional code generated by the short link only carrying the unique identifier externally, after the application program scans the code and enters the small program, the small program calls the small program server interface according to the unique identifier to obtain the actual running parameters, the original complex long-link two-dimensional code is shortened into the extremely simple short-link two-dimensional code, the definition and the identification degree of the ordinary link two-dimensional code of the small program are improved, and the running efficiency of the small program is improved.
EXAMPLE five
As shown in fig. 5, the applet running apparatus disclosed in this embodiment includes:
an original link receiving module 510, configured to receive an original link sent by an applet;
a short link returning module 520, configured to, in response to receiving the original link operation, generate a short link according to the original link, and return the short link, where the short link includes a unique identifier of the original link;
a unique identifier receiving module 530, configured to receive a unique identifier of the original link, which is obtained by scanning a two-dimensional code of the applet, where the two-dimensional code is generated according to the short link;
and a program operation parameter returning module 540, configured to return the program operation parameter of the applet corresponding to the unique identifier, so that the applet continues to operate based on the program operation parameter.
In some embodiments of the present application, the short link returning module 520 is further configured to:
generating a unique identifier of the original link according to the original link;
and generating a short link according to the prefix in the original link and the unique identification combination.
In some embodiments of the present application, the short link returning module 520 is further configured to:
analyzing the program operation parameters of the small program carried in the original link;
and storing the corresponding relation between the unique identification and the program operation parameters.
In some embodiments of the present application, the program operation parameter returning module 540 is further configured to:
and determining the program operation parameters corresponding to the unique identifier according to the stored corresponding relation.
The applet running apparatus disclosed in this embodiment is configured to implement each step of the applet running method described in the second embodiment of this application, and for specific implementation of each module of the apparatus, reference is made to the corresponding step, which is not described herein again.
The applet running device disclosed by the embodiment of the application receives the original link sent by the applet; in response to receiving the original link operation, generating a short link according to the original link, and returning the short link, wherein the short link comprises a unique identifier of the original link; receiving a unique identifier of the original link, which is obtained by scanning a two-dimensional code of the applet, wherein the two-dimensional code is generated according to the short link; and returning the program operating parameters of the small program corresponding to the unique identifier, so that the small program continues to operate based on the program operating parameters, and the problem of low small program operating efficiency caused by high difficulty in two-dimension code identification of the small program in the prior art is solved. According to the small program running device disclosed by the embodiment of the application, the processing flow of the small program and the small program server is improved, the original link of the small program is converted into the short link for generating the two-dimensional code, and the recognition degree of the two-dimensional code of the small program is improved, so that the running efficiency of the small program is improved; the operating parameters of the small program are mapped into the unique identifier and carried by the short link, and then the corresponding mapping relation is stored in the server, so that the small program can further obtain the actual program operating parameters after being started, the subsequent processing can be continuously executed, and the original functions of the small program are realized. According to the small program running method disclosed by the embodiment of the application, under the condition that the normal running of the small program is ensured, the running efficiency of the small program is improved by simplifying the two-dimensional code of the small program.
Correspondingly, the application also discloses an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the computer program to realize the applet running method according to the first embodiment and/or the second embodiment. The electronic device can be a PC, a mobile terminal, a personal digital assistant, a tablet computer and the like.
The application also discloses a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps of the applet running method as described in the first and/or second embodiment of the application.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The above describes in detail a method and an apparatus for running an applet provided by the present application, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the above embodiment is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.

Claims (12)

1. An applet operating method comprising:
acquiring a short link corresponding to an original link of an applet, wherein the short link comprises a unique identifier of the original link;
generating a two-dimensional code of the small program according to the short link, wherein the two-dimensional code of the small program does not contain program operation parameters of the small program;
responding to the operation of starting the small program by scanning the two-dimensional code, starting the small program through a short link carried in the two-dimensional code, and acquiring a unique identifier of the original link carried in the two-dimensional code by the small program;
the applet sends the unique identifier to the applet server;
acquiring a program operation parameter corresponding to the unique identifier through an applet server;
and continuing to operate the small program based on the program operation parameters.
2. The method of claim 1, wherein the step of obtaining the short link corresponding to the original link of the applet comprises:
sending an original link of an applet to the applet server;
and acquiring a short link generated by the applet server according to the prefix in the original link and the unique identifier after the unique identifier of the original link is generated according to the original link.
3. The method of claim 2, wherein the step of obtaining a short link corresponding to an original link of an applet further comprises:
analyzing the program operation parameters of the small program carried in the original link;
and storing the corresponding relation between the unique identifier and the program operation parameter at the applet server.
4. The method according to claim 3, wherein the step of obtaining, by the applet service, the program operating parameters corresponding to the unique identifier comprises:
and determining the program operation parameters corresponding to the unique identifier according to the corresponding relation stored by the applet server.
5. An applet operating method comprising:
receiving an original link sent by an applet;
in response to receiving the original link operation, generating a short link according to the original link, and returning the short link, wherein the short link comprises a unique identifier of the original link;
receiving a unique identifier of the original link sent by the started small program, wherein the two-dimensional code of the small program is generated according to the short link and does not contain program operation parameters of the small program; the unique identifier of the original link is started through a short link carried in the two-dimensional code of the small program after the two-dimensional code of the small program is scanned;
and returning the program operation parameters of the small program corresponding to the unique identifier, so that the small program continues to operate based on the program operation parameters.
6. The method of claim 5, wherein the step of generating the short link from the original link comprises:
generating a unique identifier of the original link according to the original link;
and generating a short link according to the prefix in the original link and the unique identification combination.
7. The method of claim 6, wherein the step of generating the short link from the original link further comprises:
analyzing the program operation parameters of the small program carried in the original link;
and storing the corresponding relation between the unique identification and the program operation parameters.
8. The method of claim 7, wherein the step of returning program operating parameters of the applet corresponding to the unique identifier comprises:
and determining the program operation parameters corresponding to the unique identifier according to the stored corresponding relation.
9. An applet operating apparatus, comprising:
the short link acquisition module is used for acquiring a short link corresponding to an original link of an applet, wherein the short link comprises a unique identifier of the original link;
the two-dimensional code generating module is used for generating a two-dimensional code of the small program according to the short link, wherein the two-dimensional code of the small program does not contain the program operation parameters of the small program;
the unique identifier acquisition module is used for responding to the operation of starting the small program by scanning the two-dimensional code, starting the small program through a short link carried in the two-dimensional code, and acquiring the unique identifier of the original link carried in the two-dimensional code by the small program;
the program operation parameter acquisition module is used for acquiring the program operation parameters corresponding to the unique identifier through the applet server after the applet sends the unique identifier to the applet server;
and the small program running module is used for continuously running the small program based on the program running parameters.
10. An applet operating apparatus, comprising:
the original link receiving module is used for receiving an original link sent by the applet;
the short link returning module is used for responding to the received original link operation, generating a short link according to the original link and returning the short link, wherein the short link comprises a unique identifier of the original link;
the unique identifier receiving module is used for receiving the unique identifier of the original link, which is sent by the started small program, wherein the two-dimensional code of the small program is generated according to the short link, and the two-dimensional code of the small program does not contain the program operating parameters of the small program; the unique identifier of the original link is started through a short link carried in the two-dimensional code of the small program after the two-dimensional code of the small program is scanned;
and the program operation parameter returning module is used for returning the program operation parameters of the small program corresponding to the unique identifier so that the small program can continuously operate based on the program operation parameters.
11. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the applet running method according to any one of claims 1 to 8 when executing the computer program.
12. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the steps of the applet running method as claimed in any one of the claims 1 to 8.
CN201910024134.XA 2019-01-10 2019-01-10 Applet running method and device, electronic equipment and storage medium Active CN109582395B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910024134.XA CN109582395B (en) 2019-01-10 2019-01-10 Applet running method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910024134.XA CN109582395B (en) 2019-01-10 2019-01-10 Applet running method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109582395A CN109582395A (en) 2019-04-05
CN109582395B true CN109582395B (en) 2022-05-17

Family

ID=65916529

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910024134.XA Active CN109582395B (en) 2019-01-10 2019-01-10 Applet running method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109582395B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110134889B (en) * 2019-04-30 2021-08-10 中国联合网络通信集团有限公司 Short link generation method and device and server
CN110191046A (en) * 2019-05-31 2019-08-30 成都依能科技股份有限公司 Document transmission system and method based on wechat
CN110569642A (en) * 2019-09-02 2019-12-13 紫光云技术有限公司 Micro-service management platform based on small programs
CN110825451B (en) * 2019-09-30 2023-07-25 五八有限公司 Configuration and verification method and device for applet page address
CN111222062B (en) * 2020-01-09 2021-06-01 百度在线网络技术(北京)有限公司 Applet running method and device, electronic equipment and storage medium
CN113254813B (en) * 2020-02-13 2023-07-18 多点(深圳)数字科技有限公司 Short link generation method, device, server and computer readable medium
CN112347382A (en) * 2020-09-25 2021-02-09 北京淇瑀信息科技有限公司 Product page sharing method and device and electronic equipment
CN112433788A (en) * 2020-11-23 2021-03-02 百度在线网络技术(北京)有限公司 Applet running method and device, electronic equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103632184A (en) * 2013-12-13 2014-03-12 金蝶软件(中国)有限公司 Two-dimension code generation method, two-dimension code use method, two-dimension code generator and user equipment
CN104680114B (en) * 2015-03-03 2018-06-01 深圳家电网科技实业股份有限公司 One Quick Response Code handles the method and its system of multiple requests
CN108345597A (en) * 2017-01-22 2018-07-31 阿里巴巴集团控股有限公司 Generate graphic code, page info access processing method and device

Also Published As

Publication number Publication date
CN109582395A (en) 2019-04-05

Similar Documents

Publication Publication Date Title
CN109582395B (en) Applet running method and device, electronic equipment and storage medium
CN102438067B (en) Method for installing mobile phone software by mobile phone scanning two-dimension code
CN107145784B (en) Vulnerability scanning method and device and computer readable medium
US10360694B2 (en) Methods and devices for image loading and methods and devices for video playback
CN104168517B (en) Into the method and system of direct broadcast band
US10902232B2 (en) Service process starting method and apparatus
CN107341106B (en) Application compatibility detection method, development terminal and storage medium
CN110727417A (en) Data processing method and device
CN113360300B (en) Interface call link generation method, device, equipment and readable storage medium
CN107741850B (en) Method and device for generating dynamic wallpaper package and storage medium
CN113703734A (en) Applet generation method and device, electronic equipment and storage medium
CN114356464A (en) User interface adaptation method, rendering method, device, equipment and storage medium
CN111324832A (en) Method, system, device and medium for accessing website through short network address
CN115795212A (en) Page display method and device, electronic equipment and storage medium
CN111625242B (en) Project code deleting method and device, electronic equipment and storage medium
CN109558138A (en) Progeny selection device processing method and processing device
CN106547746B (en) Data sending method and device
WO2023024714A1 (en) Static analysis method, apparatus, and device, and computer-readable storage medium
CN114338240B (en) Vulnerability scanning method and device
Würsch et al. Turning Document Image Analysis Methods into Web Services-An Example Using OCRopus
CN108632339A (en) A kind of method and system of dynamic select server
CN110704055B (en) Interface preposition optimization method and device, electronic equipment and storage medium
CN113886742A (en) Page display method, device, equipment, server, system and storage medium
CN107153675B (en) Webpage access method and system and webpage information transmission method
CN116700836A (en) Asynchronous network request processing state acquisition method and device 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
GR01 Patent grant
GR01 Patent grant