CN111931104A - Instruction execution method and device, computer equipment and computer readable storage medium - Google Patents

Instruction execution method and device, computer equipment and computer readable storage medium Download PDF

Info

Publication number
CN111931104A
CN111931104A CN202010668320.XA CN202010668320A CN111931104A CN 111931104 A CN111931104 A CN 111931104A CN 202010668320 A CN202010668320 A CN 202010668320A CN 111931104 A CN111931104 A CN 111931104A
Authority
CN
China
Prior art keywords
instruction
preset
page
response
logic
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.)
Pending
Application number
CN202010668320.XA
Other languages
Chinese (zh)
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.)
Koubei Shanghai Information Technology Co Ltd
Original Assignee
Koubei Shanghai Information 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 Koubei Shanghai Information Technology Co Ltd filed Critical Koubei Shanghai Information Technology Co Ltd
Priority to CN202010668320.XA priority Critical patent/CN111931104A/en
Publication of CN111931104A publication Critical patent/CN111931104A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses an instruction execution method, an instruction execution device, computer equipment and a computer-readable storage medium, and relates to the technical field of Internet. The method comprises the following steps: when the operation behavior of a user is detected, generating an operation instruction, and transmitting the operation instruction; receiving a response instruction; executing a response instruction, and acquiring a response page in a target page path indicated by the response instruction; and displaying the response page.

Description

