Operation response method and device, equipment and storage medium

通过将页面开发过程拆解为解耦的交互模块和逻辑处理模块,解决了复杂代码文件修改频繁的问题,提高了页面开发效率。

CN119668604APending Publication Date: 2025-03-21WUBA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411719681.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

In the prior art, the page development process is complicated, which leads to the need for developers to frequently modify complex code files when users propose new scenario requirements or need to adjust page functions, which reduces development efficiency.

Method used

Decoupling between modules is achieved by disassembling the page development process into interactive modules and logical processing modules that do not have a call relationship with each other. Developers only need to modify one step in the processing flow of the target event or modify the code snippet of a single module, and other modules are not affected.

Benefits of technology

It improves the efficiency of page development, reduces developers' need to modify complex code files, and simplifies the page function adjustment process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119668604A_ABST
    Figure CN119668604A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an operation response method and device, equipment and a storage medium, and the method comprises the steps: responding to a development operation of a target page, and generating a first code file of the target page; wherein the first code file serves as an implementation carrier of developed modules in the target page, and different modules in the developed modules do not have a calling relation. The logic processing module in the developed module corresponds to one step in the processing flow of the target event. And then, in response to a change operation triggered for any module in the first code file, modifying the any module to obtain a second code file, and creating a target page according to the second code file. According to the method, the complex page development process is disassembled into the modules which do not have the calling relation, and decoupling among the modules is achieved. And when a developer needs to change a certain module, the developer only needs to modify the code snippets corresponding to the module, so that the page development efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to an operation response method, device, equipment and storage medium. Background Art

[0002] With the rapid development of the Internet, the development process of applications or pages in browsers has become increasingly complex and needs to adapt to a variety of complex application scenarios, such as e-commerce, social media, online education, etc.

[0003] In practice, in order to adapt to a variety of complex application scenarios, the code files written by developers for page development are often complex. When users propose new scenario requirements or need to adjust the functions provided by the page according to user usage, developers are often required to modify the complex code files, which reduces the efficiency of page development.

[0004] Based on the above description, how to improve the efficiency of page development becomes a technical problem that needs to be solved urgently. Summary of the invention

[0005] In view of this, an embodiment of the present invention provides an operation response method, apparatus, device and storage medium to improve the efficiency of page development.

[0006] In a first aspect, an embodiment of the present invention provides an operation response method, including:

[0007] In response to a development operation of a target page, a first code file of the target page is generated, wherein the first code file serves as an implementation carrier of a developed module in the target page, the developed module includes an interaction module and a logic processing module corresponding to the interaction module, there is no calling relationship between different modules in the developed module, the logic processing module corresponds to a step in a processing flow of a target event, and the target event is generated after the interaction module responds to the interaction operation;

[0008] In response to a modification operation triggered on any module in the first code file, modifying the any module to obtain a second code file;

[0009] The target page is created according to the second code file.

[0010] In a second aspect, an embodiment of the present invention provides an operation response device, including:

[0011] A generating module, configured to generate a first code file of the target page in response to a development operation of the target page, wherein the first code file is used as an implementation carrier of a developed module in the target page, the developed module includes an interaction module and a logic processing module corresponding to the interaction module, there is no calling relationship between different modules in the developed module, the logic processing module corresponds to a step in a processing flow of a target event, and the target event is generated after the interaction module responds to the interaction operation;

[0012] A modification module, configured to modify any module in the first code file in response to a modification operation triggered on the any module in the first code file to obtain a second code file;

[0013] A creation module is used to create the target page according to the second code file.

[0014] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a processor and a memory, wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the operation response method in the first aspect. The target page includes a developed module, wherein the developed module includes an interaction module and a logic processing module corresponding to the interaction module, wherein there is no calling relationship between different modules in the developed module, wherein the logic processing module corresponds to a step in the processing flow of a target event, and the target event is generated after the interaction module responds to an interaction operation. The electronic device may also include a communication interface for communicating with other devices or communication systems.

