Function creation method, device, equipment and medium based on floating button component
Through the function creation method based on the floating button component, the problems of repetitive labor and difficult code maintenance in software development are solved, and efficient function development and simplified creation process are achieved.
Patent Information
- Application Number
- CN202110090423.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-22
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2041-01-22
AI Technical Summary
In existing software function development, platform layout and page logic require R&D personnel to write code one by one, resulting in increased repetitive labor, low development efficiency, bloated code and difficulty in maintenance, which reduces work efficiency.
Using the function creation method based on the floating button component, the pre-integrated floating button component is obtained through the detection project creation instruction, receives the interactive operation, moves to the target position, obtains the parameters to generate the mapping identifier, maps the main function from the floating button component, and inputs the parameters to Generate functions and implement the writing of functional logic.
It simplifies the function creation process, improves development efficiency, organically combines component design with business function design, and realizes zero-code development of visual interfaces.
Smart Images

Figure CN112783483B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a function creation method, device, equipment and medium based on a floating button component. Background Art
[0002] With the rapid development of mobile Internet, more and more software programs have come into the public eye. They are constantly changing every aspect of people's daily lives and providing convenience for people's lives, such as social software, entertainment software, transportation software, etc. However, before the software programs go online, software development engineers need to write business logic in different languages, and only after the writing is completed can the corresponding functions be realized.
[0003] In the existing software function development, the layout of the platform and the logic of page implementation need to be written one by one by developers in the form of code. However, the platform system has most similar functions, and the only difference in most similar functions is the parameters of each function call. At this time, developers need to rewrite the code for most similar functions in the platform system, which leads to a lot of repetitive work for developers, resulting in low development efficiency, bloated and difficult to maintain code, and prone to errors, thereby reducing the work efficiency of developers. Therefore, a simpler and more convenient method is needed to operate or process platform creation. Summary of the invention
[0004] Based on this, it is necessary to provide a function creation method, device, equipment and medium based on a floating button component to address the problems of low development efficiency, bloated code and difficulty in maintenance.
[0005] A method for creating a function based on a floating button component, the method comprising: when a project creation instruction is detected, obtaining a pre-integrated floating button component for display; receiving an interactive operation for the floating button component, and moving to a target position coordinate point based on the interactive operation; obtaining multiple parameters corresponding to the target position coordinate point, and generating a mapping identifier according to the multiple parameters; mapping a main function corresponding to the mapping identifier from the floating button component, and determining the main function as a target function of the target position point; and inputting multiple parameters corresponding to the target position coordinate point into the target function to generate a function.
[0006] In one of the embodiments, when a project creation instruction is detected, a pre-integrated floating button component is obtained for display, including: when a project creation instruction is detected, capturing a traffic message corresponding to the project creation instruction; parsing the traffic message to generate a parsed traffic message; identifying from the parsed traffic message whether there is a project creation identifier under a software development environment; when there is a project creation identifier under a software development environment, loading a pre-integrated floating button component for display.
[0007] In one of the embodiments, the method for detecting project creation instructions includes a hardware detection method or a software detection method; detecting project creation instructions includes: when the method for detecting project creation instructions is a hardware detection method, real-time detection of project creation instructions in a software development environment based on a pre-set traffic probe; and when the method for detecting project creation instructions is a software detection method, obtaining currently existing traffic message data; using a message classification algorithm to classify currently existing traffic message data to generate multiple categories of traffic messages; obtaining project creation instructions in a software development environment from multiple categories of traffic messages.
[0008] In one of the embodiments, a pre-integrated floating button component is generated according to the following method steps, including: obtaining historical business logic code, and extracting the trunk function nodes corresponding to each business logic from the historical business logic code to generate a trunk function node set; semantically marking each trunk function in the trunk function node set to generate a first trunk function node set after marking the semantics; counting the number of trunk function nodes with the same semantics from the first trunk function node set after marking the semantics, and obtaining trunk function nodes whose number of trunk function nodes is greater than a preset number to generate a second trunk node set; designing a floating button using a front-end interface design language; setting different coordinate points in the floating button, and mapping and associating the set different coordinate points with each trunk function in the second trunk node set to generate an integrated floating button component.
[0009] In one of the embodiments, a pre-integrated floating button component is generated according to the following method steps, including: obtaining the current mainstream development framework; parsing the source code in the mainstream development framework, and obtaining the main functions in the source code from the parsed source code to generate a main function set; analyzing the semantic information corresponding to the logic implemented by each main function in the main function set; using the front-end interface design language to design the floating button; setting different coordinate points in the floating button, and associating the different coordinate points set in the floating button with the semantic information corresponding to the logic implemented by each main function to generate an integrated floating button component.
[0010] In one of the embodiments, the number of trunk function nodes with the same semantics is counted from the first trunk function node set after the semantics are marked, including: creating a sliding window using a sliding window algorithm; inputting each trunk function in the first trunk function node set after the semantics are marked into the sliding window in turn, and outputting the number of trunk function nodes with the same semantics.
[0011] In one of the embodiments, multiple parameters corresponding to the target position coordinate point are obtained, and a mapping identifier is generated according to the multiple parameters, including: obtaining multiple parameters corresponding to the target position point from a memory address; receiving a parameter arrangement instruction, and obtaining a sequence of object identifiers in a floating button component according to the parameter arrangement instruction; arranging the multiple parameters corresponding to the target position point according to a preset parameter arrangement rule to generate multiple arranged parameters; identifying whether the sequence of object identifiers of the arranged multiple parameters is consistent with the sequence of object identifiers in the floating button component; when the identified sequence is consistent, converting the multiple parameters corresponding to the target position point into bytecodes to generate a mapping identifier.
[0012] A function creation device based on a floating button component, the device comprises: a floating button component acquisition module, which is used to acquire a pre-integrated floating button component for display when a project creation instruction is detected; a floating button component movement module, which is used to receive an interactive operation for the floating button component and move to a target position coordinate point based on the interactive operation; a mapping identifier generation module, which is used to acquire multiple parameters corresponding to the target position coordinate point and generate a mapping identifier according to the multiple parameters; a target function determination module, which is used to map a main function corresponding to the mapping identifier from the floating button component and determine the main function as the target function of the target position point; and a function generation module, which is used to input multiple parameters corresponding to the target position coordinate point into the target function to generate a function.
[0013] A device includes a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the steps of the function creation method based on the floating button component.
[0014] A medium storing computer-readable instructions, when the computer-readable instructions are executed by one or more processors, enables the one or more processors to execute the steps of the above-mentioned function creation method based on the floating button component.
[0015] The above-mentioned function creation method, device, equipment and medium based on the floating button component, the function creation device based on the floating button component first detects the project creation instruction, obtains the pre-integrated floating button component for display, and then receives the interactive operation for the floating button component, moves to the target position coordinate point based on the interactive operation, and then obtains multiple parameters corresponding to the target position coordinate point, and generates a mapping identifier based on the multiple parameters, and then maps the main function corresponding to the mapping identifier from the floating button component, and determines the main function as the target function of the target position point, and finally inputs the multiple parameters corresponding to the target position coordinate point into the target function to generate the function. Since this solution encapsulates the commonly used logic code into a function and integrates the encapsulated function into the pre-designed floating button, the developer can write the function logic by calling the function in the floating button when writing the function code, so that the component design and business function design are organically combined, thereby realizing that in the complete function creation process, the user can develop zero code based on the visual interface, and simplifies the function creation process and improves the function development efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0017] Figure 1 This is an implementation environment diagram of a function creation method based on a floating button component provided in one embodiment of the present application;
[0018] Figure 2 This is a schematic diagram of the internal structure of a device in one embodiment of the present application;
[0019] Figure 3 A schematic diagram of a method for creating a function based on a floating button component provided in one embodiment of the present application;
[0020] Figure 4 A schematic diagram of a method for creating a function based on a floating button component provided in another embodiment of the present application;
[0021] Figure 5 A schematic diagram of a method for creating a function based on a floating button component provided in another embodiment of the present application;
[0022] Figure 6 It is a schematic diagram of a device for creating a function based on a floating button component provided in an embodiment of the present application. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0024] It is understood that the terms "first", "second", etc. used in this application may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, a first data sample may be referred to as a second data sample, and similarly, a second data sample may be referred to as a first data sample without departing from the scope of this application.
[0025] Figure 1 FIG. 1 is an implementation environment diagram of a method for creating a function based on a floating button component provided in an embodiment, such as Figure 1 As shown, in this implementation environment, a device 110 and a client 120 are included.
[0026] The device 110 may be a server device, for example, a server device storing a floating button component, or a function library storing a main function integrated in the floating button component. The client 120 is installed with an application for creating applications and other operations. When a function based on the floating button component needs to be created, when the client 120 detects a project creation instruction, it obtains a pre-integrated floating button component from the device 110 and displays it on the client 120. The client 120 receives an interactive operation for the floating button component and moves to the target position coordinate point based on the interactive operation; the client 120 obtains multiple parameters corresponding to the target position coordinate point, and generates a mapping identifier based on the multiple parameters; the client 120 maps the main function corresponding to the mapping identifier from the floating button component, and determines the main function as the target function of the target position point; the client 120 inputs multiple parameters corresponding to the target position coordinate point into the target function to generate a function.
[0027] It should be noted that the client 120 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc., but is not limited thereto. The server 110 and the client 120 may be connected via Bluetooth, USB (Universal Serial Bus) or other communication connection methods, and the present invention does not limit this.
[0028] Figure 2 FIG. 1 is a schematic diagram of the internal structure of a device in an embodiment. Figure 2As shown, the device includes a processor, a medium, a memory and a network interface connected via a system bus. Among them, the medium of the device stores an operating system, a database and computer-readable instructions, and the database may store a control information sequence. When the computer-readable instructions are executed by the processor, the processor can implement a function creation method based on a floating button component. The processor of the device is used to provide computing and control capabilities to support the operation of the entire device. The memory of the device may store computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor can execute a function creation method based on a floating button component. The network interface of the device is used to connect and communicate with a terminal. Those skilled in the art can understand that Figure 2 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the device to which the solution of the present application is applied. The specific device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components. The medium is a storage medium.
[0029] The following will be combined with the attached Figure 3 -Attached Figure 5 , a method for creating a function based on a floating button component provided by an embodiment of the present application is introduced in detail. The method can be implemented by a computer program and can be run on a function creation device based on a floating button component based on a von Neumann system. The computer program can be integrated into an application or run as an independent tool application.
[0030] See also Figure 3 , which is a flow chart of a method for creating a function based on a floating button component according to an embodiment of the present application. Figure 3 As shown, the method of the embodiment of the present application may include the following steps:
[0031] S101, when a project creation instruction is detected, a pre-integrated floating button component is obtained for display;
[0032] Among them, the project is the application software currently to be developed, and the project creation instruction is the instruction that the R&D engineer clicks to create a project in the development environment. For example, when the R&D engineer is developing a project, he first opens the development environment on the terminal (such as eclipse programming software), and clicks Create Project in the programming software to generate the instruction to create the project.
[0033] In an embodiment of the present application, when a project creation instruction is detected, the user terminal captures the traffic message corresponding to the project creation instruction, then parses the traffic message to generate a parsed traffic message, and then identifies from the parsed traffic message whether there is a project creation identifier under the software development environment, and finally, when there is a project creation identifier under the software development environment, loads the pre-integrated floating button component for display.
[0034] In one possible implementation, when a project creation instruction is generated, the instruction is detected by the terminal, captured and further parsed after detection, and when it is determined to be a project creation instruction in a development environment after parsing, a pre-integrated floating button is obtained and displayed on the current terminal page.
[0035] Furthermore, the method of detecting the project creation instruction includes a hardware detection method or a software detection method.
[0036] When the method for detecting the project creation instruction is the hardware detection method, the project creation instruction in the software development environment is detected in real time based on a preset traffic probe.
[0037] When the method of detecting project creation instructions is software detection method, first obtain the current traffic message data, then use the message classification algorithm to classify the current traffic message data, generate multiple categories of traffic messages, and finally obtain the project creation instructions carrying the software development environment from the multiple categories of traffic messages.
[0038] Furthermore, when integrating the floating button component:
[0039] In one possible implementation, the historical business logic code is first obtained, and the trunk function nodes corresponding to each business function in the historical business logic code are extracted to generate a trunk function node set, and each trunk function is semantically marked according to the functional description. For example, the login function for a platform user can be marked as login, the registration function for a platform user can be marked as registration, and the search function for a platform user can be marked as search. After each trunk function is semantically identified, the frequency of each semantic label is counted, and then a preset number of high-frequency semantic labels are determined based on the counted frequency. Finally, a number of trunk functions corresponding to each high-frequency semantic label are determined.
[0040] Secondly, use the front-end interface design language (such as HTML, CSS, JavaScript, etc.) to design the floating button. The floating button can be set to a circular icon, a rectangular icon, or various display forms. It can also be set to a circular shape in the initial state, and then the user can set the shape according to their preferences.
[0041] Finally, several backbone functions corresponding to different coordinate points and high-frequency semantic tags are set in the floating button for mapping and association to generate the final integrated floating button component.
[0042] Specifically, when counting the frequency of each semantic tag, a sliding window is created through a sliding window algorithm, and then each semantic tag is input into the sliding window in turn. When the bytecodes of the semantic tags parsed by the sliding window are the same, they can be regarded as the same semantic tag. Finally, after the statistics are completed, the number of occurrences of each semantic tag is obtained.
[0043] In another possible implementation method, the current mainstream development framework (for example, mainstream front-end development frameworks such as react framework, Angular framework, Vue framework, etc.) is obtained, the source code in the mainstream development framework is parsed, the main function in the source code is obtained, and the functional implementation corresponding to the main function is analyzed to obtain the semantic information of the function implemented by the main function, design a floating button, and set different coordinate points in the floating button and associate them with the semantic information of the function implemented by the main function, and finally obtain an integrated floating button component.
[0044] The integrated floating button component can obtain the main functions of different functions according to the coordinate position points moved by the user, thereby quickly completing the development of functions and reducing the process of users writing programs independently.
[0045] S102, receiving an interactive operation on the floating button component, and moving to a target position coordinate point based on the interactive operation;
[0046] The interactive operation is an operation in which the user drags the floating button with a finger or a mouse, and the user's purpose is to drag the floating button to load the main function code required for the current business logic according to different position coordinate points.
[0047] Usually, after the integrated floating button component is displayed, the user can operate the floating button to implement functional logic development. The position of the integrated floating button when it is first displayed can be set according to actual conditions, which will not be repeated here.
[0048] In one possible implementation, after the pre-integrated floating button component is displayed, the user can drag the floating button component to the target coordinate point according to the business logic that the user needs to develop. First, the user focuses the mouse or finger on the floating button component to align the mouse or finger with the integrated floating button component. After alignment, the focus of the finger or mouse can be moved. During the movement of the finger or mouse, the integrated floating button component moves at the same time. After moving to the target position, the user releases the finger or mouse so that the integrated floating button component stays at the target position.
[0049] Specifically, when the user drags the floating button with a finger or a mouse, it is first necessary to calculate the width and height of the current page. When the finger or the mouse aligns with the floating button component, the touch function event of the floating button component is triggered. During the process of the user dragging the finger or the mouse, the touch function event listens to the touch position in real time and assigns the stop position of the button during the movement in real time. When the button moves to the target position point and stops, a logic view function to be developed is added.
[0050] Further, when the touch function event stops, it indicates that the floating button component has moved to the target position point and stopped. At this time, it is necessary to calculate the abscissa and ordinate of the target position coordinate point.
[0051] Specifically, when calculating the abscissa and ordinate (X, Y) of the target position point, when dragged to 20px from the top of the page (y < 20), the target position coordinate is (x, 0).
[0052] When dragged to 20px from the bottom of the page (y > height - 20), the target position coordinate is (x, height).
[0053] When dragged to the left side of the page (x < width / 2), the target position coordinate is (0, y).
[0054] When dragged to the right side of the page (x >= width / 2), the target position coordinate is (width, y).
[0055] S103, obtain multiple parameters corresponding to the target position coordinate point, and generate a mapping identifier according to the multiple parameters;
[0056] Among them, the multiple parameters of the target position point at least include a function mapping identifier, a page material view, and an xml object of page filling data.
[0057] Generally, the multiple parameters corresponding to the target position coordinate point are in the memory address and are associated with the target position point. When obtaining, when the integrated floating button and the mouse arrow or finger are out of focus, the pre-associated parameter values are automatically obtained from the internal address.
[0058] In a possible implementation, when moving to the target position coordinate point, first obtain multiple parameters corresponding to the target position point from the memory address. The parameters include a function mapping identifier, a page material view, and an xml object of page filling data. Since the object identifier required by the function in the floating button component is inconsistent with the object identifier in the actual business function, it is necessary to process the object identifier of the target position point into an object identifier that the floating button component can recognize. Therefore, it is necessary to arrange the multiple obtained parameters.
[0059] When performing parameter arrangement, first receive the parameter arrangement instruction, obtain the order of each object identifier in the floating button according to the parameter arrangement instruction, then obtain the parameter arrangement rule according to the pre-set parameter arrangement rule, and then arrange the obtained multiple parameters associated with the target location point according to the parameter arrangement rule to generate the arranged parameter value, compare the order of each object identifier corresponding to the arranged parameter value with the order of each object identifier in the floating button, and generate a mapping identifier when the comparison is consistent.
[0060] Specifically, parameter arrangement rules refer to the rules for arranging parameters associated with target locations, such as which parameter is at the first step of the floating button component, which parameter is at the second step of the floating button component, etc. It should be noted that the instructions triggered by the software developer's operation of dragging the floating button component to the target location can be arrangement instructions, and after the target component is dragged to the final location, the arrangement instruction will be triggered to obtain the pre-set arrangement rules.
[0061] For example, the code logic desired by the target location point is the view page logic function of the login function. At this time, the identifier of the target coordinate location point is "login view", the page material view is the login page material, and the xml object of the page fill data is "user name, password, verification code and other object identifiers". The parameter arrangement rule is obtained, and the multiple parameters corresponding to the target location point coordinates are arranged according to the parameter arrangement rule to be consistent with the order of the object identifiers in the floating button component. After the consistency is confirmed, the multiple parameters corresponding to the target location point are converted into bytecodes to generate mapping identifiers.
[0062] S104, mapping a main function corresponding to the mapping identifier from the floating button component, and determining the main function as the target function of the target position point;
[0063] In one possible implementation, after generating a mapping identifier, a second mapping identifier that is consistent with the target location point is mapped from a pre-integrated floating button component, and the main function of the second identifier is loaded from the main function library of the floating button component according to the second mapping identifier, and the main function of the second identifier is determined as the main function of the target location point, thereby obtaining the target function of the target location point.
[0064] S105, inputting a plurality of parameters corresponding to the target position coordinate point into the objective function to generate a function.
[0065] In a possible implementation, after obtaining the objective function of the target position point, multiple parameters corresponding to the target position coordinate point are input into the objective function, thereby generating the currently required function.
[0066] Furthermore, a lazy loading mechanism is used as an optimization of the server front end to reduce the number of requests or delay the number of requests. The page will first load a portion of the data, and when the button is triggered to display the pop-up window, the remaining data will be loaded asynchronously (async). The newly obtained data will not affect the display of the original data, and at the same time, the server-side resource consumption is reduced to the greatest extent.
[0067] In the embodiment of the present application, when the function creation device based on the floating button component first detects the project creation instruction, it obtains the pre-integrated floating button component for display, then receives the interactive operation for the floating button component, moves to the target position coordinate point based on the interactive operation, and then obtains multiple parameters corresponding to the target position coordinate point, and generates a mapping identifier based on the multiple parameters, and then maps the main function corresponding to the mapping identifier from the floating button component, and determines the main function as the target function of the target position point, and finally inputs the multiple parameters corresponding to the target position coordinate point into the target function to generate the function. Since the present solution encapsulates the commonly used logic code into a function and integrates the encapsulated function into the pre-designed floating button, the developer can write the function logic by calling the function in the floating button when writing the function code, so that the component design and the business function design are organically combined, thereby realizing that in the complete function creation process, the user can develop zero code based on the visual interface, and simplifies the function creation process and improves the function development efficiency.
[0068] In order to facilitate understanding of the function creation method based on the floating button component provided in the embodiment of the present application, the following is a Figure 4 For explanation. Figure 4 As shown, a function creation method based on a floating button component includes:
[0069] S201, obtaining historical business logic codes, and extracting trunk function nodes corresponding to each business logic from the historical business logic codes to generate a trunk function node set;
[0070] S202, semantically marking each trunk function in the trunk function node set to generate a first trunk function node set after semantic marking;
[0071] S203, counting the number of trunk function nodes with the same semantics from the first trunk function node set after the semantics are marked, and obtaining the trunk function nodes whose number of trunk function nodes is greater than a preset number to generate a second trunk node set;
[0072] S204, uses the front-end interface design language to design the floating button;
[0073] S205, setting different coordinate points in the floating button, and mapping and associating the set different coordinate points with each trunk function in the second trunk node set to generate an integrated floating button component;
[0074] S206, when a project creation instruction is detected, a pre-integrated floating button component is obtained for display;
[0075] S207, receiving an interactive operation on the floating button component, and moving to a target position coordinate point based on the interactive operation;
[0076] S208, obtaining multiple parameters corresponding to the target position coordinate point, and generating a mapping identifier according to the multiple parameters;
[0077] S209, mapping a main function corresponding to the mapping identifier from the floating button component, and determining the main function as the target function of the target position point;
[0078] S210, inputting a plurality of parameters corresponding to the target position coordinate point into the target function to generate a function.
[0079] In the embodiment of the present application, when the function creation device based on the floating button component first detects the project creation instruction, it obtains the pre-integrated floating button component for display, then receives the interactive operation for the floating button component, moves to the target position coordinate point based on the interactive operation, and then obtains multiple parameters corresponding to the target position coordinate point, and generates a mapping identifier based on the multiple parameters, and then maps the main function corresponding to the mapping identifier from the floating button component, and determines the main function as the target function of the target position point, and finally inputs the multiple parameters corresponding to the target position coordinate point into the target function to generate the function. Since the present solution encapsulates the commonly used logic code into a function and integrates the encapsulated function into the pre-designed floating button, the developer can write the function logic by calling the function in the floating button when writing the function code, so that the component design and the business function design are organically combined, thereby realizing that in the complete function creation process, the user can develop zero code based on the visual interface, and simplifies the function creation process and improves the function development efficiency.
[0080] In order to facilitate understanding of the function creation method based on the floating button component provided in the embodiment of the present application, the following is a Figure 5 For explanation. Figure 5 As shown, a function creation method based on a floating button component includes:
[0081] S301, obtain the current mainstream development framework;
[0082] S302, parsing source code in a mainstream development framework, and obtaining main functions in the source code from the parsed source code to generate a main function set;
[0083] S303, analyzing semantic information corresponding to the logic implemented by each trunk function in the trunk function set;
[0084] S304, use the front-end interface design language to design the floating button;
[0085] S305, setting different coordinate points in the floating button, and associating the different coordinate points set in the floating button with semantic information corresponding to the logic implemented by each trunk function, to generate an integrated floating button component;
[0086] S306, when a project creation instruction is detected, a pre-integrated floating button component is obtained for display;
[0087] S307, receiving an interactive operation on the floating button component, and moving to a target position coordinate point based on the interactive operation;
[0088] S308, obtaining multiple parameters corresponding to the target position coordinate point, and generating a mapping identifier according to the multiple parameters;
[0089] S309, mapping the trunk function corresponding to the mapping identifier from the floating button component, and determining the trunk function as the target function of the target position point;
[0090] S310, input multiple parameters corresponding to the target position coordinate point into the objective function to generate a function.
[0091] In the embodiment of the present application, when the function creation device based on the floating button component first detects the project creation instruction, it obtains the pre-integrated floating button component for display, then receives the interactive operation for the floating button component, moves to the target position coordinate point based on the interactive operation, and then obtains multiple parameters corresponding to the target position coordinate point, and generates a mapping identifier based on the multiple parameters, and then maps the main function corresponding to the mapping identifier from the floating button component, and determines the main function as the target function of the target position point, and finally inputs the multiple parameters corresponding to the target position coordinate point into the target function to generate the function. Since the present solution encapsulates the commonly used logic code into a function and integrates the encapsulated function into the pre-designed floating button, the developer can write the function logic by calling the function in the floating button when writing the function code, so that the component design and the business function design are organically combined, thereby realizing that in the complete function creation process, the user can develop zero code based on the visual interface, and simplifies the function creation process and improves the function development efficiency.
[0092] The following are embodiments of the device of the present invention, which can be used to implement the method embodiments of the present invention. For details not disclosed in the device embodiments of the present invention, please refer to the method embodiments of the present invention.
[0093] See also Figure 6, which shows a schematic diagram of the structure of a function creation device based on a floating button component provided by an exemplary embodiment of the present invention, which is applied to a server. The function creation system based on the floating button component can be implemented as all or part of a device through software, hardware, or a combination of both. The device 1 includes a text acquisition module 10, a text conversion module 20, a feature extraction module 30, a first data output module 40, a second data output module 50, and a third data output module 60.
[0094] The floating button component acquisition module 10 is used to acquire a pre-integrated floating button component for display when a project creation instruction is detected;
[0095] The floating button component moving module 20 is used to receive an interactive operation on the floating button component and move to a target position coordinate point based on the interactive operation;
[0096] A mapping identifier generating module 30 is used to obtain a plurality of parameters corresponding to the target position coordinate point and generate a mapping identifier according to the plurality of parameters;
[0097] The objective function determination module 40 is used to map the trunk function corresponding to the mapping identifier from the floating button component, and determine the trunk function as the objective function of the target position point;
[0098] The function generation module 50 is used to input a plurality of parameters corresponding to the target position coordinate point into the target function to generate a function.
[0099] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0100] In the embodiment of the present application, when the function creation device based on the floating button component first detects the project creation instruction, it obtains the pre-integrated floating button component for display, then receives the interactive operation for the floating button component, moves to the target position coordinate point based on the interactive operation, and then obtains multiple parameters corresponding to the target position coordinate point, and generates a mapping identifier based on the multiple parameters, and then maps the main function corresponding to the mapping identifier from the floating button component, and determines the main function as the target function of the target position point, and finally inputs the multiple parameters corresponding to the target position coordinate point into the target function to generate the function. Since the present solution encapsulates the commonly used logic code into a function and integrates the encapsulated function into the pre-designed floating button, the developer can write the function logic by calling the function in the floating button when writing the function code, so that the component design and the business function design are organically combined, thereby realizing that in the complete function creation process, the user can develop zero code based on the visual interface, and simplifies the function creation process and improves the function development efficiency.
[0101] In one embodiment, a device is proposed, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented: when a project creation instruction is detected, a pre-integrated floating button component is obtained for display; an interactive operation for the floating button component is received, and a target position coordinate point is moved based on the interactive operation; multiple parameters corresponding to the target position coordinate point are obtained, and a mapping identifier is generated based on the multiple parameters; a main function corresponding to the mapping identifier is mapped from the floating button component, and the main function is determined as the target function of the target position point; and multiple parameters corresponding to the target position coordinate point are input into the target function to generate a function.
[0102] In one embodiment, when the processor executes and detects a project creation instruction, it obtains a pre-integrated floating button component for display and specifically performs the following operations: when a project creation instruction is detected, the traffic message corresponding to the project creation instruction is captured; the traffic message is parsed to generate a parsed traffic message; from the parsed traffic message, it is identified whether there is a project creation identifier in the software development environment; when there is a project creation identifier in the software development environment, the pre-integrated floating button component is loaded for display.
[0103] In one embodiment, when the processor executes to generate a pre-integrated floating button component, the following operations are specifically performed: obtaining historical business logic codes, and extracting trunk function nodes corresponding to each business logic from the historical business logic codes to generate a trunk function node set; semantically marking each trunk function in the trunk function node set to generate a first trunk function node set after marking the semantics; counting the number of trunk function nodes with the same semantics from the first trunk function node set after marking the semantics, and obtaining trunk function nodes whose number of trunk function nodes is greater than a preset number to generate a second trunk node set; designing a floating button using a front-end interface design language; setting different coordinate points in the floating button, and mapping and associating the set different coordinate points with each trunk function in the second trunk node set to generate an integrated floating button component.
[0104] In one embodiment, when the processor executes to generate a pre-integrated floating button component, the following operations are specifically performed: obtaining the current mainstream development framework; parsing the source code in the mainstream development framework, and obtaining the main functions in the source code from the parsed source code to generate a main function set; analyzing the semantic information corresponding to the logic implemented by each main function in the main function set; using the front-end interface design language to design a floating button; setting different coordinate points in the floating button, and associating the different coordinate points set in the floating button with the semantic information corresponding to the logic implemented by each main function to generate an integrated floating button component.
[0105] In one embodiment, when the processor executes counting the number of trunk function nodes with the same semantics from the first trunk function node set after marking the semantics, the following specific operations are performed: a sliding window algorithm is used to create a sliding window; each trunk function in the first trunk function node set after marking the semantics is input into the sliding window in turn, and the number of trunk function nodes with the same semantics is output.
[0106] In one embodiment, when the processor executes to obtain multiple parameters corresponding to the target position coordinate point and generates a mapping identifier based on the multiple parameters, the following specific operations are performed: multiple parameters corresponding to the target position point are obtained from the memory address; a parameter arrangement instruction is received, and the sequence of each object identifier in the floating button component is obtained according to the parameter arrangement instruction; the multiple parameters corresponding to the target position point are arranged according to a preset parameter arrangement rule to generate multiple arranged parameters; it is identified whether the sequence corresponding to the object identifiers of the multiple parameters after the arrangement is consistent with the sequence corresponding to the object identifiers in the floating button component; when the identified sequence is consistent, the multiple parameters corresponding to the target position point are converted into bytecodes and a mapping identifier is generated.
[0107] In one embodiment, a medium storing computer-readable instructions is proposed. When the computer-readable instructions are executed by one or more processors, the one or more processors perform the following steps: when a project creation instruction is detected, a pre-integrated floating button component is obtained for display; an interactive operation for the floating button component is received, and the target position coordinate point is moved based on the interactive operation; multiple parameters corresponding to the target position coordinate point are obtained, and a mapping identifier is generated according to the multiple parameters; a main function corresponding to the mapping identifier is mapped from the floating button component, and the main function is determined as the target function of the target position point; and multiple parameters corresponding to the target position coordinate point are input into the target function to generate a function.
[0108] In one embodiment, when the processor executes and detects a project creation instruction, it obtains a pre-integrated floating button component for display and specifically performs the following operations: when a project creation instruction is detected, the traffic message corresponding to the project creation instruction is captured; the traffic message is parsed to generate a parsed traffic message; from the parsed traffic message, it is identified whether there is a project creation identifier in the software development environment; when there is a project creation identifier in the software development environment, the pre-integrated floating button component is loaded for display.
[0109] In one embodiment, when the processor executes to generate a pre-integrated floating button component, the following operations are specifically performed: obtaining historical business logic codes, and extracting trunk function nodes corresponding to each business logic from the historical business logic codes to generate a trunk function node set; semantically marking each trunk function in the trunk function node set to generate a first trunk function node set after marking the semantics; counting the number of trunk function nodes with the same semantics from the first trunk function node set after marking the semantics, and obtaining trunk function nodes whose number of trunk function nodes is greater than a preset number to generate a second trunk node set; designing a floating button using a front-end interface design language; setting different coordinate points in the floating button, and mapping and associating the set different coordinate points with each trunk function in the second trunk node set to generate an integrated floating button component.
[0110] In one embodiment, when the processor executes to generate a pre-integrated floating button component, the following operations are specifically performed: obtaining the current mainstream development framework; parsing the source code in the mainstream development framework, and obtaining the main functions in the source code from the parsed source code to generate a main function set; analyzing the semantic information corresponding to the logic implemented by each main function in the main function set; using the front-end interface design language to design a floating button; setting different coordinate points in the floating button, and associating the different coordinate points set in the floating button with the semantic information corresponding to the logic implemented by each main function to generate an integrated floating button component.
[0111] In one embodiment, when the processor executes counting the number of trunk function nodes with the same semantics from the first trunk function node set after marking the semantics, the following specific operations are performed: a sliding window algorithm is used to create a sliding window; each trunk function in the first trunk function node set after marking the semantics is input into the sliding window in turn, and the number of trunk function nodes with the same semantics is output.
[0112] In one embodiment, when the processor executes to obtain multiple parameters corresponding to the target position coordinate point and generates a mapping identifier based on the multiple parameters, the following specific operations are performed: multiple parameters corresponding to the target position point are obtained from the memory address; a parameter arrangement instruction is received, and the sequence of each object identifier in the floating button component is obtained according to the parameter arrangement instruction; the multiple parameters corresponding to the target position point are arranged according to a preset parameter arrangement rule to generate multiple arranged parameters; it is identified whether the sequence corresponding to the object identifiers of the multiple parameters after the arrangement is consistent with the sequence corresponding to the object identifiers in the floating button component; when the identified sequence is consistent, the multiple parameters corresponding to the target position point are converted into bytecodes and a mapping identifier is generated.
[0113] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The above-mentioned medium can be a non-volatile medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0114] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0115] The above embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present invention. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention patent shall be subject to the attached claims.
Claims
1. A function creation method based on a floating button component, characterized in that: The method comprises: When a project creation instruction is detected, a pre-integrated floating button component is obtained for display; wherein, Generate a pre-integrated floating button component by following the steps below, including: Obtain the current mainstream development framework; Parsing the source code in the mainstream development framework, and obtaining the main functions in the source code from the parsed source code to generate a main function set; Analyze semantic information corresponding to the logic implemented by each trunk function in the trunk function set; Use the front-end interface design language to design floating buttons; Setting different coordinate points in the floating button, and associating the different coordinate points set in the floating button with semantic information corresponding to the logic implemented by each trunk function to generate an integrated floating button component; Receiving an interactive operation on the floating button component, and moving to a target position coordinate point based on the interactive operation; Acquire multiple parameters corresponding to the target position coordinate point, and generate a mapping identifier according to the multiple parameters; wherein the multiple parameters of the target position coordinate point at least include a function mapping identifier, a page material view, and an XML object of page filling data; Mapping a trunk function corresponding to the mapping identifier from the floating button component, and determining the trunk function as a target function of the target position coordinate point; Input multiple parameters corresponding to the target position coordinate point into the objective function to generate a function.
2. The method according to claim 1, characterized in that When the project creation instruction is detected, a pre-integrated floating button component is obtained for display, including: When a project creation instruction is detected, a traffic message corresponding to the project creation instruction is captured; Parsing the flow message to generate a parsed flow message; Identify from the parsed traffic message whether there is a project creation identifier in the software development environment; When there is a project creation mark in the software development environment, a pre-integrated floating button component is loaded for display.
3. The method according to claim 1, characterized in that The method of detecting the project creation instruction includes a hardware detection method or a software detection method; The detection project creation instruction includes: When the method for detecting the project creation instruction is a hardware detection method, the project creation instruction in the software development environment is detected in real time based on a preset flow probe; and When the detection project creation instruction mode is software detection mode, obtain the current existing traffic message data; Using a message classification algorithm to classify the currently existing traffic message data to generate multiple categories of traffic messages; Obtain project creation instructions in the software development environment from the multiple categories of traffic messages.
4. The method according to claim 1, characterized in that: Generate a pre-integrated floating button component by following the steps below, including: Obtaining historical business logic codes, and extracting trunk function nodes corresponding to each business logic from the historical business logic codes to generate a trunk function node set; Performing semantic labeling on each trunk function in the trunk function node set to generate a first trunk function node set after semantic labeling; Counting the number of trunk function nodes with the same semantics from the first trunk function node set after the semantics are marked, and obtaining the trunk function nodes whose number of trunk function nodes is greater than a preset number to generate a second trunk node set; Use the front-end interface design language to design floating buttons; Different coordinate points are set in the floating button, and the set different coordinate points are mapped and associated with each trunk function in the second trunk node set to generate an integrated floating button component.
5. The method according to claim 4, characterized in that The counting of the number of trunk function nodes with the same semantics from the first trunk function node set after the semantics are marked includes: The sliding window algorithm creates a sliding window; Each trunk function in the first trunk function node set after the semantics are marked is input into the sliding window in sequence, and the number of trunk function nodes with the same semantics is output.
6. The method according to claim 1, characterized in that The acquiring a plurality of parameters corresponding to the target position coordinate point and generating a mapping identifier according to the plurality of parameters includes: Get multiple parameters corresponding to the target position coordinate point from the memory address; Receiving a parameter arrangement instruction, and obtaining the sequence of each object identifier in the floating button component according to the parameter arrangement instruction; Arrange multiple parameters corresponding to the target position coordinate point according to a preset parameter arrangement rule to generate multiple arranged parameters; Identify whether the order of the object identifiers of the arranged multiple parameters is consistent with the order of the object identifiers in the floating button component; When the sequence is consistent, multiple parameters corresponding to the target position coordinate point are converted into bytecodes to generate a mapping identifier.
7. A function creation device based on a floating button component, characterized in that: The device comprises: The floating button component acquisition module is used to acquire the pre-integrated floating button component for display when a project creation instruction is detected; wherein, Generate a pre-integrated floating button component by following the steps below, including: Obtain the current mainstream development framework; Parsing the source code in the mainstream development framework, and obtaining the main functions in the source code from the parsed source code to generate a main function set; Analyzing semantic information corresponding to the logic implemented by each trunk function in the trunk function set; Use the front-end interface design language to design floating buttons; Setting different coordinate points in the floating button, and associating the different coordinate points set in the floating button with semantic information corresponding to the logic implemented by each trunk function to generate an integrated floating button component; A floating button component moving module, used to receive an interactive operation on the floating button component, and move to a target position coordinate point based on the interactive operation; A mapping identifier generation module, used to obtain multiple parameters corresponding to the target position coordinate point, and generate a mapping identifier according to the multiple parameters; wherein the multiple parameters of the target position coordinate point at least include a function mapping identifier, a page material view, and an XML object of page filling data; An objective function determination module, used to map a trunk function corresponding to the mapping identifier from the floating button component, and determine the trunk function as the objective function of the target position coordinate point; The function generation module is used to input multiple parameters corresponding to the target position coordinate point into the target function to generate a function.
8. An electronic device, comprising a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the steps of the function creation method based on the floating button component as claimed in any one of claims 1 to 6.
9. A medium storing computer-readable instructions, wherein when the computer-readable instructions are executed by one or more processors, the one or more processors execute the method for creating a function based on a floating button component according to any one of claims 1 to 6.