Instruction execution method and device, computer equipment and computer readable storage medium
Technical Field
The present invention relates to the field of internet technologies, and in particular, to an instruction execution method, an instruction execution apparatus, a computer device, and a computer-readable storage medium.
Background
With the continuous development of the internet technology, more and more programs are supported and run by the terminal, and people can efficiently and accurately complete the processing of data through the programs, so that great convenience is brought to life and work. The traditional program is not convenient to use only by downloading and installing in a terminal, so that a small program is derived at present. The applet is a program which can be used without downloading and installing, the use time cost and the storage space of the terminal can be saved for people, and in the actual use process, a user can directly enter the applet only by searching the corresponding applet, so that the applet is controlled to execute instructions, and the applet can be experienced.
In the related art, the applet is generally integrated by a component and template method, a page of the applet is generated according to the template, the page is associated according to execution logic through the component, and various instructions are embedded in the applet and the applet is issued. Thus, when a user requests execution of a certain instruction, such as a page jump, a confirmation popup, etc., the applet directly executes the instruction locally according to the execution logic.
In the process of implementing the invention, the inventor finds that the related art has at least the following problems:
the currently issued small program is a whole, various components and pages are associated, and instructions are embedded into the small program and can be issued after a series of examinations and approvals. If a developer wants to add an executable instruction to the applet, the configuration of the applet needs to be changed fundamentally, the added instruction is embedded into the applet, and the instruction can really reach a user after approval, so that the workload is large, the instruction reaching period is long, the process is complicated, and the intelligence is poor.
Disclosure of Invention
In view of the above, the present invention provides an instruction execution method, an instruction execution device, a computer apparatus, and a computer-readable storage medium, and mainly aims to solve the problems of a large workload, a long instruction tact period, a cumbersome process, and poor intelligence at present.
According to a first aspect of the present invention, there is provided an instruction execution method, applied to a client, including:
when the operation behavior of a user is detected, generating an operation instruction, and transmitting the operation instruction;
receiving a response instruction, wherein the response instruction is obtained by a cloud server according to an operation instruction query in an instruction logic after receiving the transmitted operation instruction, the instruction logic specifies a logic relationship among a plurality of preset instructions, and the response instruction is a next preset instruction in the logic relationship of a preset instruction which is the same as the operation instruction in the instruction logic;
executing the response instruction, and acquiring a response page in a target page path indicated by the response instruction;
and displaying the response page.
In another embodiment, the generating the operation instruction includes:
determining an occurrence page of the operation behavior, and acquiring an occurrence page identifier of the occurrence page;
identifying a trigger position of the operation behavior on the occurrence page, and extracting trigger content included in the trigger position;
packaging the generated page identifier and the trigger content to generate a trigger event;
and processing the trigger event based on an instruction engine to obtain the operation instruction.
In another embodiment, the obtaining a response page in the target page path indicated by the response instruction includes:
acquiring a preset page identifier in the response instruction;
and determining a page path bound by the preset page identifier as the target page path, accessing the target page path, and acquiring the response page.
In another embodiment, said presenting said response page comprises:
acquiring preset page elements;
rendering the response page by adopting the preset page elements, and displaying the rendered response page.
According to a second aspect of the present invention, there is provided an instruction execution method applied to a cloud server, including:
receiving an operation instruction, wherein the operation instruction is generated and transmitted according to an operation behavior of a user after the client detects the operation behavior;
inquiring a response instruction of the operation instruction based on instruction logic, wherein the instruction logic specifies a logic relationship among a plurality of preset instructions, and the response instruction is a next preset instruction of the preset instructions which are the same as the operation instruction in the instruction logic in the logic relationship;
and transmitting the response instruction so that the client acquires a response page in a target page path indicated by the response instruction after receiving the response instruction and displays the response page.
In another embodiment, before the receiving the operation instruction, the method further includes:
receiving program configuration parameters, and creating a plurality of preset events according to configuration functions indicated by the program configuration parameters, wherein each preset event in the plurality of preset events at least comprises a preset page identifier and preset operation contents;
determining a progressive sequence among the preset events according to a page display logic carried by the program configuration parameter, wherein the page display logic specifies a display sequence of a plurality of preset page identifiers included in the preset events;
creating a preset instruction for each preset event in the plurality of preset events based on instruction service to obtain the plurality of preset instructions;
and establishing a logic relation among the plurality of preset instructions according to the progressive sequence to obtain the instruction logic.
In another embodiment, the creating a plurality of preset events according to the configuration function indicated by the program configuration parameter includes:
extracting a plurality of configuration functions from the program configuration parameters;
for each configuration function in the plurality of configuration functions, acquiring component parameters and template parameters of the configuration function from the program configuration parameters;
rendering the component parameters and the template parameters based on a rendering engine to generate a preset page of the configuration function;
storing the preset page, determining the storage position of the preset page as a page path of the preset page, and binding the page path with a preset page identifier of the preset page;
extracting trigger-allowed content from the preset page, and combining the trigger-allowed content with the preset page identifier to obtain a preset event of the configuration function;
and respectively generating the preset event for each configuration function in the plurality of configuration functions to obtain the plurality of preset events.
In another embodiment, the instruction-based logic to query for a response instruction to the operation instruction includes:
analyzing the operation instruction to obtain a trigger event of the operation instruction, wherein the trigger event is generated by the client according to the operation behavior of the user and is processed by the client based on an instruction engine to obtain the operation instruction, and the trigger event at least comprises an occurrence page identifier and trigger content;
querying a target preset instruction corresponding to the trigger event in the instruction logic, wherein preset page identifiers and allowed trigger contents included in preset events depended by the target preset instruction during creation are consistent with the occurrence page identifiers and the trigger contents included in the trigger event;
and taking the next preset instruction of the target preset instruction in the instruction logic as the response instruction.
According to a third aspect of the present invention, there is provided an instruction execution apparatus comprising:
the generating module is used for generating an operation instruction and transmitting the operation instruction when the operation behavior of the user is detected;
the receiving module is used for receiving a response instruction, wherein the response instruction is obtained by querying the operation instruction in an instruction logic according to the operation instruction after the cloud server receives the transmitted operation instruction, the instruction logic specifies a logic relationship among a plurality of preset instructions, and the response instruction is a next preset instruction in the logic relationship of a preset instruction which is the same as the operation instruction in the instruction logic;
the execution module is used for executing the response instruction and acquiring a response page in a target page path indicated by the response instruction;
and the display module is used for displaying the response page.
In another embodiment, the generating module includes:
the acquisition unit is used for determining the occurrence page of the operation behavior and acquiring the occurrence page identification of the occurrence page;
the extracting unit is used for identifying the trigger position of the operation behavior on the occurrence page and extracting trigger content included in the trigger position;
the generating unit is used for packaging the occurrence page identifier and the triggering content to generate a triggering event;
and the processing unit is used for processing the trigger event based on an instruction engine to obtain the operation instruction.
In another embodiment, the execution module includes:
the obtaining unit is used for obtaining a preset page identifier in the response instruction;
and the access unit is used for determining a page path bound by the preset page identifier as the target page path, accessing the target page path and acquiring the response page.
In another embodiment, the display module includes:
the acquiring unit is used for acquiring preset page elements;
and the display unit is used for rendering the response page by adopting the preset page elements and displaying the rendered response page.
According to a fourth aspect of the present invention, there is provided an instruction execution apparatus comprising:
the receiving module is used for receiving an operation instruction, and the operation instruction is generated and transmitted according to the operation behavior after the client detects the operation behavior of the user;
the query module is used for querying a response instruction of the operation instruction based on instruction logic, the instruction logic specifies a logic relationship among a plurality of preset instructions, and the response instruction is a next preset instruction in the logic relationship of a preset instruction which is the same as the operation instruction in the instruction logic;
and the transmission module is used for transmitting the response instruction so that the client acquires a response page in a target page path indicated by the response instruction after receiving the response instruction and displays the response page.
In another embodiment, the apparatus further comprises:
the system comprises a first establishing module, a second establishing module and a third establishing module, wherein the first establishing module is used for receiving program configuration parameters and establishing a plurality of preset events according to a configuration function indicated by the program configuration parameters, and each preset event in the plurality of preset events at least comprises a preset page identifier and preset operation content;
a determining module, configured to determine a progressive order among the multiple preset events according to a page display logic carried by the program configuration parameter, where the page display logic specifies a display order of multiple preset page identifiers included in the multiple preset events;
the second creating module is used for creating a preset instruction for each preset event in the plurality of preset events based on instruction service to obtain the plurality of preset instructions;
and the establishing module is used for establishing the logic relationship among the plurality of preset instructions according to the progressive sequence to obtain the instruction logic.
In another embodiment, the first creating module includes:
an extracting unit configured to extract a plurality of configuration functions in the program configuration parameters;
an obtaining unit, configured to obtain, for each configuration function of the plurality of configuration functions, a component parameter and a template parameter of the configuration function from the program configuration parameters;
the rendering unit is used for rendering the component parameters and the template parameters based on a rendering engine to generate a preset page of the configuration function;
the storage unit is used for storing the preset page, determining the storage position of the preset page as a page path of the preset page, and binding the page path with a preset page identifier of the preset page;
the combination unit is used for extracting the trigger-allowed content from the preset page, and combining the trigger-allowed content with the preset page identifier to obtain a preset event of the configuration function;
and the generating unit is used for generating the preset event for each configuration function in the plurality of configuration functions respectively to obtain the plurality of preset events.
In another embodiment, the query module includes:
the analysis unit is used for analyzing the operation instruction to obtain a trigger event of the operation instruction, the trigger event is generated by the client according to the operation behavior of the user, the client processes the trigger event based on an instruction engine to obtain the operation instruction, and the trigger event at least comprises an occurrence page identifier and trigger content;
a query unit, configured to query, in the instruction logic, a target preset instruction corresponding to the trigger event, where preset page identifiers and allowed trigger contents included in preset events that the target preset instruction depends on when being created are consistent with the occurrence page identifiers and the trigger contents included in the trigger event;
and the determining unit is used for taking the next preset instruction of the target preset instruction in the instruction logic as the response instruction.
According to a fifth aspect of the present invention, there is provided a computer device comprising a memory storing a computer program and a processor implementing the steps of the method of the first and second aspects when the computer program is executed.
According to a sixth aspect of the present invention, there is provided a readable storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the method of the first and second aspects described above.
By the technical scheme, the invention provides the instruction execution method, the instruction execution device, the computer equipment and the computer readable storage medium, when the client detects the operation behavior of the user, the invention generates the operation instruction and transmits the operation instruction, and receiving the response command obtained by the cloud server in the command logic which stipulates the logic relationship among a plurality of preset commands after obtaining the transmitted operation command, executing the response command, the response page is acquired in the target page path indicated by the response instruction and displayed, so that the client only needs to display the page according to the response instruction without performing any calculation on related instructions, the instruction execution process and the instruction adding process are simplified, the dynamic of the small program is realized, the workload is reduced, the instruction touch period is shortened, and the intelligence is better.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1A is a flow chart illustrating a method for executing instructions according to an embodiment of the present invention;
FIG. 1B is a flowchart illustrating a method for executing instructions according to an embodiment of the present invention;
FIG. 2 is an interaction diagram illustrating a method for executing instructions according to an embodiment of the present invention;
FIG. 3A is a block diagram of an instruction execution apparatus according to an embodiment of the present invention;
FIG. 3B is a block diagram of an instruction execution apparatus according to an embodiment of the present invention;
FIG. 3C is a block diagram of an instruction execution apparatus according to an embodiment of the present invention;
FIG. 3D is a block diagram of an instruction execution apparatus according to an embodiment of the present invention;
FIG. 4A is a block diagram of an instruction execution apparatus according to an embodiment of the present invention;
FIG. 4B is a block diagram of an instruction execution apparatus according to an embodiment of the present invention;
FIG. 4C is a block diagram of an instruction execution apparatus according to an embodiment of the present invention;
FIG. 4D is a block diagram of an instruction execution apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram illustrating an apparatus for executing an instruction according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
An embodiment of the present invention provides an instruction execution method, as shown in fig. 1A, where the method is applied to a client, and includes:
101. and when the client detects the operation behavior of the user, generating an operation instruction and transmitting the operation instruction.
102. The client receives a response instruction, the response instruction is obtained by the cloud server according to the query of the operation instruction in the instruction logic after receiving the transmitted operation instruction, the instruction logic specifies the logic relationship among a plurality of preset instructions, and the response instruction is the next preset instruction in the logic relationship of the preset instruction which is the same as the operation instruction in the instruction logic.
103. And the client executes the response instruction and acquires the response page in the target page path indicated by the response instruction.
104. The client presents a response page.
According to the method provided by the embodiment of the invention, when the client detects the operation behavior of the user, the operation instruction is generated and transmitted, the response instruction obtained by the cloud server is inquired according to the operation instruction in the instruction logic which specifies the logic relationship among the preset instructions after the transmitted operation instruction is obtained, the response instruction is executed, and the response page is obtained and displayed in the target page path indicated by the response instruction, so that the client only needs to display the page according to the response instruction without calculating any related instruction, the instruction execution process and the instruction increasing process are simplified, the small program is dynamic, the workload is reduced, the instruction touch period is shortened, and the intelligence is better.
An embodiment of the present invention provides an instruction execution method, as shown in fig. 1B, where the method is applied to a cloud server, and includes:
105. the cloud server receives an operation instruction, and the operation instruction is generated and transmitted according to an operation behavior after the client detects the operation behavior of the user.
106. The cloud server inquires a response instruction of the operation instruction based on the instruction logic, the instruction logic specifies a logic relationship among a plurality of preset instructions, and the response instruction is a next preset instruction in the logic relationship of the preset instruction which is the same as the operation instruction in the instruction logic.
107. And the cloud server transmits the response instruction so that the client acquires the response page in the target page path indicated by the response instruction after receiving the response instruction and displays the response page.
According to the method provided by the embodiment of the invention, when the client detects the operation behavior of the user, the operation instruction is generated and transmitted, the cloud server is received and inquires the obtained response instruction according to the operation instruction in the instruction logic which specifies the logic relationship among the preset instructions after acquiring the transmitted operation instruction, the response instruction is executed, and the response page is acquired and displayed in the target page path indicated by the response instruction, so that the client only needs to display the page according to the response instruction without calculating any related instruction, the instruction execution process and the instruction increasing process are simplified, the small program is dynamic, the workload is reduced, the instruction touch period is shortened, and the intelligence is better.
An embodiment of the present invention provides an instruction execution method, as shown in fig. 2, relating to interaction between a cloud server and a client, the method including:
201. when the client detects the operation behavior of the user, an operation instruction is generated and transmitted to the cloud server.
The inventor realizes that at present, a plurality of applets are integrated in a component and template mode, pages of the applets are generated according to the templates, the pages are associated according to execution logic through the components, and various instructions are built in the applets and the applets are issued. Thus, when a user requests execution of a certain instruction, such as a page jump, a confirmation popup, etc., the applet directly executes the instruction locally according to the execution logic. The instruction execution mode is a local execution mode in essence, that is, the instructions are all embedded in the applet, and the applet executes the corresponding page jump, confirmation popup instruction, and the like according to the embedded instructions. However, the applet has no dynamic capability, which instructions can be executed all the time when the applet is issued, and if the applet is expected to execute more instructions or a certain instruction of the applet fails in the subsequent operation process and cannot be used, the configuration of the applet needs to be modified, and the modified applet is approved by a third party providing the applet so that the instruction can really reach the user. The invention therefore proposes a method of instruction execution, separating the execution of instructions from the validation of instructions, instruction logic and a page corresponding to each instruction are set in the cloud server in advance, and after the client receives the instruction of the user, the command is transmitted to the cloud server, the cloud server determines how to respond to the command, which page should be displayed, and feeds the contents back to the client in a response instruction mode, the client only needs to display the page according to the response instruction without calculating any related instruction, if functions are required to be added to the small program subsequently, the instruction logic is directly modified in the cloud server and corresponding pages are added, operations such as auditing, publishing and the like do not need to be carried out on the client again, the instruction execution process is simplified, the dynamic of the small program is realized, and the daily modification requirement of the small program is met.
As can be seen from the above description, if the client detects an instruction issued by the user, the client directly transmits the instruction to the cloud server for calculation and response, so in the embodiment of the present invention, when the client detects an operation behavior of the user, an operation instruction is generated and transmitted to the cloud server. When the operation instruction is generated, in order to clearly inform the cloud server of which page the user requests to access which content, so that the cloud server can correctly feed back the operation of the user, the client determines the occurrence page of the operation behavior, and obtains the occurrence page identifier of the occurrence page. And then, identifying the triggering position of the operation behavior on the occurrence page, extracting triggering content included in the triggering position, packaging the occurrence page identification and the triggering content to generate a triggering event, processing the triggering event based on an instruction engine to obtain an operation instruction, and transmitting the operation instruction to a cloud server for analysis and calculation. For example, assuming that the user triggers the location of the shopping cart on a dish display page provided by an applet at the client, it may be determined that the occurrence page is the dish display page, and a page identifier of the dish display page is obtained as the occurrence page identifier. Further, the user also triggers the position of the shopping cart, the triggering content can be determined to be the shopping cart according to the triggering position, the generated triggering event can be in a 'dish display page + shopping cart' mode, and the mode of the triggering event is not specifically limited by the invention. It should be noted that the instruction engine is arranged in the client, and because the reason that the interaction exists between the cloud server and the client is to ensure the correct response of the instructions, and the logic relationship between the instructions is set in the cloud server in advance, in order to realize the transmission of the instructions and the determination of the response instructions, the instruction engine is arranged in the client, and the instruction engine can assemble the instructions, analyze the instructions, receive the instructions and send the instructions, thereby ensuring the normal instruction transmission between the client and the cloud server.
202. The cloud server receives the operation instruction, and queries a response instruction of the operation instruction based on the instruction logic.
In the embodiment of the invention, in order to enable the cloud server to correctly inform the client of which kind of reaction is performed and which page is displayed after receiving the operation instruction transmitted by the client, the cloud server needs to set possible instructions generated by the client and stipulate the logical relationship among the instructions, so that when the operation instruction transmitted by the client is received, feedback can be given to the client according to the logical relationship.
The cloud server is provided with instruction logic, the instruction logic specifies a logic relationship among a plurality of preset instructions, and the forming process of the instruction logic is as follows: firstly, receiving program configuration parameters, and creating a plurality of preset events according to configuration functions indicated by the program configuration parameters, wherein each preset event in the plurality of preset events at least comprises a preset page identifier and preset operation contents. That is, the developer provides the program configuration parameters of the applet in the client to the cloud server, and according to the program configuration parameters, the cloud server can determine the configuration functions that can be implemented by the applet on the client, and the configuration functions are all used for providing services for the user. Further, when creating the preset event, the preset event is dependent on the configuration function, and only if the configuration function is provided, the user has the possibility of using the configuration function, and further generates the operation event, so that a plurality of configuration functions need to be extracted from the program configuration parameters. For each configuration function in the multiple configuration functions, acquiring the component parameters and the template parameters of the configuration function from the program configuration parameters, and rendering the component parameters and the template parameters based on a rendering engine to generate a preset page of the configuration function. The page function can be formed based on the component parameters and the template parameters, and the generation operation of the preset page is realized by operating the page function. And then storing the preset page, determining the storage position of the preset page as the page path of the preset page, and binding the page path with the preset page identifier of the preset page. The process realizes the storage of preset pages with configuration functions, each preset page is divided into trigger-allowed content and trigger-forbidden content, and the trigger-allowed content is content which can be used for popping out a new page or closing some pages after being triggered by a user; the trigger prohibiting content is content that does not respond after being triggered by the user, such as characters in commodity details, and the trigger prohibiting content has no recorded value, so that the trigger permitting content needs to be extracted from a preset page, the trigger permitting content is combined with a preset page identifier to obtain a preset event of a configuration function, and the generated preset event predicts which content of which page the user may trigger in advance, so as to prepare other instructions for subsequent execution of the preset event. By repeatedly executing the process of generating the preset event, the preset event can be generated for each configuration function in the plurality of configuration functions respectively, so that a plurality of preset events are obtained.
And then, after a plurality of preset events are generated, the cloud server determines a progressive sequence among the preset events according to page display logic carried by the program configuration parameters. The page display logic specifies a display sequence of a plurality of preset page identifiers included in a plurality of preset events, that is, the page display logic specifies that a page C is displayed next if a position B in a current page A is triggered, and the preset events predict which contents of which page a user may trigger in advance and just correspond to the page display logic, so that a progressive sequence among the plurality of preset events can be determined according to the page display logic.
And finally, after a progressive sequence among the preset events is determined, establishing a preset instruction for each preset event in the preset events based on the instruction service to obtain a plurality of preset instructions, and establishing a logic relation among the preset instructions according to the progressive sequence to obtain instruction logic. It should be noted that, an instruction gateway may be arranged in the cloud server, and an instruction transmission process between the cloud server and the client is implemented by using the instruction gateway, so that after the generation of a plurality of preset instructions and the construction of instruction logic are completed, the cloud server may expose the plurality of preset instructions and the instruction logic to the instruction gateway, so that when the instruction gateway receives an operation instruction of the client, a response instruction may be directly fed back to the client according to the plurality of preset instructions and the instruction logic, the calculation pressure of the cloud server is reduced, and the instruction feedback speed is increased.
Through the process, the instruction logic is formed in the cloud server, and the client can start to respond to the operation instruction generated and transmitted according to the operation behavior after detecting the operation behavior of the user based on the instruction logic. Specifically, first, the cloud server needs to analyze the operation instruction to obtain a trigger event of the operation instruction. The trigger event includes an occurrence page identifier and trigger content, so that a target preset instruction corresponding to the trigger event can be inquired in the instruction logic subsequently according to the occurrence page identifier and the trigger content included in the trigger event, that is, a preset page identifier included in a preset event which is relied on during creation and a target preset instruction which allows the trigger content to be consistent with the occurrence page identifier and the trigger content included in the trigger event are determined, and a next preset instruction of the target preset instruction in the instruction logic is taken as a response instruction, so that the determined response instruction is the next preset instruction of the preset instruction which is the same as the operation instruction in the instruction logic and in a logic relationship, and thus the correctness of the response instruction is ensured.
203. And the cloud server transmits the response instruction to the client.
In the embodiment of the invention, after the cloud server determines the response instruction, the response instruction is transmitted to the client, so that the client acquires the response page in the target page path indicated by the response instruction after receiving the response instruction and displays the response page.
204. And the client receives the response instruction, executes the response instruction, and acquires the response page in the target page path indicated by the response instruction.
In the embodiment of the invention, after receiving the response instruction, the client can execute the response instruction and obtain the response page in the target page path only by the response instruction. The client side can acquire the preset page identifier in the response instruction, determine the page path bound by the preset page identifier as a target page path, access the target page path and acquire the response page.
205. The client presents a response page.
In the embodiment of the invention, the client displays the acquired response page to realize the feedback of the operation behavior of the user. In the process of practical application, different clients may have their own preset page elements, and the preset page elements may specify page resolution, page size, page decoration, and the like, so that, in order to make the displayed response page fit to the client, the client may also obtain the preset page elements, render the response page by using the preset page elements, and display the rendered response page.
According to the method provided by the embodiment of the invention, when the client detects the operation behavior of the user, the operation instruction is generated and transmitted, the response instruction obtained by the cloud server is inquired according to the operation instruction in the instruction logic which specifies the logic relationship among the preset instructions after the transmitted operation instruction is obtained, the response instruction is executed, and the response page is obtained and displayed in the target page path indicated by the response instruction, so that the client only needs to display the page according to the response instruction without calculating any related instruction, the instruction execution process and the instruction increasing process are simplified, the small program is dynamic, the workload is reduced, the instruction touch period is shortened, and the intelligence is better.
Further, as a specific implementation of the method shown in fig. 1A, an embodiment of the present invention provides an instruction execution apparatus, and as shown in fig. 3A, the apparatus includes: a generating module 301, a receiving module 302, an executing module 303 and a presenting module 304.
The generating module 301 is configured to generate an operation instruction when an operation behavior of a user is detected, and transmit the operation instruction;
the receiving module 302 is configured to receive a response instruction, where the response instruction is obtained by querying, in an instruction logic, according to the operation instruction after the cloud server receives the transmitted operation instruction, the instruction logic specifies a logical relationship among a plurality of preset instructions, and the response instruction is a next preset instruction in the logical relationship of a preset instruction in the instruction logic, where the preset instruction is the same as the operation instruction;
the executing module 303 is configured to execute the response instruction, and obtain a response page in a target page path indicated by the response instruction;
the display module 304 is configured to display the response page.
In a specific application scenario, as shown in fig. 3B, the generating module 301 includes: an acquisition unit 3011, an extraction unit 3012, a generation unit 3013, and a processing unit 3014.
The obtaining unit 3011 is configured to determine an occurrence page of the operation behavior, and obtain an occurrence page identifier of the occurrence page;
the extracting unit 3012 is configured to identify a trigger position of the operation behavior on the occurrence page, and extract trigger content included in the trigger position;
the generating unit 3013 is configured to package the occurrence page identifier and the trigger content, and generate a trigger event;
the processing unit 3014 is configured to process the trigger event based on an instruction engine to obtain the operation instruction.
In a specific application scenario, as shown in fig. 3C, the executing module 303 includes: an acquisition unit 3031 and an access unit 3032.
The obtaining unit 3031 is configured to obtain a preset page identifier in the response instruction;
the accessing unit 3032 is configured to determine a page path bound to the preset page identifier as the target page path, access the target page path, and acquire the response page.
In a specific application scenario, as shown in fig. 3D, the presentation module 304 includes: an acquiring unit 3041 and a display unit 3042.
The obtaining unit 3041, configured to obtain a preset page element;
the displaying unit 3042 is configured to render the response page by using the preset page element, and display the rendered response page.
According to the device provided by the embodiment of the invention, when the client detects the operation behavior of the user, the operation instruction is generated and transmitted, the response instruction obtained by the cloud server is inquired according to the operation instruction in the instruction logic which specifies the logic relationship among the preset instructions after the transmitted operation instruction is obtained, the response instruction is executed, and the response page is obtained and displayed in the target page path indicated by the response instruction, so that the client only needs to display the page according to the response instruction without calculating any related instruction, the instruction execution process and the instruction increasing process are simplified, the small program is dynamic, the workload is reduced, the instruction touch period is shortened, and the intelligence is better.
Further, as a specific implementation of the method shown in fig. 1B, an embodiment of the present invention provides an instruction execution apparatus, and as shown in fig. 4A, the apparatus includes: a receiving module 401, a querying module 402 and a transmitting module 403.
The receiving module 401 is configured to receive an operation instruction, where the operation instruction is generated and transmitted according to an operation behavior of a user after the client detects the operation behavior;
the query module 402 is configured to query a response instruction of the operation instruction based on instruction logic, where the instruction logic specifies a logical relationship among a plurality of preset instructions, and the response instruction is a next preset instruction in the logical relationship of a preset instruction in the instruction logic that is the same as the operation instruction;
the transmission module 403 is configured to transmit the response instruction, so that the client obtains a response page in a target page path indicated by the response instruction after receiving the response instruction and displays the response page.
In a specific application scenario, as shown in fig. 4B, the apparatus further includes: a first creation module 404, a determination module 405, a second creation module 406, and a setup module 407.
The first creating module 404 is configured to receive a program configuration parameter, create a plurality of preset events according to a configuration function indicated by the program configuration parameter, where each preset event in the plurality of preset events at least includes a preset page identifier and preset operation content;
the determining module 405 is configured to determine a progressive order among the multiple preset events according to a page display logic carried by the program configuration parameter, where the page display logic specifies a display order of multiple preset page identifiers included in the multiple preset events;
the second creating module 406 is configured to create a preset instruction for each preset event in the plurality of preset events based on an instruction service, so as to obtain the plurality of preset instructions;
the establishing module 407 is configured to establish a logical relationship between the plurality of preset instructions according to the progressive order, so as to obtain the instruction logic.
In a specific application scenario, as shown in fig. 4C, the first creating module 404 includes: the system comprises an extraction unit 4041, an acquisition unit 4042, a rendering unit 4043, a storage unit 4044, a combination unit 4045 and a generation unit 4046.
The extracting unit 4041 is configured to extract a plurality of configuration functions from the program configuration parameters;
the obtaining unit 4042, configured to obtain, for each configuration function in the plurality of configuration functions, a component parameter and a template parameter of the configuration function from the program configuration parameters;
the rendering unit 4043 is configured to render the component parameters and the template parameters based on a rendering engine, and generate a preset page of the configuration function;
the storage unit 4044 is configured to store the preset page, determine a storage location of the preset page as a page path of the preset page, and bind the page path and a preset page identifier of the preset page;
the combining unit 4045 is configured to extract the trigger-allowed content from the preset page, and combine the trigger-allowed content and the preset page identifier to obtain a preset event of the configuration function;
the generating unit 4046 is configured to generate the preset event for each configuration function of the multiple configuration functions, respectively, to obtain the multiple preset events.
In a specific application scenario, as shown in fig. 4D, the query module 402 includes: a parsing unit 4021, a query unit 4022, and a determination unit 4023.
The parsing unit 4021 is configured to parse the operation instruction to obtain a trigger event of the operation instruction, where the trigger event is generated by the client according to an operation behavior of a user, and the client processes the trigger event based on an instruction engine to obtain the operation instruction, and the trigger event at least includes an occurrence page identifier and trigger content;
the querying unit 4022 is configured to query, in the instruction logic, a target preset instruction corresponding to the trigger event, where the preset page identifier and the allowable trigger content included in the preset event that the target preset instruction depends on when being created are consistent with the occurrence page identifier and the trigger content included in the trigger event;
the determining unit 4023 is configured to use a next preset instruction of the target preset instruction in the instruction logic as the response instruction.
According to the device provided by the embodiment of the invention, when the client detects the operation behavior of the user, the operation instruction is generated and transmitted, the response instruction obtained by the cloud server is inquired according to the operation instruction in the instruction logic which specifies the logic relationship among the preset instructions after the transmitted operation instruction is obtained, the response instruction is executed, and the response page is obtained and displayed in the target page path indicated by the response instruction, so that the client only needs to display the page according to the response instruction without calculating any related instruction, the instruction execution process and the instruction increasing process are simplified, the small program is dynamic, the workload is reduced, the instruction touch period is shortened, and the intelligence is better.
It should be noted that other corresponding descriptions of the functional units involved in the instruction execution device provided in the embodiment of the present invention may refer to the corresponding descriptions in fig. 1A to fig. 1B and fig. 2, and are not repeated herein.
In an exemplary embodiment, referring to fig. 5, there is further provided a device 500, which includes a communication bus, a processor, a memory, and a communication interface, and may further include an input/output interface and a display device, wherein the functional units may communicate with each other through the bus. The memory stores computer programs, and the processor is used for executing the programs stored in the memory and executing the instruction execution method in the embodiment.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method performed by the instructions.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present application can be implemented by hardware, and also by software plus a necessary general hardware platform. Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the implementation scenarios of the present application.
Those skilled in the art will appreciate that the figures are merely schematic representations of one preferred implementation scenario and that the blocks or flow diagrams in the figures are not necessarily required to practice the present application.
Those skilled in the art will appreciate that the modules in the devices in the implementation scenario may be distributed in the devices in the implementation scenario according to the description of the implementation scenario, or may be located in one or more devices different from the present implementation scenario with corresponding changes. The modules of the implementation scenario may be combined into one module, or may be further split into a plurality of sub-modules.
The above application serial numbers are for description purposes only and do not represent the superiority or inferiority of the implementation scenarios.
The above disclosure is only a few specific implementation scenarios of the present application, but the present application is not limited thereto, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present application.