[0015] In a fourth aspect, an embodiment of the present invention provides a non-temporary machine-readable storage medium having executable code stored thereon. When the executable code is executed by a processor of an electronic device, the processor can at least implement the operation response method as described in the first aspect above.

[0016] In the operation response method provided by the embodiment of the present invention, in response to the development operation of the target page, a first code file of the target page is generated. Among them, the first code file can be used as an implementation carrier of the developed module in the target page, and the developed module includes an interactive module and a logic processing module corresponding to the interactive module, and there is no calling relationship between different modules in the developed module. The logic processing module corresponds to a step in the processing flow of the target event, and the target event is generated after the interactive module responds to the interactive operation. Afterwards, in response to the change operation triggered on any module in the first code file, any module can be modified to obtain a second code file. Finally, the target page is created according to the second code file.

[0017] It can be seen that in the above scheme, the complex page development process is decomposed into interactive modules and / or logic processing modules corresponding to the interactive modules that have no calling relationship with each other, that is, the decoupling between the modules is achieved. When the developer needs to change a module in the target page, since the modules are decoupled, only the code snippet corresponding to the module needs to be modified, and the code snippets of other modules do not need to be modified. In this way, they can be adjusted quickly, thereby improving the efficiency of page development.

[0018] And since the logic processing module corresponds to a step in the processing flow of the target event, when the developer wants to modify any step in the processing flow of the target event, he does not need to understand the working process of the entire processing flow, but only needs to modify the code snippet corresponding to the logic processing module, so that he can quickly adjust it, thereby improving the development efficiency of the page. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0020] Figure 1 A flowchart of an operation response method provided by an embodiment of the present invention;

[0021] Figure 2 A flowchart of a code file detection method provided by an embodiment of the present invention;

[0022] Figure 3 A flowchart of another operation response method provided by an embodiment of the present invention;

[0023] Figure 4 A schematic diagram of a commodity purchasing page provided by an embodiment of the present invention;

[0024] Figure 5 A schematic diagram of the structure of an operation response device provided by an embodiment of the present invention;

[0025] Figure 6 For Figure 5 A schematic structural diagram of an electronic device corresponding to the operation response device provided in the illustrated embodiment. DETAILED DESCRIPTION

[0026] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0027] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings, and "multiple" generally includes at least two, but does not exclude the inclusion of at least one.

[0028] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0029] As used herein, the words "if" and "if" may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to identifying", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is identified" may be interpreted as "when determining" or "in response to determining" or "when identifying (stated condition or event)" or "in response to identifying (stated condition or event)", depending on the context.

[0030] It should be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a product or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such product or system. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the product or system including the elements.

[0031] It should also be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the present invention are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0032] In actual applications, such as when developing pages for e-commerce scenarios, when users propose new scenario requirements or developers need to adjust a functional component of the page based on user usage, developers are often required to rewrite the code file corresponding to the page or the code file corresponding to the functional component. At the same time, developers may also need to modify the code files of other components that have dependencies on the functional component, which will obviously reduce the development efficiency of the page.

[0033] In order to improve the above problems, the operation response methods provided in the following embodiments of the present invention may be used.

[0034] Based on the above description, some embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the case where there is no conflict between the embodiments, the following embodiments and the features in the embodiments can be combined with each other. In addition, the step sequence in the following method embodiments is only an example and not a strict limitation.

[0035] Figure 1 The flowchart of an operation response method provided by an embodiment of the present invention. The operation response method provided by an embodiment of the present invention can be executed by a response device with a development function. It can be understood that the response device can be implemented as software, or a combination of software and hardware. Figure 1 As shown, the method comprises the following steps:

[0036] 101. In response to the development operation of the target page, a first code file of the target page is generated, wherein the first code file serves as an implementation carrier of the developed module in the target page, the developed module includes an interaction module and a logic processing module corresponding to the interaction module, and there is no calling relationship between different modules in the developed module. The logic processing module corresponds to a step in the processing flow of the target event, and the target event is generated after the interaction module responds to the interaction operation.

