Function development method and related device
By using development web pages in client application development to achieve target functions, the problem that development program code in the prior art needs to deal with the calling logic and relationships of multiple network interfaces is solved, and development efficiency and cohesion are improved.
Patent Information
- Application Number
- CN202411318984.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-21
- Publication Date
- 2025-02-14
AI Technical Summary
In the development of existing client programs, the development program code needs to handle the calling logic and relationships of multiple network interfaces, which increases the complexity of application development.
By receiving selection instructions, selecting the target function, and obtaining the development web page corresponding to the target function, entering the development data in the development web page, and submitting the development web page to achieve the target function, without the need for the client to call the corresponding background interface.
It improves the development efficiency of client applications, reduces development complexity, and improves the cohesion of client programs.
Smart Images

Figure CN119440570A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of client function development, and in particular to a function development method and related devices. Background Art
[0002] In the existing client application development, the client often needs to call different functional modules in the server to implement the corresponding functions. In order to call the functional modules in the server, it is necessary to call the corresponding background interface, and different development program codes are often required to be configured for different functional modules so that the client application can successfully call the corresponding background interface to implement the corresponding function. Based on this, in the existing client program development, the development program code needs to handle the calling logic and relationship of multiple network interfaces, which increases the complexity of application development. Summary of the invention
[0003] In response to the above problems, the example of the present application provides a function development method and related devices. Adopting the solution of the present application is conducive to improving the development efficiency of client applications.
[0004] In a first aspect, an embodiment of the present application provides a function development method, including: receiving a selection instruction, the selection instruction instructing to select a target function from multiple indirect call functions, the indirect call function being a function that cannot be implemented by calling a background interface corresponding to the indirect call function; obtaining a development web page corresponding to the target function; entering development data of the target function in the development web page, and submitting the development web page.
[0005] It can be seen that in the embodiment of the present application, the client provides the server with development data for implementing the target function based on the development webpage of the target function, so that the target function is implemented through the server without the need for the client to call the corresponding background interface to implement the target function. Therefore, when developing the client's application, there is no need to configure the relevant program for calling the background interface corresponding to the target function, thereby improving the development efficiency of the client application.
[0006] In combination with the first aspect, in a possible embodiment, obtaining a development web page corresponding to a target function includes: sending a first request, the first request is used to request to obtain a target link of the development web page corresponding to the target function; receiving a first response, the first response includes the target link; sending a second request according to the target link; receiving a second response, the second response includes the development web page.
[0007] It can be seen that in the embodiment of the present application, by obtaining a development web page according to the target link, and then submitting development data to the server according to the development web page, the target function is realized through the server, so that when developing the application program on the client, there is no need to configure the related program of calling the background interface corresponding to the target function, thereby improving the cohesion of the client program and the development efficiency of the client application.
[0008] In combination with the first aspect, in a possible embodiment, the first request includes custom information, and the first request is also used to instruct the server to adjust the interface appearance of the development webpage according to the custom information so that the interface appearance of the development webpage is consistent with the interface appearance of the client.
[0009] In combination with the first aspect, in a possible embodiment, before receiving the selection instruction, the method also includes: obtaining function specification information, determining a direct call function and an indirect call function according to the function specification information, the direct call function being a function that can be implemented by calling a background interface corresponding to the direct call function; obtaining an update file, and updating the local program according to the update file, so that after the local program is updated, the direct call function can be implemented by calling the background interface corresponding to the direct call function.
[0010] It can be seen that in the embodiment of the present application, the server specifies multiple indirect call functions to the client, and the client determines the target function from the multiple indirect call functions, and then improves the development efficiency of the client application by realizing the target function according to the development web page. The server can determine the number of indirect call functions according to the server load, improve the utilization rate of the server performance, and improve the data processing efficiency between the server and the client.
[0011] In the second aspect, an embodiment of the present application provides a function development method, including: obtaining a first request, determining a development web page corresponding to a target function based on the first request; generating a target link of the development network; sending a first response, the first response including the target link; obtaining a second request for the target link; sending a second response, the second response including the development web page; obtaining a submitted development web page, extracting development data from the submitted development web page; calling a background interface corresponding to the target function based on the development data to implement the target function.
[0012] It can be seen that in the embodiments of the present application, the server provides a development page to the client, thereby obtaining the development data required to implement the target function according to the development page, and calling the corresponding background interface according to the development data, so that the client does not need to configure the corresponding program of the background interface corresponding to the target function, thereby improving the development efficiency of the client application.
[0013] In combination with the second aspect, in a possible embodiment, before sending the second response, the method also includes: recording a first timestamp when sending the first response; before sending the second response, recording a second timestamp when obtaining the second request; calculating the time interval between the first timestamp and the second timestamp; if the time interval is less than a preset interval, executing the step of sending the second response.
[0014] It can be seen that in an embodiment of the present application, whether the client sending the first request and the second request are the same client is determined by the time interval between the server sending the first response and obtaining the second request. When it is determined that the client sending the first request and the second request are the same client, the second response is sent, thereby ensuring the data security of the client user.
[0015] In combination with the second aspect, in a possible embodiment, before obtaining the first request, the method also includes: obtaining the number of connected clients; if the number of clients connected to the server is not greater than a preset number, determining the main function and multiple additional functions provided to the client as indirect call functions; wherein the main function is determined according to the device type of the client, the additional function is the function of the client other than the main function, and the indirect call function is the function that the client cannot implement by calling the background interface corresponding to the indirect call function; if the number of clients connected to the server is greater than a preset number, determining the main function provided by the server to the client as a direct call function, and the direct call function is a function that can be implemented by the client calling the corresponding background interface; sending function specification information, the specification information is used to specify multiple indirect call functions to the client.
[0016] It can be seen that in the embodiment of the present application, the number of directly called functions and the number of indirectly called functions are balanced by determining the load level of the server. The performance of the server is maximized, and when the load level of the server is relatively low, a large number of client functions can be realized by developing web pages, without the need to configure the corresponding program of the background interface corresponding to the call target function, thereby improving the development efficiency of the client application and saving the storage space of the client.
[0017] In a third aspect, an embodiment of the present application provides a client for executing a function development method, the client comprising:
[0018] A receiving unit: used for receiving a selection instruction, the selection instruction instructing to select a target function from a plurality of indirect call functions, the indirect call function being a function that the client cannot implement by calling a background interface corresponding to the indirect call function;
[0019] Acquisition unit: used to acquire the development webpage corresponding to the target function;
[0020] Submission unit: used to input development data of target functions in the development web page and submit the development web page.
[0021] In a fourth aspect, an embodiment of the present application provides a server for executing a function development method, the server comprising:
[0022] An acquisition unit is used to acquire the first request and determine a development webpage corresponding to the target function according to the first request;
[0023] Generation unit: used to generate target links for development network;
[0024] Sending unit: used for sending a first response, wherein the first response includes a target link;
[0025] The acquisition unit is also used to acquire a second request for the target link;
[0026] The sending unit is also used to send a second response, wherein the second response includes a development web page;
[0027] The acquisition unit is also used to acquire the submitted development webpage and extract the development data from the submitted development webpage;
[0028] Calling unit: used to call the background interface corresponding to the target function according to the development data to realize the target function.
[0029] In a fifth aspect, an embodiment of the present application provides an electronic device comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and one or more instructions are suitable for being loaded by the processor and executing part or all of the method of the first aspect and / or the second aspect.
[0030] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the method of the first aspect and / or the second aspect.
[0031] In a seventh aspect, the present application provides a computer program product. When a computer reads and executes the computer program product, the computer executes part or all of the method of the first aspect and / or the second aspect.
[0032] It can be understood that the beneficial effects of the embodiments described in the third to seventh aspects can refer to the beneficial effects of the methods described in the first to second aspects, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0034] Figure 1 A schematic diagram of an application scenario of a function development method provided in an embodiment of the present application;
[0035] Figure 2 A flowchart of a function development method provided in an embodiment of the present application;
[0036] Figure 3 A schematic diagram of a development web page provided in an embodiment of the present application;
[0037] Figure 4 A comparison diagram of implementation paths of a target function provided in an embodiment of the present application;
[0038] Figure 5 A flowchart of another function development method provided in an embodiment of the present application;
[0039] Figure 6 A schematic diagram of another web page development method provided in an embodiment of the present application;
[0040] Figure 7 A schematic diagram of an event timeline of a server provided in an embodiment of the present application;
[0041] Figure 8 A schematic diagram of an interaction process between a client and a server provided in an embodiment of the present application;
[0042] Fig. 9 A schematic diagram of the structure of a client provided in an embodiment of the present application;
[0043] Fig.10 A schematic diagram of the structure of a server provided in an embodiment of the present application;
[0044] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0045] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0046] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0047] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0048] The embodiments of the present application are described below in conjunction with the accompanying drawings.
[0049] See also Figure 1 , Figure 1 A schematic diagram of an application scenario of a function development method provided in an embodiment of the present application, wherein the application scenario 100 includes a client 101, a server 102 and a device 103.
[0050] The client 101 here can be a computer terminal, a mobile terminal, a vehicle-mounted terminal or a terminal device for a user. The client 101 is connected to the server 102, and sends and receives information to the server 102 to realize the functions of the client 101 or the functions of the device 103. The device 103 here can be a vehicle, a smart home appliance, etc.
[0051] In the embodiment of the present application, the client 101 obtains a selection instruction, where the selection instruction is input to the client 101 by the user according to the input hardware such as the touch screen or control buttons of the client 101. The client 101 selects a target function from multiple indirect call functions according to the selection instruction, and the indirect call function is a function that cannot be implemented by calling the background interface corresponding to the indirect call function, and the target function specifically includes information query, obtaining verification code, resetting password, etc.
[0052] The client 101 obtains a development webpage corresponding to the target function. Since the client 101 is not configured with a related program for calling a background interface corresponding to the target function, the target function is implemented by obtaining a development webpage corresponding to the target function in the embodiment of the present application.
[0053] To obtain the development webpage corresponding to the target function, the server 102 first obtains the first request, and determines the development webpage corresponding to the target function according to the first request, wherein the first request includes an indication mark of the target function, so that the server 102 determines the target function according to the indication mark. The development webpage here is specifically generated according to the target function, or is edited by the developer in advance and saved in the server 102.
[0054] The server 102 generates a target link for the development webpage, and sends a first response including the target link to the client 101 .
[0055] After receiving the second request for the target link sent by the client 101 , the server 102 sends a second response including a development webpage to the client 101 .
[0056] The client 101 inputs the development data of the target function in the development webpage according to the user's instruction and submits the development webpage. The development data here refers to the data required to realize the target function. For example, if the target function is query information, the development data includes data type, query range, etc.
[0057] After the client 101 submits the web page, it does not need to call the corresponding background interface to realize the target function. The server 102 will automatically obtain the development data according to the development web page and call the corresponding background interface to realize the target function.
[0058] It can be seen that in the embodiment of the present application, the client provides the server with the development data required to implement the target function based on the development webpage of the target function, so that the target function is implemented through the server without the need for the client to call the corresponding background interface to implement the target function. Therefore, when developing the client's application, there is no need to configure the relevant program for calling the background interface corresponding to the target function, thereby improving the development efficiency of the client application.
[0059] See also Figure 2 , Figure 2 A flow chart of a function development method provided in an embodiment of the present application can be based on Figure 1 The application scenario shown is implemented as follows Figure 2 As shown, steps S201-S203 are included:
[0060] S201: The client receives a selection instruction, where the selection instruction indicates selecting a target function from a plurality of indirect call functions, where the indirect call function is a function that cannot be implemented by calling a background interface corresponding to the indirect call function.
[0061] Specifically, the selection instruction here is sent by the user to the client, and the client displays multiple indirect call functions to the user through the display screen, so that the user can send the selection instruction through the input device and select the target function from the multiple indirect call functions. When the client implements any function, it usually needs to send data to the server, obtain data, modify data, etc. To implement the above steps, the client needs to call different background interfaces, and the call port needs to develop and configure related programs in the client.
[0062] S202: The client obtains a development webpage corresponding to the target function.
[0063] Specifically, the development webpage here uses the development data corresponding to the target function to enable the client to send the development webpage to the server to achieve the target function. The development webpage accesses the development webpage through the target link corresponding to the target function, and the target link is obtained by the client requesting the server or stored in the client.
[0064] The target link is specifically sent to the client in the form of a uniform resource locator (URL) or a QR code.
[0065] For example, see Figure 3 , Figure 3 A schematic diagram of a development webpage provided for an embodiment of the present application, in which it can be seen that a virtual button corresponding to the password reset function "Reset Password" is included in the display interface of the client, and the user can input a selection instruction by clicking and other operations, and the reset password function is determined as the target function through the selection instruction. The client then obtains the development webpage corresponding to the reset password and displays it in the display interface of the client. The user can enter development data such as product serial number, user name, verification code, new password, etc. based on the development webpage to realize the function of resetting the password.
[0066] In a possible embodiment, obtaining a development web page corresponding to a target function includes: sending a first request, the first request is used to request obtaining a target link of the development web page corresponding to the target function; receiving a first response, the first response includes the target link; sending a second request according to the target link; receiving a second response, the second response includes the development web page.
[0067] Specifically, before obtaining the development webpage corresponding to the target function, it is also necessary to first obtain the target link corresponding to the development webpage of the target function. The client sends a first request to the server to request the server to obtain the target link of the development webpage corresponding to the target function through the first request.
[0068] After receiving the first request, the server generates a target link of a development webpage corresponding to the target function according to the first request, where the development webpage corresponding to the target function is pre-edited and stored in the server.
[0069] Optionally, after receiving the first request, the server determines the development data required to implement the target function according to the first request; generates a development webpage corresponding to the target function according to the development data required to implement the target function; and generates a corresponding target link according to the development webpage corresponding to the target function.
[0070] After the client receives the target link, the method also includes: verifying whether an access consent request is received before sending the second request, and after receiving the access consent instruction input by the user, sending the second request according to the target link; receiving a second response, which includes a development web page.
[0071] Furthermore, after receiving the second response, the client determines the correspondence between the target link and the target function, so as to directly send a second request to the server according to the target link when the target function needs to be implemented next time.
[0072] It can be seen that in the embodiment of the present application, by obtaining a development web page according to the target link, and then submitting development data to the server according to the development web page, the target function is realized through the server, so that when developing the application program on the client, there is no need to configure the related program of calling the background interface corresponding to the target function, thereby improving the cohesion of the client program and the development efficiency of the client application.
[0073] In a possible embodiment, after receiving the second response, the default browser of the application end is determined; if the default browser of the application end is determined successfully, the development web page corresponding to the target function is obtained according to the default browser; if the default browser of the application end is determined unsuccessfully, the development web page corresponding to the target function is obtained according to the third-party network access library.
[0074] Specifically, if a browser is installed in the client, the development webpage is accessed according to the default browser. If a browser is not installed in the client, the development webpage is accessed according to a third-party network access library, which generally refers to a software library developed and maintained by an independent developer or organization for network requests and communications. These libraries generally provide more advanced functions and ease of use than standard libraries, such as processing various network protocols, supporting asynchronous requests, processing authentication, data serialization and deserialization, etc. When a browser is not installed in the client, the function of obtaining the development webpage can be implemented through a third-party network access library.
[0075] In a possible embodiment, the first request includes the custom information, and the first request is further used to instruct the server to adjust the interface appearance of the development webpage according to the custom information so that the interface appearance of the development webpage is consistent with the interface appearance of the client.
[0076] Specifically, after the server determines or generates the development webpage, it can also modify the interface appearance of the development webpage according to the customized information, so that the interface appearance of the development webpage is consistent with the interface appearance of the client, thereby improving the user experience.
[0077] S203: The client inputs development data of the target function in the development webpage and submits the development webpage.
[0078] Specifically, the development webpage indicates the development data required to achieve the target function, and the development data is input by the user after the development webpage is displayed to the user. After the development data is submitted to the server, the server implements the target function according to the development data in the development webpage.
[0079] For example, see Figure 4 , Figure 4 A comparison diagram of the implementation path of a target function provided in an embodiment of the present application, wherein in the prior art, a pre-configured step program for a backend interface on the client generates corresponding development information according to development data, and then the client calls the backend interface to input the development information into the server through the backend interface to mobilize the corresponding target function module to implement the target function. In an embodiment of the present application, the development data is directly submitted to the server through a development webpage, the service obtains the corresponding development data from the development webpage, and then the server calls the corresponding backend interface and the target function module to implement the target function.
[0080] In a possible embodiment, before receiving the selection instruction, the method also includes: obtaining function specification information, determining a direct call function and an indirect call function according to the function specification information, the direct call function being a function that can be implemented by calling a background interface corresponding to the direct call function; obtaining an update file, and updating the local program according to the update file, so that after the local program is updated, the direct call function can be implemented by calling the background interface corresponding to the direct call function.
[0081] Specifically, the indirect call function is specified by the server. After the client establishes a connection with the server, the server informs the client of the implementation modes of different functions by sending function specification information.
[0082] For the direct calling function, there is a related program in the client to call the corresponding background interface. The client obtains the corresponding development data and calls the corresponding background interface to process the development data to realize the corresponding direct calling function.
[0083] For the indirect calling function, the client sends the development webpage including the development data to the server through the development webpage described in the above embodiment, and the server calls the corresponding background interface to implement the corresponding indirect calling function.
[0084] Based on the above reasons, the indirect call function requires the server to process more data, thereby causing a greater server load. Therefore, when the server load is heavy, the server determines part of the indirect call function as a direct call function to reduce the server load, but the client does not have the ability to call the background interface corresponding to the indirect call function, so it is necessary to send the corresponding update file to the client so that the client can implement the direct call function by calling the background interface corresponding to the direct call function after the update. When the server load is low, the client does not need to install the program corresponding to the indirect call function, thereby reducing the client's storage space usage.
[0085] It can be seen that in the embodiment of the present application, the server specifies multiple indirect call functions to the client, and the client determines the target function from the multiple indirect call functions, and then improves the development efficiency of the client application by realizing the target function according to the development web page. The server can determine the number of indirect call functions according to the server load, improve the utilization rate of the server performance, and improve the data processing efficiency between the server and the client.
[0086] See also Figure 5 , Figure 5 A flow chart of another function development method provided in an embodiment of the present application can be based on Figure 1 The application scenario shown is implemented, including steps S501-S507:
[0087] S501: The server obtains a first request, and determines a development webpage corresponding to a target function according to the first request.
[0088] Specifically, the first request here is sent by the client, and the client indicates the need to implement the target function through the first request. If the server stores a plurality of pre-edited development web pages corresponding to different functions, the development web page corresponding to the target function is determined from the development web pages corresponding to the plurality of different functions. If the server does not store the corresponding development web page, the development web page corresponding to the target function is generated according to the first request.
[0089] In a possible embodiment, before obtaining the first request, the method also includes: obtaining the number of connected clients; if the number of clients connected to the server is not greater than a preset number, determining the main function and multiple additional functions provided to the client as indirect call functions; wherein the main function is determined according to the device type of the client, the additional function is the function of the client other than the main function, and the indirect call function is the function that the client cannot implement by calling the background interface corresponding to the indirect call function; if the number of clients connected to the server is greater than a preset number, determining the main function provided by the server to the client as a direct call function, and the direct call function is the function that can be implemented by the client calling the corresponding background interface; sending function specification information, the specification information is used to specify multiple indirect call functions to the client.
[0090] Specifically, in actual application scenarios, the server needs to connect to multiple clients at the same time and provide services to multiple clients. The more clients the server connects to, the greater the server load. Therefore, when the number of clients connected to the server is large, it is necessary to adjust the number of direct call functions and indirect call functions, thereby reducing the server load by reducing the number of indirect call functions that occupy a greater load.
[0091] Based on the above reasons, the server first determines the current load of the server according to the number of connected clients. If the number of clients connected to the server is not greater than a preset number, the main function and multiple accessory functions provided to the client are determined as indirect call functions.
[0092] The main function here is determined by the device type of the client. For example, if the client is a diagnostic instrument for diagnosing vehicles, the diagnostic function is the main function; if the client is a navigation device that provides navigation for vehicles, the navigation function is the main function. In addition to the main function, other functions that require the client to call the server's backend interface to implement are all accessory functions.
[0093] If the number of clients connected to the server is not greater than a preset number, that is, when the server load is low, the client's main function and multiple accessory functions are determined as indirect call functions. The indirect call function is implemented based on the development web page. In this scenario, when the developer develops the client application, there is no need to configure the relevant program of the background interface corresponding to the indirect call function, which improves the development efficiency of the client application and reduces the storage space occupied by the client.
[0094] If the number of clients connected to the server is greater than the preset number, that is, when the server load is high, the main function provided by the server to the client is determined to be a direct call function. When the direct call function is implemented, the client calls the backend interface in the server to implement the corresponding function, thereby reducing the service load.
[0095] Furthermore, if the number of clients connected to the server is greater than a preset number, the server's processing load is determined based on the number of development web pages sent by the server per unit time. When the server's processing load is greater than a preset load threshold, the main function provided by the server to the client is determined as a direct call function.
[0096] Furthermore, if after the main function provided by the server to the client is determined as a direct call function, the processing load of the server is not greater than a preset load threshold, the main function provided by the server to the client is re-determined as an indirect call function.
[0097] It can be seen that in the embodiment of the present application, the number of directly called functions and the number of indirectly called functions are balanced by determining the load level of the server. The performance of the server is maximized, and when the load level of the server is relatively low, a large number of client functions can be realized by developing web pages, without the need to configure the corresponding program of the background interface corresponding to the call target function, thereby improving the development efficiency of the client application and saving the storage space of the client.
[0098] In a possible embodiment, after determining the development web page corresponding to the target function according to the first request, known data is obtained, where the known data is data known to the server among multiple development data provided by the client as indicated by the development web page; encrypted data is generated based on the known data; and the encrypted data is input into the development web page, indicating that the client does not need to input the development data corresponding to the encrypted data.
[0099] Specifically, see Figure 6 , Figure 6 A schematic diagram of another development webpage provided for an embodiment of the present application, wherein the client is instructed to input four development data, namely, mobile phone / email, password, confirmation password and verification code. The encrypted data "134****1234" is entered in the mobile phone / email column, and the encrypted data is generated based on the user mobile phone number corresponding to the client stored in the server. After determining the development webpage, the server generates the corresponding encrypted data based on the user mobile phone number corresponding to the client to indicate to the client that the server includes the development data corresponding to the mobile phone / email, and does not need to be entered again.
[0100] It can be seen that in the embodiment of the present application, encrypted data is generated by confirming the development data stored in the server and directly inputting it into the development web page, thereby reducing the development data that the client needs to input and improving the data interaction efficiency between the client and the server. At the same time, the corresponding development data is displayed in the form of encrypted data, ensuring the user's data security.
[0101] S502: The server generates a target link for the development network.
[0102] S503: The server sends a first response, which includes a target link.
[0103] S504: The server obtains a second request for the target link.
[0104] S505: The server sends a second response, which includes a development web page.
[0105] In a possible embodiment, before sending the second response, the method also includes: recording a first timestamp when sending the first response; before sending the second response, recording a second timestamp when obtaining the second request; calculating the time interval between the first timestamp and the second timestamp; if the time interval is less than a preset interval, executing the step of sending the second response.
[0106] Specifically, see Figure 7 , Figure 7 A schematic diagram of the event timeline of the server provided in an embodiment of the present application, in which it can be seen that the server records a first timestamp when sending a first response, and records a second timestamp when receiving a second request sent by the client. If the time interval between the first timestamp and the second timestamp is less than a preset interval, it can be determined that the client sending the first request and the second request is the same client, and at this time a second response is sent to the client.
[0107] If the time interval is less than the preset interval, the server can determine that the client is the client that sent the first request, and send the second response to the client without the security risk of data leakage. If the time interval is not less than the preset interval, it is possible that the client disguised as the client that sent the first request obtains the target link through special means and requests the server to send the corresponding development webpage, so there is a security risk of data leakage. If the time interval is not less than the preset interval, the step of sending the second response is not performed.
[0108] It can be seen that in an embodiment of the present application, whether the client sending the first request and the second request are the same client is determined by the time interval between the server sending the first response and obtaining the second request. When it is determined that the client sending the first request and the second request are the same client, the second response is sent, thereby ensuring the data security of the client user.
[0109] S506: The server obtains the submitted development webpage and extracts development data from the submitted development webpage.
[0110] S507: The server calls the background interface corresponding to the target function according to the development data to realize the target function.
[0111] It can be seen that in the embodiments of the present application, the server provides a development page to the client, thereby obtaining the development data required to implement the target function according to the development page, and calling the corresponding background interface according to the development data, so that the client does not need to configure the corresponding program of the background interface corresponding to the target function, thereby improving the development efficiency of the client application.
[0112] See also Figure 8 , Figure 8 A schematic diagram of the interaction process between a client and a server provided in an embodiment of the present application can be based on Figure 1 The application scenario shown is implemented as follows Figure 2 As shown, steps S801-S808 are included:
[0113] S801: The client receives a selection instruction, where the selection instruction instructs selecting a target function from a plurality of indirect call functions.
[0114] S802: The client generates a corresponding first request according to the target function, and sends the first request to the server.
[0115] The client generates a corresponding first request according to the target function, and sends the first request to the server to request the server for a development webpage corresponding to the target function, thereby realizing the target function.
[0116] S803: The server obtains the first request, and determines a development webpage corresponding to the target function according to the first request.
[0117] The development web page here is determined from a plurality of pre-edited web pages according to the first request or is generated by the server based on the first request.
[0118] S804: The server generates a target link for the development webpage and sends a first response to the client, where the first response includes the target link.
[0119] The target link here is specifically a URL or a QR code, and is sent to the client through the first response.
[0120] S805: The client sends a second request to the server according to the target link.
[0121] The client accesses the target link through a browser or a third-party network access library to obtain the corresponding development web page.
[0122] S806: The server sends a second response to the client, where the second response includes a development web page.
[0123] S807: The client inputs the development data of the target function in the development webpage and submits the development webpage to the server.
[0124] S808: The server obtains the submitted development webpage, extracts development data from the submitted development webpage, and calls a background interface corresponding to the target function according to the development data to implement the target function.
[0125] The server obtains the development data input by the client from the submitted development web page, and then calls the corresponding background port in the server to implement the target function.
[0126] By implementing the method in the above embodiment, it can be seen that the client calls the corresponding background interface according to the target link to obtain the development webpage, thereby realizing the target function, improving the cohesion of the client program, and improving the development efficiency of the client application. The client does not need to configure the program related to calling the background interface, saving the storage space of the client. The time interval between the server sending the first response and obtaining the second request determines whether the client sending the first request and the second request is the same client, thereby ensuring the data security of the client user.
[0127] Based on the description of the above configuration method embodiment, the present application also provides a client 900, which can be running on Figure 1 The client 101 is shown and used to execute Figure 2 See the method shown in Fig. 9 , Fig. 9 A schematic diagram of the structure of a client provided in an embodiment of the present application, the client 900 includes:
[0128] Receiving unit 901: used to receive a selection instruction, the selection instruction instructing to select a target function from multiple indirect call functions, the indirect call function being a function that the client cannot implement by calling a background interface corresponding to the indirect call function;
[0129] Acquisition unit 902: used to acquire a development webpage corresponding to a target function;
[0130] Submission unit 903: used to input development data of the target function in the development webpage and submit the development webpage.
[0131] In a possible embodiment, in terms of obtaining a development web page corresponding to a target function, the submission unit 903 is further specifically used to: send a first request, the first request being used to request obtaining a target link of the development web page corresponding to the target function; the receiving unit 901 is further specifically used to: receive a first response, the first response including the target link; send a second request according to the target link; receive a second response, the second response including the development web page.
[0132] In a possible embodiment, the first request includes the custom information, and the first request is further used to instruct the server to adjust the interface appearance of the development webpage according to the custom information so that the interface appearance of the development webpage is consistent with the interface appearance of the client.
[0133] In a possible embodiment, before receiving the selection instruction, the acquisition unit 902 is also specifically used to: obtain function specification information, determine the direct call function and the indirect call function according to the function specification information, the direct call function is a function that can be implemented by calling the background interface corresponding to the direct call function; obtain an update file, and update the local program according to the update file, so that after the local program is updated, it can implement the direct call function by calling the background interface corresponding to the direct call function.
[0134] Based on the description of the above configuration method embodiment, the present application also provides a server 1000, which can be running on Figure 1 The server 102 is shown and is used to execute Figure 5 See the method shown in Fig.10 , Fig.10 A schematic diagram of the structure of a server provided in an embodiment of the present application, the server 1000 includes:
[0135] The acquisition unit 1001 is used to acquire a first request and determine a development webpage corresponding to a target function according to the first request.
[0136] Generating unit 1002: used to generate a target link of the development network.
[0137] Sending unit 1003: used to send a first response, where the first response includes a target link.
[0138] The acquiring unit 1001 is also used to acquire a second request for the target link.
[0139] The sending unit 1003 is also used to send a second response, where the second response includes a development web page.
[0140] The acquisition unit 1001 is also used to acquire the submitted development webpage and extract the development data from the submitted development webpage.
[0141] The calling unit 1004 is used to call the background interface corresponding to the target function according to the development data to realize the target function.
[0142] In a possible embodiment, before sending the second response, the calling unit 1004 is also specifically used to: record the first timestamp when the first response is sent; before sending the second response, record the second timestamp when the second request is obtained; the sending unit 1003 is also specifically used to: calculate the time interval between the first timestamp and the second timestamp; if the time interval is less than the preset interval, execute the step of sending the second response.
[0143] In a possible embodiment, before obtaining the first request, the acquisition unit 1001 is also specifically used to: obtain the number of connected clients; if the number of clients connected to the server is not greater than a preset number, the main function and multiple additional functions provided to the client are determined as indirect call functions; wherein the main function is determined according to the device type of the client, the additional function is the function of the client other than the main function, and the indirect call function is the function that the client cannot implement by calling the background interface corresponding to the indirect call function; if the number of clients connected to the server is greater than a preset number, the main function provided by the server to the client is determined as a direct call function, and the direct call function is a function that can be implemented by the client calling the corresponding background interface; the sending unit 1003 is also specifically used to: send function specification information, and the specification information is used to specify multiple indirect call functions to the client segment.
[0144] Based on the description of the above method embodiment and device embodiment, please refer to Fig.11 , Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Fig.11 The electronic device 1100 shown (the electronic device 1100 may be a computer device, Figure 1 The client 101, server 102, etc. shown in the figure include a memory 1101, a processor 1102, a communication interface 1103 and a bus 1104. The memory 1101, the processor 1102 and the communication interface 1103 are connected to each other through the bus 1104.
[0145] The memory 1101 may be a read-only memory (ROM), a static storage device, a dynamic storage device or a random access memory (RAM).
[0146] The memory 1101 can store programs. When the program stored in the memory 1101 is executed by the processor 1102, the processor 1102 and the communication interface 1103 are used to execute the various steps of the function development method of the embodiment of the present application.
[0147] The processor 1102 can adopt a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), a graphics processing unit (GPU) or one or more integrated circuits to execute relevant programs to implement the functions that need to be performed by the units in the electronic device 1100 of the embodiment of the present application, or to execute the function development method of the method embodiment of the present application.
[0148] The processor 1102 may also be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the function development method of the present application may be completed by an integrated logic circuit of hardware or software instructions in the processor 1102. The above-mentioned processor 1102 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present application may be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present application may be directly embodied as being executed by a hardware decoding processor, or may be executed by a combination of hardware and software modules in a decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 1101, and the processor 1102 reads the information in the memory 1101, and combines its hardware to complete the functions required to be performed by the units included in the electronic device 1100 of the embodiment of the present application, or executes the function development method of the method embodiment of the present application.
[0149] The communication interface 1103 uses a transceiver such as, but not limited to, a transceiver to implement communication between the electronic device 1100 and other devices or a communication network. For example, data can be acquired through the communication interface 1103 .
[0150] The bus 1104 may include a path for transmitting information between various components of the electronic device 1100 (eg, the memory 1101 , the processor 1102 , and the communication interface 1103 ).
[0151] It should be noted that although Fig.11The electronic device 1100 shown only shows a memory, a processor, and a communication interface, but in the specific implementation process, those skilled in the art should understand that the electronic device 1100 also includes other devices necessary for normal operation. At the same time, according to specific needs, those skilled in the art should understand that the electronic device 1100 may also include hardware devices for implementing other additional functions. In addition, those skilled in the art should understand that the electronic device 1100 may also only include the devices necessary to implement the embodiments of the present application, and does not necessarily include Fig.11 All devices shown in .
[0152] An embodiment of the present application also provides a chip, which includes a processor and a data interface. The processor reads instructions stored in a memory through the data interface to implement the function development method.
[0153] Optionally, as an implementation method, the chip may further include a memory, in which instructions are stored, and the processor is used to execute the instructions stored in the memory. When the instructions are executed, the processor is used to execute the function development method.
[0154] An embodiment of the present application also provides a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is executed on a computer or a processor, the computer or the processor executes one or more steps in any of the above methods.
[0155] The embodiment of the present application further provides a computer program product including instructions. When the computer program product is executed on a computer or a processor, the computer or the processor executes one or more steps in any of the above methods.
[0156] Those skilled in the art will appreciate that the functions described in conjunction with the various illustrative logic blocks, modules, and algorithm steps disclosed herein can be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions described in the various illustrative logic blocks, modules, and steps can be stored or transmitted as one or more instructions or codes on a computer-readable medium and executed by a hardware-based processing unit. Computer-readable media may include computer-readable storage media, which corresponds to tangible media, such as data storage media, or includes any media (e.g., based on a communication protocol) that facilitates the transfer of a computer program from one place to another. In this manner, computer-readable media may generally correspond to (1) non-temporary tangible computer-readable storage media, or (2) communication media, such as signals or carrier waves. Data storage media may be any available media that can be accessed by one or more computers or one or more processors to retrieve instructions, codes, and / or data structures for implementing the techniques described in this application. A computer program product may include computer-readable media.
[0157] As an example and not limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage, flash memory, or any other medium that can be used to store the desired program code in the form of instructions or data structures and can be accessed by a computer. Also, any connection is properly referred to as a computer-readable medium. For example, if instructions are transmitted from a website, server or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio and microwave are included in the definition of media. However, it should be understood that the computer-readable storage media and data storage media do not include connections, carrier waves, signals or other temporary media, but are actually directed to non-temporary tangible storage media. As used herein, disks and optical disks include compact disks (CDs), laser optical disks, optical optical disks, digital versatile disks (DVDs), and Blu-ray disks, where disks typically reproduce data magnetically, while optical disks reproduce data optically using lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0158] Instructions may be executed by one or more processors, such as one or more digital signal processors (DSPs), general purpose microprocessors, application specific integrated circuits (ASICs), field programmable logic arrays (FPGAs), or other equivalent integrated or discrete logic circuits. Thus, the term "processor" as used herein may refer to any of the aforementioned structures or any other structures suitable for implementing the techniques described herein. Additionally, in some aspects, the functions described by the various illustrative logic blocks, modules, and steps described herein may be provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated in a combined codec. Moreover, the techniques may be fully implemented in one or more circuits or logic elements.
[0159] The techniques of the present application may be implemented in a variety of devices or apparatuses, including a wireless handset, an integrated circuit (IC), or a set of ICs (e.g., a chipset). Various components, modules, or units are described in this application to emphasize functional aspects of devices for performing the disclosed techniques, but do not necessarily need to be implemented by different hardware units. In fact, as described above, the various units may be combined in an encoded hardware unit in conjunction with appropriate software and / or firmware, or provided by interoperating hardware units (including one or more processors as described above).
[0160] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the specific descriptions of the corresponding steps in the aforementioned method embodiments, and will not be repeated here.
[0161] It should be understood that in the description of the present application, unless otherwise specified, " / " indicates that the objects associated before and after are in an "or" relationship, for example, A / B can represent A or B; wherein A and B can be singular or plural. Also, in the description of the present application, unless otherwise specified, "multiple" refers to two or more than two. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, wherein a, b, c can be single or multiple. In addition, in order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second", etc. are used to distinguish the same items or similar items with substantially the same functions and effects. Those skilled in the art can understand that the words "first", "second", etc. do not limit the quantity and execution order, and the words "first", "second", etc. do not limit them to be necessarily different. Meanwhile, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete manner for ease of understanding.
[0162] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the division of the unit is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. The mutual coupling, direct coupling, or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0163] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0164] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media integrations. The available medium may be a read-only memory (ROM), or a random access memory (RAM), or a magnetic medium, such as a floppy disk, a hard disk, a tape, a disk, or an optical medium, such as a digital versatile disc (DVD), or a semiconductor medium, such as a solid state disk (SSD), etc.
[0165] The above is only a specific implementation of the embodiment of the present application, but the protection scope of the embodiment of the present application is not limited thereto, and any changes or replacements within the technical scope disclosed in the embodiment of the present application should be included in the protection scope of the embodiment of the present application. Therefore, the protection scope of the embodiment of the present application should be based on the protection scope of the claims.
[0166] The device embodiments described above are merely illustrative, wherein the units and modules described as separate components may or may not be physically separated. In addition, some or all of the units and modules may be selected according to actual needs to achieve the purpose of the present embodiment. Those of ordinary skill in the art may understand and implement the present invention without creative effort.
[0167] The above is only a specific implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A function development method, characterized in that: The method comprises: receiving a selection instruction, the selection instruction instructing to select a target function from a plurality of indirect call functions, the indirect call function being a function that cannot be implemented by calling a background interface corresponding to the indirect call function; Obtaining a development webpage corresponding to the target function; The development data of the target function is input into the development webpage, and the development webpage is submitted.
2. The method according to claim 1, characterized in that The step of obtaining a development webpage corresponding to the target function includes: Sending a first request, wherein the first request is used to request to obtain a target link of a development webpage corresponding to the target function; receiving a first response, wherein the first response includes the target link; Sending a second request according to the target link; A second response is received, wherein the second response includes the development webpage.
3. The method according to claim 2, characterized in that The first request includes custom information, and the first request is further used to instruct the server to adjust the interface appearance of the development webpage according to the custom information so that the interface appearance of the development webpage is consistent with the interface appearance of the client. The development page includes a development data input window for the custom information.
4. The method according to any one of claims 1 to 3, characterized in that: Before receiving the selection instruction, the method further includes: Acquire function specification information, and determine a direct call function and an indirect call function according to the function specification information, wherein the direct call function is a function that can be realized by calling a background interface corresponding to the direct call function; An update file is obtained, and a local program is updated according to the update file, so that after the local program is updated, the direct calling function can be implemented by calling a background interface corresponding to the direct calling function.
5. A function development method, characterized in that: The method comprises: Obtaining a first request, and determining a development webpage corresponding to a target function according to the first request; Generating a target link of the development network; Sending a first response, wherein the first response includes the target link; Obtaining a second request for the target link; sending a second response, wherein the second response includes the development webpage; Obtaining a submitted development webpage, and extracting development data from the submitted development webpage; The background interface corresponding to the target function is called according to the development data to realize the target function.
6. The method according to claim 5, characterized in that Before sending the second response, the method further includes: Recording a first timestamp when the first response is sent; Before sending the second response, the method further includes: Recording a second timestamp when the second request is obtained; Calculating a time interval between the first timestamp and the second timestamp; If the time interval is less than the preset interval, the step of sending the second response is performed.
7. The method according to claim 5 or 6, characterized in that: Before obtaining the first request, the method further includes: Get the number of connected clients; If the number of connected clients is not greater than a preset number, a main function and multiple accessory functions provided to the client are determined as indirect call functions; wherein the main function is determined according to the device type of the client, the additional function is a function of the client other than the main function, and the indirect call function is a function that the client cannot implement by calling a background interface corresponding to the indirect call function; If the number of connected clients is greater than a preset number, the main function provided to the client is determined to be a direct call function, where the direct call function is a function that can be implemented by the client calling a corresponding background interface; Function specifying information is sent, wherein the specifying information is used to specify a plurality of indirect call functions to the client segment.
8. A client, characterized in that: For executing the function development method, the client comprises: A receiving unit: used for receiving a selection instruction, wherein the selection instruction indicates selecting a target function from a plurality of indirect call functions, wherein the indirect call function is a function that the client cannot implement by calling a background interface corresponding to the indirect call function; An acquisition unit: used for acquiring a development webpage corresponding to the target function; Submission unit: used for inputting the development data of the target function in the development webpage and submitting the development webpage.
9. A server, characterized in that: For executing the function development method, the server comprises: An acquisition unit is used to acquire a first request and determine a development webpage corresponding to a target function according to the first request; Generating unit: used for generating the target link of the development network; A sending unit: configured to send a first response, wherein the first response includes the target link; The acquiring unit is further configured to acquire a second request for the target link; The sending unit is further configured to send a second response, wherein the second response includes the development webpage; The acquisition unit is also used to acquire the submitted development webpage and extract the development data from the submitted development webpage; Calling unit: used for calling the background interface corresponding to the target function according to the development data to realize the target function.
10. An electronic device, characterized in that: The method comprises a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the programs include instructions for executing the steps in the method as claimed in any one of claims 1 to 7.