Application development method and device, electronic equipment and storage medium
By using blockchain technology and resource scheduling models in distributed clusters, the problem of low resource utilization in traditional application development is solved, more efficient resource allocation and task execution is achieved, and the overall efficiency of development equipment is improved.
Patent Information
- Application Number
- CN202411189661.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2024-11-08
AI Technical Summary
The low resource utilization rate in traditional application development leads to low efficiency of development equipment.
By using blockchain technology in a distributed cluster, we obtain target historical operation data from nodes, train resource scheduling models, predict the number of executable tasks, and allocate target development tasks based on the blockchain to improve the resource utilization rate of the server.
It improves the resource utilization rate of the server, ensures the fairness and trustworthiness of task execution, and improves the overall efficiency of development equipment.
Smart Images

Figure CN118916146A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an application development method, device, electronic device and storage medium. Background Art
[0002] With the rapid development of the Internet and information technology, the demand for cross-platform application development is increasing. Traditional application development usually adopts the client-server architecture. Although this architecture has certain convenience and flexibility, it also has significant defects, such as low resource utilization. Therefore, in the process of application development, how to improve the resource utilization of development equipment has become an urgent problem to be solved. Summary of the invention
[0003] The embodiments of the present application provide an application development method, device, electronic device, and storage medium, which can improve resource utilization of development equipment during application development.
[0004] In a first aspect, an embodiment of the present application provides an application development method, which is applied to a node in a distributed cluster, and the method includes:
[0005] In response to a development task request message from a client, the target historical operation data corresponding to the node is obtained from the blockchain; wherein the development task request message includes the task to be developed; the target historical operation data is the operation data within a preset time period before the current moment; the operation data includes resource utilization and the time of executing the task;
[0006] Input the target historical operation data into the target resource scheduling model to obtain the executable task volume of the node, and upload the executable task volume to the blockchain, so that the blockchain allocates the target development task to the node based on the executable task volume uploaded by the node and the task volume of the task to be developed;
[0007] Receive the target development task assigned by the blockchain, execute the target development task, obtain the task execution result, and send the task execution result to the client.
[0008] In one of the embodiments, after receiving a target development task assigned by a blockchain and executing the target development task and obtaining a task execution result, the method further includes: uploading the task execution result to the blockchain; sending the task execution result to a client, including: when it is determined that a verification result of the task execution result by the blockchain is a passed verification, sending the task execution result to the client.
[0009] In one of the embodiments, after receiving a target development task assigned by a blockchain and executing the target development task and obtaining a task execution result, the method further includes: determining current running data corresponding to the node executing the target development task; uploading the current running data to the blockchain so that the blockchain stores the current running data.
[0010] In one of the embodiments, the method further includes: receiving a development task request message from a client, where the development task request message is determined after the client detects a user operation input to a user interface or a cross-platform desktop application.
[0011] In one embodiment, the target resource scheduling model is trained in the following manner: obtaining historical operation data corresponding to a node and the actual amount of executed tasks corresponding to the historical operation data; inputting the historical operation data into the initial resource scheduling model to obtain the predicted amount of executed tasks corresponding to the node; adjusting the parameters in the initial resource scheduling model in the direction of reducing the difference between the predicted amount of executed tasks and the actual amount of executed tasks to obtain the target resource scheduling model.
[0012] In one of the embodiments, the method further includes: obtaining current operation data from the blockchain; adjusting parameters in the target resource scheduling model based on the current operation data and the target historical operation data to obtain an adjusted resource scheduling model, and the adjusted resource scheduling model is used to determine the amount of tasks that can be executed next time after receiving a development task request message from the client next time.
[0013] In a second aspect, an embodiment of the present application provides an application development device, which is applied to a node in a distributed cluster; the device includes:
[0014] An acquisition module is used to respond to a development task request message from a client and obtain the target historical operation data corresponding to the node from the blockchain; wherein the development task request message includes the task to be developed; the target historical operation data is the operation data within a preset time period before the current moment; the operation data includes resource utilization and the time of executing the task;
[0015] A processing module is used to input the target historical operation data into the target resource scheduling model, obtain the executable task volume of the node, and upload the executable task volume to the blockchain, so that the blockchain allocates the target development task to the node based on the executable task volume uploaded by the node and the task volume of the task to be developed;
[0016] The transceiver module is used to receive the target development task assigned by the blockchain, execute the target development task, obtain the task execution result, and send the task execution result to the client.
[0017] In a third aspect, the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0018] In response to a development task request message from a client, the target historical operation data corresponding to the node is obtained from the blockchain; wherein the development task request message includes the task to be developed; the target historical operation data is the operation data within a preset time period before the current moment; the operation data includes resource utilization and the time of executing the task;
[0019] Input the target historical operation data into the target resource scheduling model to obtain the executable task volume of the node, and upload the executable task volume to the blockchain, so that the blockchain allocates the target development task to the node based on the executable task volume uploaded by the node and the task volume of the task to be developed;
[0020] Receive the target development task assigned by the blockchain, execute the target development task, obtain the task execution result, and send the task execution result to the client.
[0021] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the following steps are implemented:
[0022] In response to a development task request message from a client, the target historical operation data corresponding to the node is obtained from the blockchain; wherein the development task request message includes the task to be developed; the target historical operation data is the operation data within a preset time period before the current moment; the operation data includes resource utilization and the time of executing the task;
[0023] Input the target historical operation data into the target resource scheduling model to obtain the executable task volume of the node, and upload the executable task volume to the blockchain, so that the blockchain allocates the target development task to the node based on the executable task volume uploaded by the node and the task volume of the task to be developed;
[0024] Receive the target development task assigned by the blockchain, execute the target development task, obtain the task execution result, and send the task execution result to the client.
[0025] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0026] In response to a development task request message from a client, the target historical operation data corresponding to the node is obtained from the blockchain; wherein the development task request message includes the task to be developed; the target historical operation data is the operation data within a preset time period before the current moment; the operation data includes resource utilization and the time of executing the task;
[0027] Input the target historical operation data into the target resource scheduling model to obtain the executable task volume of the node, and upload the executable task volume to the blockchain, so that the blockchain allocates the target development task to the node based on the executable task volume uploaded by the node and the task volume of the task to be developed;
[0028] Receive the target development task assigned by the blockchain, execute the target development task, obtain the task execution result, and send the task execution result to the client.
[0029] In the above-mentioned application development method, device, electronic device and storage medium, each node (for example, a server) in the distributed cluster can obtain the target historical operation data corresponding to the node from the blockchain in response to the development task request message from the client; wherein the development task request message includes the task to be developed; the target historical operation data is the operation data within the preset time period before the current moment; the operation data includes the resource utilization rate and the time of executing the task; the target historical operation data is input into the target resource scheduling model to obtain the executable task volume of the node, and the executable task volume is uploaded to the blockchain, so that the blockchain allocates the target development task to the node based on the executable task volume uploaded by the node and the task volume of the task to be developed; the target development task allocated by the blockchain is received, and the target development task is executed to obtain the task execution result, and the task execution result is sent to the client. In this way, the server can predict the executable task volume of the server based on its own operation data within the preset time period before the current moment, and upload the executable task volume to the blockchain, so that the blockchain allocates the target development task to the server based on the executable task volume of the service, thereby improving the resource utilization of the server. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions 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 related drawings can be obtained based on these drawings without paying creative work.
[0031] Figure 1 It is an architecture diagram of an application development system provided in an embodiment of the present application;
[0032] Figure 2It is a flowchart of an application development method provided by an embodiment of the present application;
[0033] Figure 3 It is a flowchart of another application development method provided by an embodiment of the present application;
[0034] Figure 4 It is a structural schematic diagram of an application development device provided in an embodiment of the present application;
[0035] Figure 5 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0036] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application 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 application and are not used to limit the present application.
[0037] See also Figure 1 , see Figure 1 , Figure 1 This is an architecture diagram of an application development system provided by an embodiment of the present application. Figure 1 As shown, the application development system includes a client 101 and a distributed cluster 102 ( Figure 1 In the figure, the distributed cluster 102 including the server 1021, the server 1022 and the server 1023 is taken as an example for drawing).
[0038] The distributed cluster 102 may be a distributed background service cluster built based on the Go language, so that high-concurrency and high-throughput data processing can be achieved.
[0039] Among them, the client 101 can detect a development task request message input for a user interface or a cross-platform desktop application, wherein the development task request message includes a task to be developed; the development task request message is sent to each server in the distributed cluster 102, namely, server 1021, server 1022 and server 1023, respectively, and accordingly, server 1021, server 1022 and server 1023 respectively receive the development task request message from the client 101; server 1021, server 1022 and server 1023 respectively respond to the development task request message, and obtain their respective operation data within a preset time period before the current moment from the blockchain, wherein the operation data includes resources The server 1021, the server 1022 and the server 1023 input their respective acquired operation data into the target resource scheduling model to obtain their respective executable task amounts, and upload their respective executable task amounts to the blockchain, so that the blockchain allocates target development tasks to each server based on the executable task amounts uploaded by each server and the task amounts of tasks to be developed; the server 1021, the server 1022 and the server 1023 receive the target development tasks allocated by the blockchain respectively, and execute the development tasks to obtain the task execution results; the server 1021, the server 1022 and the server 1023 send their own task execution results to the client 101 respectively. In this way, each server in the distributed cluster can predict its own executable task amount based on its own operation data within the preset time period before the current moment, and upload the executable task amount to the blockchain, so that the blockchain allocates the target development task to the server based on the executable task amount of the service, thereby improving the resource utilization of the server.
[0040] Optionally, the client 101 may be a terminal device, which may include but is not limited to various personal computers, laptops, smart phones, tablet computers, IoT devices and portable wearable devices. IoT devices may be smart TVs, smart car devices, etc. Portable wearable devices may be smart watches, smart bracelets, etc.
[0041] The application development method provided by the embodiment of the present application is described below in conjunction with the accompanying drawings.
[0042] See also Figure 2 , Figure 2 is a flow chart of an application development method provided by an embodiment of the present application. The method can be performed by each node (e.g. Figure 1 For the sake of convenience, the following description will take the server as the execution subject to describe the application development method provided in the embodiment of the present application. Figure 2As shown, the application development method may include but is not limited to the following steps:
[0043] S201. In response to a development task request message from a client, obtain the target historical operation data corresponding to the server from the blockchain; wherein the development task request message includes the task to be developed; the target historical operation data is the operation data within a preset time period before the current moment.
[0044] The operation data includes resource usage and task execution time. Optionally, the resource usage may be a usage rate of a central processing unit (CPU) of the server. The task execution time may be the time used by the server to execute historical development tasks.
[0045] Among them, blockchain is essentially a decentralized database, which is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithm.
[0046] Exemplarily, in response to a development task request message from a client, the server may obtain the server's operating data within 10 minutes before the current moment from the blockchain.
[0047] In an optional implementation, before step S201, the server may determine the operation data corresponding to the development task after each development task is executed before the current moment; and upload the operation data to the blockchain for storage. In this way, after the server receives the development task request message from the client at the current moment, it can obtain the target historical operation data corresponding to the server from the blockchain, thereby facilitating the server to determine its own executable task volume.
[0048] S202. Input the target historical operation data into the target resource scheduling model to obtain the executable task volume of the server, and upload the executable task volume to the blockchain, so that the blockchain allocates target development tasks to the server based on the executable task volume uploaded by the server and the task volume of the tasks to be developed.
[0049] In an optional implementation, the target resource scheduling model may be obtained by training the server based on historical operation data.
[0050] In an optional implementation, a smart contract can be used to assign the development tasks to each server in the distributed cluster, so that the target development tasks assigned to each server are open and transparent.
[0051] S203. Receive the target development task assigned by the blockchain, execute the target development task, obtain the task execution result, and send the task execution result to the client.
[0052] In an optional implementation, after obtaining the task execution result, the server may also determine the current running data corresponding to the execution target development task; and upload the current running data to the blockchain so that the blockchain stores the current running data.
[0053] In an embodiment of the present application, each server in a distributed cluster can obtain the target historical operation data corresponding to the server from the blockchain in response to a development task request message from a client; wherein the development task request message includes the task to be developed; the target historical operation data is the operation data within a preset time period before the current moment; the operation data includes resource utilization and the time of executing the task; the target historical operation data is input into the target resource scheduling model to obtain the executable task volume of the server, and the executable task volume is uploaded to the blockchain, so that the blockchain allocates the target development task to the node based on the executable task volume uploaded by the node and the task volume of the task to be developed; the target development task allocated by the blockchain is received, and the target development task is executed to obtain the task execution result, and the task execution result is sent to the client. In this way, the server can predict the executable task volume of the server based on its own operation data within the preset time period before the current moment, and upload the executable task volume to the blockchain, so that the blockchain allocates the target development task to the server based on the executable task volume of the service, thereby improving the resource utilization of the server.
[0054] See also Figure 3 , Figure 3 is a flowchart of another application development method provided by an embodiment of the present application. Figure 2 The difference between the application development method shown is that Figure 3 The application development method shown also describes that the server uploads the task execution result to the blockchain, and when the server determines that the blockchain verifies the task execution result, the server sends the task execution result to the client. Figure 3 As shown, the application development method may include but is not limited to the following steps:
[0055] S301. The client sends a development task request message to the server. Correspondingly, the server receives the development task request message from the client, where the development task request message includes a task to be developed.
[0056] In an optional implementation, the client and each server in the distributed cluster can perform real-time two-way communication through an adaptive communication protocol. For example, the client and each server in the distributed cluster can perform two-way communication using WebSocket. In this way, the delay of data transmission can be reduced.
[0057] In an optional implementation, the development task request message may be determined after the client detects a user operation input to a user interface or a cross-platform desktop application.
[0058] In this embodiment, the user interface can be a dynamic web front-end interface developed using Vue.js. Optionally, a server associated with the client can use the componentized design pattern of Vue.js to build the client's user interface. In this way, the modularity and maintainability of the code can be ensured.
[0059] In this implementation, the cross-platform desktop application can be developed using the Qt framework. Optionally, the server associated with the client can use Qt Widgets for interface design so that the client's user interface can support cross-platform application interaction. Among them, the cross-platform application interaction can be through Qt's multimedia module, network module, etc. and local hardware, such as a camera, microphone, file system, etc., to interact.
[0060] Among them, the integration method of the cross-platform desktop application and the user interface can be that the server associated with the client loads and displays the front-end interface developed by Vue.js by embedding a web engine (QT WebEngine), thereby realizing seamless integration of the user interface and the local application.
[0061] S302. The server responds to the development task request message and obtains the target historical operation data corresponding to the server from the blockchain, where the target historical operation data is the operation data within a preset time period before the current moment.
[0062] The operation data includes resource utilization and task execution time.
[0063] In an optional implementation, the relevant description of step S302 can refer to the description of the aforementioned step S201, which will not be repeated here.
[0064] S303. The server inputs the target historical operation data into the target resource scheduling model to obtain the executable task volume of the server, and uploads the executable task volume to the blockchain, so that the blockchain allocates the target development task to the server based on the executable task volume uploaded by the server and the task volume of the tasks to be developed.
[0065] In an optional implementation, the relevant description of step S303 can refer to the description of the aforementioned step S202, which will not be repeated here.
[0066] S303. Receive the target development task assigned by the blockchain, execute the target development task, and obtain the task execution result.
[0067] In an optional implementation, after step S303, the server may also determine the current running data corresponding to the node executing the target development task; and upload the current running data to the blockchain so that the blockchain stores the current running data.
[0068] In an optional implementation, the server may also obtain current operating data from the blockchain; based on the current operating data and the target historical operating data, the parameters in the target resource scheduling model are adjusted to obtain an adjusted resource scheduling model, and the adjusted resource scheduling model is used to determine the amount of tasks that can be executed next time after receiving a development task request message from the client next time.
[0069] S304: Upload the task execution result to the blockchain so that the blockchain can verify the task execution result.
[0070] S305. When it is determined that the blockchain verification result of the task execution result is passed, the task execution result is sent to the client.
[0071] In an optional implementation, before step S305, the server may also obtain a verification result of the task execution result from the blockchain.
[0072] In the embodiment of the present application, on the one hand, the server can predict the amount of tasks that can be executed by the server based on its own operating data in a preset time period before the current moment, and upload the amount of executable tasks to the blockchain, so that the blockchain can assign target development tasks to the server based on the amount of tasks that can be executed by the service, thereby not only improving the resource utilization of the server, but also ensuring the fairness of each server in executing tasks. On the other hand, after the server executes the target development task and obtains the task execution result, it uploads the task execution result to the blockchain, which allows the blockchain to verify the task execution result, and thus, when it is determined that the verification is passed, the task execution result is sent to the client, so that the reliability of the server's task execution result can be determined.
[0073] In an optional embodiment, Figure 2 and Figure 3 The target resource scheduling model in the application development method shown can be trained through the following steps:
[0074] Step 1: Obtain the historical operation data corresponding to the server and the actual execution task volume corresponding to the historical operation data.
[0075] In an optional implementation, the server may obtain its own corresponding historical operation data and the actual execution task volume corresponding to the historical operation data from the blockchain.
[0076] Step 2: Input the historical operation data into the initial resource scheduling model to obtain the predicted execution task volume corresponding to the server.
[0077] Optionally, the initial resource scheduling model can be any one of the machine learning models or deep learning models, or a combined model obtained by combining multiple models of the machine learning model or deep learning model, which is not limited here.
[0078] Step 3: Adjust the parameters in the initial resource scheduling model in the direction of reducing the difference between the predicted execution task volume and the actual execution task volume to obtain the target resource scheduling model.
[0079] In the embodiment of the present application, the server can obtain the historical operation data corresponding to the server in advance, as well as the actual execution task volume corresponding to the historical operation data; input the historical operation data into the initial resource scheduling model to obtain the predicted execution task volume corresponding to the server; adjust the parameters in the initial resource scheduling model in the direction of reducing the difference between the predicted execution task volume and the actual execution task volume to obtain the target resource scheduling model. In this way, in the actual application process, the server can predict the executable task volume of the server based on the target resource scheduling model, so that the blockchain can dynamically adjust the resource allocation strategy based on the executable task volume of each server in the distributed cluster, so as to allocate the target development task to each server in the distributed cluster, thereby improving the resource utilization of each server.
[0080] Based on the same inventive concept, the embodiment of the present application also provides an application development device for implementing the application development method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more application development device embodiments provided below can refer to the limitations on the application development method above, and will not be repeated here.
[0081] See also Figure 4 , Figure 4 Schematic diagram of the structure of an application development device provided in an embodiment of the present application. Figure 4 As shown, the application development device may include but is not limited to: an acquisition module 401, a processing module 402, and a transceiver module 403. Among them:
[0082] The acquisition module 401 is used to obtain the target historical operation data corresponding to the node from the blockchain in response to the development task request message from the client; wherein the development task request message includes the task to be developed; the target historical operation data is the operation data within a preset time period before the current moment; the operation data includes resource utilization and the time of executing the task;
[0083] Processing module 402, for inputting the target historical operation data into the target resource scheduling model, obtaining the executable task amount of the node, and uploading the executable task amount to the blockchain, so that the blockchain allocates the target development task to the node based on the executable task amount uploaded by the node and the task amount of the task to be developed;
[0084] The transceiver module 403 is used to receive the target development task assigned by the blockchain, execute the target development task, obtain the task execution result, and send the task execution result to the client.
[0085] In one embodiment, the transceiver module 403 is used to receive the target development task assigned by the blockchain, execute the target development task, and after obtaining the task execution result, upload the task execution result to the blockchain; when the transceiver module 403 is used to send the task execution result to the client, it is specifically used to: when it is determined that the verification result of the task execution result by the blockchain is passed, send the task execution result to the client.
[0086] In one embodiment, the device further includes a determination module. The determination module is used to receive the target development task assigned by the blockchain in the transceiver module 403, execute the target development task, and determine the current operation data corresponding to the node executing the target development task after obtaining the task execution result; the transceiver module 403 is also used to upload the current operation data to the blockchain so that the blockchain stores the current operation data.
[0087] In one embodiment, the transceiver module 403 is further used to receive a development task request message from the client, where the development task request message is determined after the client detects a user operation input to the user interface or the cross-platform desktop application.
[0088] In one embodiment, the device further includes a training module. The training module is used to obtain historical operation data corresponding to the node and the actual execution task volume corresponding to the historical operation data; input the historical operation data into the initial resource scheduling model to obtain the predicted execution task volume corresponding to the node; and adjust the parameters in the initial resource scheduling model in the direction of reducing the difference between the predicted execution task volume and the actual execution task volume to obtain the target resource scheduling model.
[0089] In one embodiment, the device further includes an acquisition module. The acquisition module is used to acquire current operation data from the blockchain; the processing module 402 is also used to adjust the parameters in the target resource scheduling model based on the current operation data and the target historical operation data to obtain an adjusted resource scheduling model, and the adjusted resource scheduling model is used to determine the next executable task amount after receiving the development task request message from the client next time.
[0090] In an exemplary embodiment, the present application provides an electronic device, which may be a server, and its internal structure diagram may be as follows: Figure 5 As shown. The electronic device includes a processor, a memory, an input / output interface, a communication interface and an input device. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface and the input device are connected to the system bus via the input / output interface. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the electronic device is used to exchange information between the processor and an external device. The communication interface of the electronic device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, it is implemented Figure 2 or Figure 3 The application development method shown.
[0091] Those skilled in the art will understand that Figure 5 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0092] In an exemplary embodiment, the present application provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0093] In response to a development task request message from a client, the target historical operation data corresponding to the node is obtained from the blockchain; wherein the development task request message includes the task to be developed; the target historical operation data is the operation data within a preset time period before the current moment; the operation data includes resource utilization and the time of executing the task;
[0094] Input the target historical operation data into the target resource scheduling model to obtain the executable task volume of the node, and upload the executable task volume to the blockchain, so that the blockchain allocates the target development task to the node based on the executable task volume uploaded by the node and the task volume of the task to be developed;
[0095] Receive the target development task assigned by the blockchain, execute the target development task, obtain the task execution result, and send the task execution result to the client.
[0096] In one embodiment, the processor executes a computer program to receive a target development task assigned by the blockchain, and executes the target development task. After obtaining the task execution result, the following steps are also implemented: uploading the task execution result to the blockchain; when the processor executes the computer program to send the task execution result to the client, the following steps are specifically implemented: when it is determined that the verification result of the task execution result by the blockchain is passed, the task execution result is sent to the client.
[0097] In one embodiment, the processor executes a computer program to receive a target development task assigned by the blockchain, and executes the target development task. After obtaining the task execution result, the processor also implements the following steps: determining the current running data corresponding to the node executing the target development task; uploading the current running data to the blockchain so that the blockchain stores the current running data.
[0098] In one embodiment, when the processor executes the computer program, the following steps are further implemented: receiving a development task request message from the client, where the development task request message is determined after the client detects a user operation input to the user interface or the cross-platform desktop application.
[0099] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining historical operation data corresponding to the node, and the actual execution task volume corresponding to the historical operation data; inputting the historical operation data into the initial resource scheduling model to obtain the predicted execution task volume corresponding to the node; adjusting the parameters in the initial resource scheduling model in the direction of reducing the difference between the predicted execution task volume and the actual execution task volume to obtain the target resource scheduling model.
[0100] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining current operation data from the blockchain; adjusting the parameters in the target resource scheduling model based on the current operation data and the target historical operation data to obtain an adjusted resource scheduling model, and the adjusted resource scheduling model is used to determine the next executable task amount after receiving the development task request message from the client next time.
[0101] In an exemplary embodiment, the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the following steps are implemented:
[0102] In response to a development task request message from a client, the target historical operation data corresponding to the node is obtained from the blockchain; wherein the development task request message includes the task to be developed; the target historical operation data is the operation data within a preset time period before the current moment; the operation data includes resource utilization and the time of executing the task;
[0103] Input the target historical operation data into the target resource scheduling model to obtain the executable task volume of the node, and upload the executable task volume to the blockchain, so that the blockchain allocates the target development task to the node based on the executable task volume uploaded by the node and the task volume of the task to be developed;
[0104] Receive the target development task assigned by the blockchain, execute the target development task, obtain the task execution result, and send the task execution result to the client.
[0105] In one embodiment, the computer program is executed by the processor to receive the target development task assigned by the blockchain, and execute the target development task. After obtaining the task execution result, the following steps are also implemented: uploading the task execution result to the blockchain; when the computer program is executed by the processor to send the task execution result to the client, the following steps are specifically implemented: when it is determined that the verification result of the task execution result by the blockchain is passed, the task execution result is sent to the client.
[0106] In one embodiment, the computer program is executed by the processor to receive the target development task assigned by the blockchain, and execute the target development task. After obtaining the task execution result, the following steps are also implemented: determining the current running data corresponding to the node executing the target development task; uploading the current running data to the blockchain so that the blockchain stores the current running data.
[0107] In one embodiment, the computer program is executed by the processor to further implement the following steps: receiving a development task request message from a client, where the development task request message is determined after the client detects a user operation input to a user interface or a cross-platform desktop application.
[0108] In one embodiment, the computer program executed by the processor also implements the following steps: obtaining historical operation data corresponding to the node, and the actual execution task volume corresponding to the historical operation data; inputting the historical operation data into the initial resource scheduling model to obtain the predicted execution task volume corresponding to the node; adjusting the parameters in the initial resource scheduling model in the direction of reducing the difference between the predicted execution task volume and the actual execution task volume to obtain the target resource scheduling model.
[0109] In one embodiment, the computer program is executed by the processor to further implement the following steps: obtaining current operation data from the blockchain; adjusting parameters in the target resource scheduling model based on the current operation data and the target historical operation data to obtain an adjusted resource scheduling model, and the adjusted resource scheduling model is used to determine the next executable task volume after receiving a development task request message from the client next time.
[0110] In an exemplary embodiment, the present application provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0111] In response to a development task request message from a client, the target historical operation data corresponding to the node is obtained from the blockchain; wherein the development task request message includes the task to be developed; the target historical operation data is the operation data within a preset time period before the current moment; the operation data includes resource utilization and the time of executing the task;
[0112] Input the target historical operation data into the target resource scheduling model to obtain the executable task volume of the node, and upload the executable task volume to the blockchain, so that the blockchain allocates the target development task to the node based on the executable task volume uploaded by the node and the task volume of the task to be developed;
[0113] Receive the target development task assigned by the blockchain, execute the target development task, obtain the task execution result, and send the task execution result to the client.
[0114] In one embodiment, the computer program is executed by the processor to receive the target development task assigned by the blockchain, and execute the target development task. After obtaining the task execution result, the following steps are also implemented: uploading the task execution result to the blockchain; when the computer program is executed by the processor to send the task execution result to the client, the following steps are specifically implemented: when it is determined that the verification result of the task execution result by the blockchain is passed, the task execution result is sent to the client.
[0115] In one embodiment, the computer program is executed by the processor to receive the target development task assigned by the blockchain, and execute the target development task. After obtaining the task execution result, the following steps are also implemented: determining the current running data corresponding to the node executing the target development task; uploading the current running data to the blockchain so that the blockchain stores the current running data.
[0116] In one embodiment, the computer program is executed by the processor to further implement the following steps: receiving a development task request message from a client, where the development task request message is determined after the client detects a user operation input to a user interface or a cross-platform desktop application.
[0117] In one embodiment, the computer program executed by the processor also implements the following steps: obtaining historical operation data corresponding to the node, and the actual execution task volume corresponding to the historical operation data; inputting the historical operation data into the initial resource scheduling model to obtain the predicted execution task volume corresponding to the node; adjusting the parameters in the initial resource scheduling model in the direction of reducing the difference between the predicted execution task volume and the actual execution task volume to obtain the target resource scheduling model.
[0118] In one embodiment, the computer program is executed by the processor to further implement the following steps: obtaining current operation data from the blockchain; adjusting parameters in the target resource scheduling model based on the current operation data and the target historical operation data to obtain an adjusted resource scheduling model, and the adjusted resource scheduling model is used to determine the next executable task volume after receiving a development task request message from the client next time.
[0119] It should be noted that the data involved in this application (including but not limited to target historical operation data, resource utilization rate, task execution time, etc.) are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0120] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0121] 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 application.
[0122] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. An application development method, characterized in that: Applied to a node in a distributed cluster; the method comprises: In response to a development task request message from a client, the target historical operation data corresponding to the node is obtained from the blockchain; wherein the development task request message includes the task to be developed; the target historical operation data is the operation data within a preset time period before the current moment; the operation data includes resource utilization and the time of executing the task; Inputting the target historical operation data into a target resource scheduling model to obtain the executable task amount of the node, and uploading the executable task amount to the blockchain, so that the blockchain allocates target development tasks to the node based on the executable task amount uploaded by the node and the task amount of the task to be developed; Receive the target development task assigned by the blockchain, execute the target development task, obtain the task execution result, and send the task execution result to the client.
2. The method according to claim 1, characterized in that After receiving the target development task assigned by the blockchain, executing the target development task, and obtaining the task execution result, the method further includes: Uploading the task execution result to the blockchain; The sending the task execution result to the client includes: When it is determined that the verification result of the task execution result by the blockchain is passed, the task execution result is sent to the client.
3. The method according to claim 1, characterized in that After receiving the target development task assigned by the blockchain, executing the target development task, and obtaining the task execution result, the method further includes: Determine the current running data corresponding to the node executing the target development task; The current operation data is uploaded to the blockchain so that the blockchain stores the current operation data.
4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: The development task request message is received from the client, where the development task request message is determined after the client detects a user operation input to a user interface or a cross-platform desktop application.
5. The method according to any one of claims 1 to 3, characterized in that: The target resource scheduling model is trained in the following way: Obtaining historical operation data corresponding to the node and the actual execution task volume corresponding to the historical operation data; Inputting the historical operation data into the initial resource scheduling model to obtain the predicted execution task volume corresponding to the node; The parameters in the initial resource scheduling model are adjusted in a direction of reducing the difference between the predicted execution task volume and the actual execution task volume to obtain a target resource scheduling model.
6. The method according to claim 3, characterized in that The method further comprises: Obtaining the current operation data from the blockchain; Based on the current operating data and the target historical operating data, the parameters in the target resource scheduling model are adjusted to obtain an adjusted resource scheduling model. The adjusted resource scheduling model is used to determine the amount of tasks that can be executed next time after receiving a development task request message from the client next time.
7. An application development device, characterized in that: Applicable to a node in a distributed cluster; the device comprises: An acquisition module, configured to obtain the target historical operation data corresponding to the node from the blockchain in response to a development task request message from a client; wherein the development task request message includes the task to be developed; the target historical operation data is the operation data within a preset time period before the current moment; the operation data includes resource utilization and the time of executing the task; a processing module, configured to input the target historical operation data into a target resource scheduling model, obtain the executable task amount of the node, and upload the executable task amount to the blockchain, so that the blockchain allocates a target development task to the node based on the executable task amount uploaded by the node and the task amount of the task to be developed; The transceiver module is used to receive the target development task assigned by the blockchain, execute the target development task, obtain the task execution result, and send the task execution result to the client.
8. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method according to any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