[0037] 102. In response to a modification operation triggered on any module in the first code file, modify any module to obtain a second code file.

[0038] 103. Create a target page according to the second code file.

[0039] When the developer generates a development operation on the target page, the response device can generate a first code file of the target page in response to the development operation of the target page. The first code file can be used as an implementation carrier of the developed module in the target page, and the developed module can include an interaction module and a logic processing module corresponding to the interaction module. There is no calling relationship between different modules in the developed module, that is, different modules in the developed module are independent of each other.

[0040] Optionally, the target page may include any one of a page designed based on the HarmonyOS, an H5 page, and an application (App l icat ion, APP for short) page.

[0041] Specifically, for the generation of the first code file, the developer can pre-split the target page into multiple modules that have no calling relationship with each other, namely, interaction modules and / or logic processing modules. The functions provided by different modules can be implemented by writing corresponding code snippets. Furthermore, the first code file of the target page is composed of the code snippets of different modules.

[0042] Among them, the interaction module is used to build the user interface, which can provide interactive elements for users to interact with the page, such as charts, buttons, input boxes, navigation bars, font selection, etc. These interactive elements together constitute the page that the user sees.

[0043] The logic processing module is used to process the data submitted by the user through the interaction module and feed back the processing results to the interaction module. The logic processing module may correspond to a step in the processing flow of the target event, which is generated after the interaction module responds to the interaction operation.

[0044] For example, assuming that the target event is a phone call event, and the processing flow of the phone call event includes 4 steps, as follows: Step 1: Receive the event request and verify the user's identity; Step 2: Send a call request to the phone service provider based on the obtained phone number to establish a call connection; Step 3: Record the phone call status, such as successful, failed, busy, etc. Then the code snippets corresponding to steps 1 to 3 can be encapsulated into logic processing modules, that is, a logic processing module corresponds to a step in the processing flow of the phone call event.

[0045] In the process of developing the target page, with the continuous changes in user needs and the iterative updates of technology, the developer may also have the need to change any module in the first code file. At this time, the response device can modify any module in response to the change operation triggered by the developer on any module in the first code file to obtain a second code file. The second code file may include code snippets corresponding to any of the modified modules, as well as code snippets corresponding to other modules in the developed modules.

[0046] Among them, any module may include an interaction module or a logic processing module.

[0047] Finally, the responding device can create the target page according to the second code file. For the creation of the target page, the responding device can optionally obtain the layout file of the target page, and further generate the target page according to the layout file of the target page and the second code file.

[0048] The layout file may include configuration information of each interactive module and other contents related to page display, etc. The configuration information may include at least one of the size of the interactive element in the interactive module, the display position of the interactive element in the target page, and the display style. Other contents related to page display may specifically include animation, page background, page margins and spacing, etc.

[0049] In this embodiment, the complex page development process is decomposed into interactive modules and / or logic processing modules corresponding to the interactive modules that have no calling relationship with each other, that is, the decoupling between the modules is achieved. When the developer needs to change a module in the target page, since the modules are decoupled, only the code snippet corresponding to the module needs to be modified, and the code snippets of other modules do not need to be modified. In this way, they can be adjusted quickly, thereby improving the page development efficiency.

[0050] And since the logic processing module corresponds to a step in the processing flow of the target event, when the developer wants to modify any step in the processing flow of the target event, he does not need to understand the working process of the entire processing flow, but only needs to modify the code snippet corresponding to the logic processing module, so that he can quickly adjust it, thereby improving the development efficiency of the page.

[0051] Figure 1 The illustrated embodiment has mentioned that with the continuous changes in user needs and the iterative updates of technology, developers may have the need to change any module in the first code file. In practical applications, developers may also have the need to add modules.