Claims (10)

1. An instruction execution method, comprising:
when the operation behavior of a user is detected, generating an operation instruction, and transmitting the operation instruction;
receiving a response instruction, wherein the response instruction is obtained by a cloud server according to an operation instruction query in an instruction logic after receiving the transmitted operation instruction, the instruction logic specifies a logic relationship among a plurality of preset instructions, and the response instruction is a next preset instruction in the logic relationship of a preset instruction which is the same as the operation instruction in the instruction logic;
executing the response instruction, and acquiring a response page in a target page path indicated by the response instruction;
and displaying the response page.
2. The method of claim 1, wherein the generating the operation instruction comprises:
determining an occurrence page of the operation behavior, and acquiring an occurrence page identifier of the occurrence page;
identifying a trigger position of the operation behavior on the occurrence page, and extracting trigger content included in the trigger position;
packaging the generated page identifier and the trigger content to generate a trigger event;
and processing the trigger event based on an instruction engine to obtain the operation instruction.
3. The method of claim 1, the fetching a response page in a target page path indicated by the response instruction, comprising:
acquiring a preset page identifier in the response instruction;
and determining a page path bound by the preset page identifier as the target page path, accessing the target page path, and acquiring the response page.
4. The method of claim 1, wherein said presenting the response page comprises:
acquiring preset page elements;
rendering the response page by adopting the preset page elements, and displaying the rendered response page.
5. An instruction execution method, comprising:
receiving an operation instruction, wherein the operation instruction is generated and transmitted according to an operation behavior of a user after the client detects the operation behavior;
inquiring a response instruction of the operation instruction based on instruction logic, wherein the instruction logic specifies a logic relationship among a plurality of preset instructions, and the response instruction is a next preset instruction of the preset instructions which are the same as the operation instruction in the instruction logic in the logic relationship;
and transmitting the response instruction so that the client acquires a response page in a target page path indicated by the response instruction after receiving the response instruction and displays the response page.
6. The method of claim 5, wherein prior to receiving the operation instruction, the method further comprises:
receiving program configuration parameters, and creating a plurality of preset events according to configuration functions indicated by the program configuration parameters, wherein each preset event in the plurality of preset events at least comprises a preset page identifier and preset operation contents;
determining a progressive sequence among the preset events according to a page display logic carried by the program configuration parameter, wherein the page display logic specifies a display sequence of a plurality of preset page identifiers included in the preset events;
creating a preset instruction for each preset event in the plurality of preset events based on instruction service to obtain the plurality of preset instructions;
and establishing a logic relation among the plurality of preset instructions according to the progressive sequence to obtain the instruction logic.
7. The method of claim 6, wherein the creating a plurality of preset events according to the configuration function indicated by the program configuration parameter comprises:
extracting a plurality of configuration functions from the program configuration parameters;
for each configuration function in the plurality of configuration functions, acquiring component parameters and template parameters of the configuration function from the program configuration parameters;
rendering the component parameters and the template parameters based on a rendering engine to generate a preset page of the configuration function;
storing the preset page, determining the storage position of the preset page as a page path of the preset page, and binding the page path with a preset page identifier of the preset page;
extracting trigger-allowed content from the preset page, and combining the trigger-allowed content with the preset page identifier to obtain a preset event of the configuration function;
and respectively generating the preset event for each configuration function in the plurality of configuration functions to obtain the plurality of preset events.
8. The method of claim 5, wherein the querying the response instructions of the operation instructions based on the instruction logic comprises:
analyzing the operation instruction to obtain a trigger event of the operation instruction, wherein the trigger event is generated by the client according to the operation behavior of the user and is processed by the client based on an instruction engine to obtain the operation instruction, and the trigger event at least comprises an occurrence page identifier and trigger content;
querying a target preset instruction corresponding to the trigger event in the instruction logic, wherein preset page identifiers and allowed trigger contents included in preset events depended by the target preset instruction during creation are consistent with the occurrence page identifiers and the trigger contents included in the trigger event;
and taking the next preset instruction of the target preset instruction in the instruction logic as the response instruction.
9. An instruction execution apparatus, comprising:
the generating module is used for generating an operation instruction and transmitting the operation instruction when the operation behavior of the user is detected;
the receiving module is used for receiving a response instruction, wherein the response instruction is obtained by querying the operation instruction in an instruction logic according to the operation instruction after the cloud server receives the transmitted operation instruction, the instruction logic specifies a logic relationship among a plurality of preset instructions, and the response instruction is a next preset instruction in the logic relationship of a preset instruction which is the same as the operation instruction in the instruction logic;
the execution module is used for executing the response instruction and acquiring a response page in a target page path indicated by the response instruction;
and the display module is used for displaying the response page.
10. An instruction execution apparatus, comprising:
the receiving module is used for receiving an operation instruction, and the operation instruction is generated and transmitted according to the operation behavior after the client detects the operation behavior of the user;
the query module is used for querying a response instruction of the operation instruction based on instruction logic, the instruction logic specifies a logic relationship among a plurality of preset instructions, and the response instruction is a next preset instruction in the logic relationship of a preset instruction which is the same as the operation instruction in the instruction logic;
and the transmission module is used for transmitting the response instruction so that the client acquires a response page in a target page path indicated by the response instruction after receiving the response instruction and displays the response page.
CN202010668320.XA 2020-07-13 2020-07-13 Instruction execution method and device, computer equipment and computer readable storage medium Pending CN111931104A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010668320.XA CN111931104A (en) 2020-07-13 2020-07-13 Instruction execution method and device, computer equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010668320.XA CN111931104A (en) 2020-07-13 2020-07-13 Instruction execution method and device, computer equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN111931104A true CN111931104A (en) 2020-11-13