[0052] Then the responding device can add the code snippet corresponding to the newly added module to the first code file in response to the developer triggering the module addition operation on the first code file. In an optional manner, the responding device can obtain the content identifier corresponding to the newly added module and determine the location prompt information corresponding to the content identifier. The location prompt information is used to indicate the location where the newly added module is added. Afterwards, the responding device can add the code snippet corresponding to the newly added module to the corresponding location in the first code file according to the location prompt information.

[0053] Based on the above description, in order to improve the development quality and efficiency of the code file of the target page, you can use the following Figure 2 The embodiment shown detects the first code file containing the code snippet corresponding to the newly added module. Figure 2 A flowchart of a code file detection method provided by an embodiment of the present invention. Figure 2 As shown, the method comprises the following steps:

[0054] 201. Parse a first code file to obtain a first parsing result, where the first parsing result includes a name of a class in the first code file and a name of a method defined in the class.

[0055] 202 , parse the code snippet corresponding to the newly added module to obtain a second parsing result, where the second parsing result includes the name of the class in the code snippet and the name of the method defined in the class.

[0056] 203. If the second parsing result is not included in the first parsing result, a first prompt text corresponding to the code snippet is generated according to the prompt template. The first prompt text includes an error type corresponding to the newly added module and a code modification suggestion.

[0057] The responding device may use an automated analysis tool configured by itself to parse the first code file to obtain the name of the class in the first code file and the name of the method defined in the class, that is, to obtain a first parsing result. Optionally, the automated analysis tool may include an Abstract Syntax Tree (AST) or Doxygen, etc.

[0058] During the development process, classes and methods in code files are two core concepts of object-oriented programming (OOP). Among them, a class is an abstraction of a class of things with common characteristics in real life, which is used to simulate entities or concepts in programming. In page development, classes can be pre-defined to encapsulate data and behaviors related to interactive elements, thereby realizing various functions of the page. Among them, a class can specifically include methods defined within the class, which can be regarded as functions defined in the class, which are used to perform specific operations or calculations.

[0059] At the same time, the responding device can also use its own configured automatic analysis tool to parse the code snippet corresponding to the newly added module to obtain the name of the class in the code snippet and the name of the method defined in the class, that is, to obtain the second parsing result. Among them, the newly added module can be the interaction module or logic processing module mentioned above.

[0060] Afterwards, the responding device may compare the first parsing result with the second parsing result. If it is determined that the second parsing result is not included in the first parsing result, that is, the class in the newly added module and the method defined in the class are not in the first code file, then it indicates that an error has occurred in adding the newly added module, and the responding device may generate a first prompt text corresponding to the code snippet according to the prompt template.

[0061] The first prompt text includes the error type and code modification suggestions corresponding to the newly added module. Optionally, the error type may include a code writing error, such as a wrong class name and / or method name. For the code writing error type, the corresponding code modification suggestion may specifically include the correct class name or the correct method name to ensure that the functions implemented by the newly added module can be used normally.

[0062] Optionally, the error type may also include a position addition error, such as not adding the code snippet corresponding to the newly added module to the first code file, but adding it to another code file. In this case, the corresponding code modification suggestion may specifically include a suggestion to add the newly added module to the target file path, which is the file path where the first code file is located, to ensure that the functions implemented by the newly added module can be used normally.

[0063] In this embodiment, by comparing the parsing results of the first code file and the code snippet corresponding to the newly added module, it is possible to determine whether the code snippet corresponding to the newly added module has an error, and generate a first prompt text corresponding to the code snippet for the code snippet with an error. Since this first prompt text includes the error type and code modification suggestions corresponding to the newly added module, with the help of this first prompt text, on the one hand, it is possible to enable developers to quickly know the error type existing in this code snippet and how to modify this code snippet, thereby improving the development efficiency of the page. On the other hand, with the prompt capability of the first prompt text, it is also possible to ensure the accuracy of the code snippet development, thereby ensuring the development quality of the page.

[0064] When the newly added module is specifically an interaction module, if it is determined that the second analysis result is included in the first analysis result, that is, the class in the newly added interaction module and the method defined in the class are in the first code file, then on this basis, the layout file of the target page can also be obtained to further detect whether there is a problem with the newly added interaction module.

[0065] Specifically, if the second parsing result is included in the first parsing result and the newly added module is an interactive module, the response device can obtain the layout file of the target page. The content included in the layout file can refer to the description in the above embodiment, which will not be repeated here.

[0066] Then, the responding device may parse the layout file using its own automated analysis tool to obtain configuration information corresponding to each interaction module in the layout file, and compare the configuration information corresponding to each interaction module in the layout file with the configuration information corresponding to the newly added interaction module.

[0067] In actual applications, the configuration information corresponding to any interaction module can be associated with an identifier. For comparison of the configuration information, optionally, the identifier corresponding to the newly added interaction module can be directly matched with the identifiers corresponding to each interaction module in the layout file.

[0068] If it is determined that the identifiers corresponding to the newly added interactive module are not included in the identifiers corresponding to the newly added interactive module in the layout file, that is, the configuration information in the layout file does not include the configuration information in the newly added interactive module, which indicates that an error has occurred in the addition of the newly added interactive module, the response device can generate a second prompt text corresponding to the code snippet according to the prompt template. The second prompt text includes the error type and code modification suggestions corresponding to the newly added interactive module. The specific content of the second prompt text can refer to the above description of the first prompt text.

[0069] In this embodiment, when the newly added module is specifically an interaction module, after determining that the class in the newly added interaction module and the method defined in the class are in the first code file, it is further possible to determine whether the configuration information in the newly added interaction module is included in the layout file. It can be seen that, considering the actual use of the interaction module, through multiple judgment operations, it is possible to more accurately determine whether there is a problem with the newly added interaction module, thereby better ensuring the development quality of the target page.

[0070] Above Figure 1-2 The embodiment shown describes the specific working process of the response device during the development of the target page. Further, after the target page is developed, the following Figure 3 The method of the illustrated embodiment describes in detail the specific working process of the responding device during the use of the target page.

[0071] but Figure 3 A flowchart of another operation response method provided by an embodiment of the present invention. Figure 3 As shown, the method comprises the following steps:

[0072] 301 , in response to an interactive operation triggered on a target interactive module on a target page, obtaining a target event corresponding to the interactive operation.

[0073] 302, traverse the modules corresponding to the second code file, and search for a target module that subscribes to a target event, so that the target module responds to the target event.

[0074] The response device can monitor the user's operation. When the user interacts with the target interactive module on the target page, the response device can respond to the interactive operation and obtain the target event corresponding to the interactive operation. Optionally, the interactive operation can include any one of a click operation, a hover operation, a slide operation, and a drag operation.

[0075] The target event can be understood as a specific behavior triggered when the user interacts with the target page. It can prompt the target module in the target page to respond to and process the user's interactive operation. It can specifically include information related to the interactive operation, such as the operation type, occurrence time, target interactive module of the operation, etc.

[0076] According to the above description, the target page is created according to the second code file. After acquiring the target event, the responding device can traverse the modules corresponding to the second code file to find the target module subscribed to the target event so that the target module can respond to the target event.

[0077] The target module may include a target logic processing module and other interactive modules. After receiving the target event, the target logic processing module may execute the target event to obtain a response result of the target event. Other interactive modules may display the response result of the target event.

[0078] Regarding the determination of the target module, optionally, the responding device may search for a target interaction module and a target logic processing module that have subscribed to the target event from the modules corresponding to the second code file according to the association relationship between the event and the module.

[0079] Among them, the association relationship can be obtained in advance through the publish-subscribe model. Specifically, one interactive operation can correspond to an event. The responding device can create an event bus, which can be understood as the implementation of the publish-subscribe model, which allows the target interactive module to communicate with the target logic processing module without direct dependence. The target logic processing module registers the events of interest to the event bus, and the target logic processing module can also be called a subscriber. When the user interacts with the interactive module and triggers the event corresponding to the interactive operation, the interactive module can publish the event to the event bus, and the interactive module can also be called a publisher.