Family

ID=73312442

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010668320.XA Pending CN111931104A (en) 2020-07-13 2020-07-13 Instruction execution method and device, computer equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111931104A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050138650A1 (en) * 2003-12-19 2005-06-23 Lenny Hon Method and system for creating and providing a multi-tier networked service
CN107085574A (en) * 2016-02-15 2017-08-22 阿里巴巴集团控股有限公司 A kind of page data processing method and server
CN108429848A (en) * 2017-02-13 2018-08-21 腾讯科技(深圳)有限公司 A kind of information processing method, device and equipment
CN110046021A (en) * 2019-05-21 2019-07-23 北京字节跳动网络技术有限公司 A kind of page display method, device, system, equipment and storage medium
CN111338690A (en) * 2020-03-25 2020-06-26 北京顺达同行科技有限公司 Method and device for configuring pages of small program shop, computer equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050138650A1 (en) * 2003-12-19 2005-06-23 Lenny Hon Method and system for creating and providing a multi-tier networked service
CN107085574A (en) * 2016-02-15 2017-08-22 阿里巴巴集团控股有限公司 A kind of page data processing method and server
CN108429848A (en) * 2017-02-13 2018-08-21 腾讯科技(深圳)有限公司 A kind of information processing method, device and equipment
CN110046021A (en) * 2019-05-21 2019-07-23 北京字节跳动网络技术有限公司 A kind of page display method, device, system, equipment and storage medium
CN111338690A (en) * 2020-03-25 2020-06-26 北京顺达同行科技有限公司 Method and device for configuring pages of small program shop, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN107665233B (en) Database data processing method and device, computer equipment and storage medium
CN107844421B (en) Interface testing method and device, computer equipment and storage medium
CN106997298B (en) Application resource acquisition method and device
CN110798501B (en) Data processing method and device and readable storage medium
CN107463563B (en) Information service processing method and device of browser
CN107920094B (en) Data acquisition method and device, server and network equipment
CN106484611B (en) Fuzzy test method and device based on automatic protocol adaptation
CN108228444B (en) Test method and device
CN112583799B (en) Processing method, related device, equipment and medium for registered account
CN111831542B (en) API application debugging method and device and storage medium
CN110636106A (en) Information pushing method and device, computer equipment and storage medium
CN110737645B (en) Data migration method and system among different systems and related equipment
CN115079880A (en) Information code display method and device, terminal equipment and storage medium
CN105068926A (en) Program test method and device thereof
CN112835856A (en) Log data query method and device, equipment and medium
CN112181822A (en) Test method and test method for starting time consumption of application program
CN111611065A (en) Calling method and device of machine learning algorithm, storage medium and electronic equipment
CN111931104A (en) Instruction execution method and device, computer equipment and computer readable storage medium
CN110851688A (en) Page request method, device and equipment
CN113409425B (en) Animation file output method and device
CN111104328B (en) Use case generation method and device, computer equipment and readable storage medium
CN110389754B (en) Service processing method, system, server, terminal, electronic equipment and storage medium
CN112565472B (en) Static resource processing method and device
CN112714148A (en) Interface configuration method, device, equipment and medium
CN113297358A (en) Data processing method, device, server and computer readable 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