[0080] Based on the above description, when the user triggers an interactive operation on the target interactive module, the target interactive module can publish the target event corresponding to the interactive operation to the event bus. After receiving the target event, the event bus can distribute the target event to the target logic processing module and other interactive modules that have subscribed to the target event according to the registered association relationship, so that the target logic processing module executes the corresponding steps, that is, responds to the target event, and other interactive modules display the response results of the target event.

[0081] It should be noted that, in actual applications, the response result of the target event may not be displayed on the target page, that is, other interactive modules may not display the response result of the target event, but pass the response result to other modules for processing. In this case, other interactive modules may display animations, pictures, videos and other content associated with the target event. Among them, other modules may be logic processing modules or interactive modules.

[0082] In this embodiment, by means of the association relationship between events and modules established by the event bus, the target module subscribing to the target event can be quickly found from the module corresponding to the second code file, so that the target module responds to the target event. And through this event bus, the communication between the target interaction module and the target module can be realized, that is, the decoupling between the target interaction module and the target module can be realized, so that the target interaction module and the target module are not directly dependent on each other, thereby improving the scalability of the page and making it easier for subsequent maintenance.

[0083] In practical applications, the target module obtained by searching may include multiple modules. In an optional way, considering that there may be a dependency relationship between multiple modules in terms of execution order, the execution order or priority can be set for the multiple modules to ensure the orderly transmission and processing of events. Specifically, multiple modules can be connected in series through the responsibility chain to form a processing chain, that is, the multiple modules are managed in an orderly execution manner.

[0084] Alternatively, there may be no fixed execution order between the multiple modules, that is, the multiple modules may be managed in an out-of-order execution manner. For example, assuming that the interactive operation generated by the user is a sliding operation, the execution order between the multiple modules subscribing to the event corresponding to the sliding operation may be out of order. In this case, multiple modules may respond to the event at the same time, thereby improving the concurrency and efficiency of event processing.

[0085] For ease of understanding, you can combine Figure 4 Take the e-commerce scenario as an example to illustrate the above Figure 3 The working process of the operation response method mentioned in the embodiment shown. Figure 4 As shown in the figure, product 1 and product 2 are displayed on the product purchase page in the e-commerce APP. Each product corresponds to two buttons (i.e., interactive modules), one is "add to shopping cart" and the other is "remaining inventory quantity".

[0086] When the user clicks the "Add to Cart" button on the product selection page, the response device can respond to the click operation and obtain an Add to Cart event corresponding to the click operation.

[0087] Afterwards, the responding device can search for the button for displaying the remaining inventory quantity of the product and the target logic processing module that have subscribed to the add to cart event and display the remaining inventory quantity of the product from the module corresponding to the second code file according to the association relationship between the event and the module. Among them, the target logic processing module can specifically include three, and these three target logic processing modules can execute the add to cart event in sequence. Specifically, after receiving the add to cart event, the first target logic processing module can check the total quantity of product 1 in the database. Then, the second target logic processing module can count the number of product 1 added to the shopping cart. Afterwards, the third target logic processing module can calculate the remaining inventory quantity of product 1 in the database.

[0088] Finally, the remaining inventory quantity of the commodity 1 calculated in the third target processing logic module can be displayed on the commodity purchase page by the button of the remaining inventory quantity.

[0089] The following will describe in detail the operation response device of one or more embodiments of the present invention. Those skilled in the art will appreciate that these operation response devices can be configured using commercially available hardware components through the steps taught in this solution.

[0090] Figure 5 A schematic diagram of the structure of an operation response device provided by an embodiment of the present invention is shown in FIG. Figure 5 As shown, the device comprises:

[0091] A generation module 11 is used to generate a first code file of the target page in response to a development operation of the target page, wherein the first code file serves as an implementation carrier of a developed module in the target page, the developed module includes an interaction module and a logic processing module corresponding to the interaction module, and there is no calling relationship between different modules in the developed module. The logic processing module corresponds to a step in the processing flow of a target event, and the target event is generated after the interaction module responds to an interaction operation.

[0092] The modification module 12 is used to modify any module in the first code file in response to a modification operation triggered on the any module in the first code file to obtain a second code file.

[0093] The creation module 13 is used to create the target page according to the second code file.

[0094] Optionally, the creation module 13 is used to generate the target page according to the layout file of the target page and the second code file.

[0095] Optionally, the device further comprises a adding module 14, configured to add a code snippet corresponding to the newly added module to the first code file in response to triggering a module adding operation on the first code file.

[0096] Optionally, the device also includes a prompt module 15, which is used to parse the first code file to obtain a first parsing result, the first parsing result includes the name of the class in the first code file and the name of the method defined in the class; parse the code snippet corresponding to the newly added module to obtain a second parsing result, the second parsing result includes the name of the class in the code snippet and the name of the method defined in the class; if the second parsing result is not included in the first parsing result, generate a first prompt text corresponding to the code snippet according to the prompt template, the first prompt text includes the error type corresponding to the newly added module and code modification suggestions.

[0097] Optionally, the prompt module 15 is used to obtain the layout file of the target page if the second parsing result is included in the first parsing result and the newly added module is an interactive module; parse the layout file to obtain configuration information corresponding to each interactive module in the layout file; if the configuration information in the layout file does not include the configuration information in the interactive module, generate a second prompt text corresponding to the code snippet according to a prompt template, and the second prompt text includes the error type corresponding to the newly added module and code modification suggestions.

[0098] Optionally, the device also includes a search module 16, which is used to obtain a target event corresponding to the interactive operation in response to the interactive operation triggered by the target interactive module on the target page; traverse the modules corresponding to the second code file to find the target module that subscribes to the target event so that the target module responds to the target event.

[0099] Optionally, the target module includes a target logic processing module and other interaction modules. Based on this, the device also includes a response module 17, which is used for the target logic processing module to execute the target event to obtain a response result of the target event; the other interaction modules display the response result.

[0100] Figure 5 The device shown can perform Figures 1 to 4 For the method of the embodiment shown in the figure, the part not described in detail in this embodiment can be referred to Figures 1 to 4 The implementation process and technical effects of this technical solution refer to Figures 1 to 4 The description in the illustrated embodiment will not be repeated here.

[0101] In a possible design, the structure of the operation response device can be implemented as an electronic device, such as Figure 6 As shown, the electronic device may include: a processor 21 and a memory 22. The memory 22 is used to store the electronic device to perform the above Figures 1 to 4 The program of the operation response method provided in the illustrated embodiment, the processor 21 is configured to execute the program stored in the memory 22.

[0102] The program includes one or more computer instructions, wherein the one or more computer instructions can implement the following steps when executed by the processor 21:

[0103] In response to a development operation of a target page, a first code file of the target page is generated, wherein the first code file serves as an implementation carrier of a developed module in the target page, the developed module includes an interaction module and a logic processing module corresponding to the interaction module, there is no calling relationship between different modules in the developed module, the logic processing module corresponds to a step in a processing flow of a target event, and the target event is generated after the interaction module responds to the interaction operation;

[0104] In response to a modification operation triggered on any module in the first code file, modifying the any module to obtain a second code file;

[0105] The target page is created according to the second code file.

[0106] Optionally, the processor 21 is further configured to execute the aforementioned Figures 1 to 4 All or part of the steps in the illustrated embodiments.

[0107] The structure of the electronic device may further include a communication interface 23 for the electronic device to communicate with other devices or a communication network.

[0108] In addition, an embodiment of the present invention provides a non-transitory machine-readable storage medium for storing computer software instructions used by the above electronic device, which includes instructions for executing the above Figure 1 to Figure 4 The procedures involved in the operational response method shown.

[0109] In addition, an embodiment of the present invention provides a computer program product. The computer program product includes a computer program or an instruction. When the computer program or the instruction is executed by a processor, the processor is enabled to implement the above Figure 1 to Figure 4 The steps or functions of the operation response method shown.

[0110] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An operation response method, characterized in that: include: In response to a development operation of a target page, a first code file of the target page is generated, wherein the first code file serves as an implementation carrier of a developed module in the target page, the developed module includes an interaction module and a logic processing module corresponding to the interaction module, there is no calling relationship between different modules in the developed module, the logic processing module corresponds to a step in a processing flow of a target event, and the target event is generated after the interaction module responds to the interaction operation; In response to a modification operation triggered on any module in the first code file, modifying the any module to obtain a second code file; The target page is created according to the second code file.

2. The method according to claim 1, characterized in that The step of creating the target page according to the second code file includes: The target page is generated according to the layout file of the target page and the second code file.

3. The method according to claim 1, characterized in that The method further comprises: In response to triggering a module adding operation on the first code file, a code snippet corresponding to the newly added module is added to the first code file.

4. The method according to claim 3, characterized in that The method further comprises: Parsing the first code file to obtain a first parsing result, where the first parsing result includes a name of a class in the first code file and a name of a method defined in the class; Parsing the code snippet corresponding to the newly added module to obtain a second parsing result, where the second parsing result includes the name of the class in the code snippet and the name of the method defined in the class; If the second parsing result is not included in the first parsing result, a first prompt text corresponding to the code snippet is generated according to a prompt template, wherein the first prompt text includes an error type corresponding to the newly added module and code modification suggestions.

5. The method according to claim 4, characterized in that The method further comprises: If the second parsing result is included in the first parsing result and the newly added module is an interactive module, obtaining a layout file of the target page; Parsing the layout file to obtain configuration information corresponding to each interaction module in the layout file; If the configuration information in the layout file does not include the configuration information in the interactive module, a second prompt text corresponding to the code snippet is generated according to a prompt template, and the second prompt text includes an error type corresponding to the newly added module and code modification suggestions.

6. The method according to claim 1, characterized in that After creating the target page according to the second code file, the method further includes: In response to an interactive operation triggered on a target interactive module on the target page, acquiring a target event corresponding to the interactive operation; The modules corresponding to the second code file are traversed to find a target module subscribing to the target event, so that the target module responds to the target event.

7. The method according to claim 6, characterized in that The target module includes a target logic processing module and other interactive modules; The target module responds to the target event, including: The target logic processing module executes the target event to obtain a response result of the target event; The other interaction module displays the response result.

8. An operation response device, characterized in that: include: A generating module, configured to generate a first code file of the target page in response to a development operation of the target page, wherein the first code file is used as an implementation carrier of a developed module in the target page, the developed module includes an interaction module and a logic processing module corresponding to the interaction module, there is no calling relationship between different modules in the developed module, the logic processing module corresponds to a step in a processing flow of a target event, and the target event is generated after the interaction module responds to the interaction operation; A modification module, configured to modify any module in the first code file in response to a modification operation triggered on the any module in the first code file to obtain a second code file; A creation module is used to create the target page according to the second code file.

9. An electronic device, characterized in that: include: A memory and a processor; wherein the memory stores executable code, and when the executable code is executed by the processor, the processor executes the operation response method as described in any one of claims 1 to 7, wherein the target page includes a developed module, the developed module includes an interaction module and a logic processing module corresponding to the interaction module, there is no calling relationship between different modules in the developed module, the logic processing module corresponds to a step in the processing flow of a target event, and the target event is generated after the interaction module responds to an interaction operation.

10. A non-transitory machine-readable storage medium, characterized in that: The non-transitory machine-readable storage medium stores executable code, and when the executable code is executed by a processor of an electronic device, the processor is caused to execute the operation response method according to any one of claims 1 to 7.