Task processing method and device, computer equipment and storage medium
By dividing the tasks of the underwater thruster into computing tasks and hardware control tasks, and co-processing them on multiple controllers, the stability problems caused by a single controller are solved, and efficient and stable operation and data transmission of underwater thrusters are achieved. .
Patent Information
- Application Number
- CN202411170526.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-12-13
AI Technical Summary
Existing underwater thrusters are usually controlled by a single controller, which leads to delays during complex operations, resulting in unstable hardware control and affects the stability of task execution.
The tasks of the underwater thruster are divided into calculation tasks and hardware control tasks, and are deployed on the first controller and the second controller respectively. The task processing is completed through the collaborative method of multiple controllers, and the target verification code is used to generate algorithms. Control parameter data for encryption.
It realizes efficient and stable operation of the underwater thruster, improves the transmission reliability of control parameter data and the overall stability of the thruster.
Smart Images

Figure CN119128335A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence development technology and the field of financial technology, and in particular to task processing methods, devices, computer equipment and storage media. Background Art
[0002] In the claims settlement scenarios in the financial insurance field, small underwater thrusters are usually required for underwater surveys to collect claims data required for claims settlement. Small underwater thrusters are used for underwater surveys, underwater dangerous operations and other tasks.
[0003] However, existing underwater thrusters are usually controlled by a single controller. This control method requires controlling multiple thrusters at the same time and performing tasks such as attitude calculation. The delay of a single controller when performing complex calculations can lead to instability in hardware control, resulting in poor stability of the underwater thruster during mission execution. Summary of the invention
[0004] The purpose of the embodiments of the present application is to propose a task processing method, device, computer equipment and storage medium to solve the problem that existing underwater thrusters are usually controlled by a single controller. This control method requires controlling multiple thrusters at the same time and performing tasks such as attitude calculation. The delay of the single controller when performing complex calculations can cause instability in hardware control, thereby causing the technical problem of poor stability of the underwater thruster during task execution.
[0005] In order to solve the above technical problems, the present application provides a task processing method, which adopts the following technical solutions:
[0006] Obtain computational tasks for underwater thrusters;
[0007] Allocating the computing task to a preset first controller so that the computing task is processed by the first controller and corresponding control parameter data is generated;
[0008] Get the preset start and end characters;
[0009] Determining a target check code generation algorithm from a plurality of preset check code generation algorithms;
[0010] Processing the control parameter data based on the target check code generation algorithm to generate a corresponding check code;
[0011] Generate a corresponding control parameter data packet based on the start character, the end character, the control parameter data and the check code;
[0012] The control parameter data packet is sent to a preset second controller based on a preset communication interface, so that the second controller executes a hardware control task corresponding to the underwater thruster according to the control parameter data packet.
[0013] Furthermore, the step of determining a target check code generation algorithm from a plurality of preset check code generation algorithms specifically includes:
[0014] Get preset test data;
[0015] Generate a processing efficiency value of each of the verification code generation algorithms based on the test data;
[0016] Obtaining effect feedback values of each of the verification code generation algorithms, and obtaining verification strength values of each of the verification code generation algorithms;
[0017] Calculating and processing the processing efficiency value, the effect feedback value, and the verification strength value based on a preset calculation strategy to generate a processing score for each verification code generation algorithm;
[0018] Filter out a first check code generation algorithm with the highest processing score from all the check code generation algorithms;
[0019] The first check code generation algorithm is used as the target check code generation algorithm.
[0020] Furthermore, the step of calculating and processing the processing efficiency value, the effect feedback value and the verification strength value based on a preset calculation strategy to generate a processing score of each verification code generation algorithm specifically includes:
[0021] Obtaining a specified processing efficiency value, a specified effect feedback value, and a specified verification strength value of a second verification code generation algorithm; wherein the second verification code generation algorithm is any one of all the verification code generation algorithms;
[0022] Get the preset weight generation algorithm;
[0023] Based on the weight generation algorithm, a first weight corresponding to the processing efficiency index is generated, a second weight corresponding to the effect feedback index is generated, and a third weight corresponding to the verification strength index is generated;
[0024] Call the preset score calculation formula;
[0025] Based on the score calculation formula, the specified processing efficiency value, the specified effect feedback value, the specified verification strength value, the first weight, the second weight, and the third weight are calculated to obtain a corresponding calculation result;
[0026] The calculation result is used as a designated processing score of the second check code generation algorithm.
[0027] Furthermore, the step of processing the control parameter data based on the target check code generation algorithm to generate a corresponding check code specifically includes:
[0028] Determine a register corresponding to the target check code generation algorithm, and initialize the register to a preset value;
[0029] Processing the data content in the control parameter data byte by byte, and updating the value of the register based on the target check code generation algorithm;
[0030] After completing the processing of all the data contents, obtaining the current target value of the register;
[0031] The target value is used as the check code.
[0032] Further, the step of generating a corresponding control parameter data packet based on the start character, the end character, the control parameter data and the check code specifically includes:
[0033] Get the preset assembly order;
[0034] Based on the assembly sequence, the start character, the end character, the control parameter data and the check code are assembled to obtain corresponding assembly data;
[0035] The assembled data is used as a control parameter data packet.
[0036] Furthermore, the step of sending the control parameter data packet to a preset second controller based on a preset communication interface specifically includes:
[0037] Get the target parameter type;
[0038] Extracting a target control parameter value corresponding to the target parameter type from the control parameter data packet;
[0039] Obtaining a parameter threshold interval corresponding to the target parameter type;
[0040] Determining whether the target control parameter value is within the parameter threshold range;
[0041] If so, the step of sending the control parameter data packet to a preset second controller based on a preset communication interface is executed.
[0042] Furthermore, the task processing method further includes:
[0043] Determining whether the first controller is in a state of full computing task load;
[0044] If the first controller is in a state of full computing task, determining whether the second controller stores a specified group of valid control parameter data;
[0045] If the specified set of valid control parameter data is stored, controlling the second controller to control the underwater thruster according to the specified set of valid control parameter data;
[0046] If the valid control parameter data of the specified group is not stored, obtaining the specified control parameter data corresponding to the preset safety mode;
[0047] The second controller is controlled to perform control processing on the underwater thruster according to the specified control parameter data.
[0048] In order to solve the above technical problems, the embodiment of the present application further provides a task processing device, which adopts the following technical solution:
[0049] A first acquisition module, used to acquire a computing task of an underwater thruster;
[0050] An allocation module, used for allocating the computing task to a preset first controller, so that the computing task is processed by the first controller and corresponding control parameter data is generated;
[0051] A second acquisition module is used to acquire a preset start character and end character;
[0052] A determination module, used to determine a target check code generation algorithm from a plurality of preset check code generation algorithms;
[0053] A first generating module, used for processing the control parameter data based on the target check code generation algorithm to generate a corresponding check code;
[0054] A second generating module, configured to generate a corresponding control parameter data packet based on the start character, the end character, the control parameter data and the check code;
[0055] A sending module is used to send the control parameter data packet to a preset second controller based on a preset communication interface, so that the second controller executes the hardware control task corresponding to the underwater thruster according to the control parameter data packet.
[0056] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:
[0057] Obtain computational tasks for underwater thrusters;
[0058] Allocating the computing task to a preset first controller so that the computing task is processed by the first controller and corresponding control parameter data is generated;
[0059] Get the preset start and end characters;
[0060] Determining a target check code generation algorithm from a plurality of preset check code generation algorithms;
[0061] Processing the control parameter data based on the target check code generation algorithm to generate a corresponding check code;
[0062] Generate a corresponding control parameter data packet based on the start character, the end character, the control parameter data and the check code;
[0063] The control parameter data packet is sent to a preset second controller based on a preset communication interface, so that the second controller executes a hardware control task corresponding to the underwater thruster according to the control parameter data packet.
[0064] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:
[0065] Obtain computational tasks for underwater thrusters;
[0066] Allocating the computing task to a preset first controller so that the computing task is processed by the first controller and corresponding control parameter data is generated;
[0067] Get the preset start and end characters;
[0068] Determining a target check code generation algorithm from a plurality of preset check code generation algorithms;
[0069] Processing the control parameter data based on the target check code generation algorithm to generate a corresponding check code;
[0070] Generate a corresponding control parameter data packet based on the start character, the end character, the control parameter data and the check code;
[0071] The control parameter data packet is sent to a preset second controller based on a preset communication interface, so that the second controller executes a hardware control task corresponding to the underwater thruster according to the control parameter data packet.
[0072] Compared with the prior art, the embodiments of the present application have the following beneficial effects:
[0073] The present application first obtains the computing task of the underwater thruster; and assigns the computing task to a preset first controller, so that the computing task is processed by the first controller and the corresponding control parameter data is generated; after accommodating, the preset start symbol and end symbol are obtained; then the target check code generation algorithm is determined from a plurality of preset check code generation algorithms; the control parameter data is subsequently processed based on the target check code generation algorithm to generate a corresponding check code; further based on the start symbol, the end symbol, the control parameter data and the check code, a corresponding control parameter data packet is generated; finally, based on a preset communication interface, the control parameter data packet is sent to a preset second controller, so that the hardware control task corresponding to the underwater thruster is executed by the second controller according to the control parameter data packet. The present application divides the task of the underwater thruster into computing tasks and hardware control tasks and deploys them on the first controller and the second controller respectively, and completes the transmission and processing of the computing tasks and hardware control tasks of the underwater thruster by adopting a multi-controller collaborative method, thereby effectively realizing the efficient and stable operation of the underwater thruster. In addition, during the communication process between the first controller and the second controller, the target check code generation algorithm will be intelligently used to encrypt the control parameter data transmitted by the first controller, thereby ensuring the transmission of the control parameter data and helping to further improve the stability and reliability of the operation of the underwater thruster. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0075] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;
[0076] Figure 2 A flowchart of an embodiment of a task processing method according to the present application;
[0077] Figure 3 is a structural schematic diagram of an embodiment of a task processing device according to the present application;
[0078] Figure 4 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION
[0079] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0080] 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.
[0081] 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 accompanying drawings.
[0082] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0083] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0084] The terminal devices 101, 102, and 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop computers, desktop computers, and the like.
[0085] The server 105 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal devices 101 , 102 , and 103 .
[0086] It should be noted that the task processing method provided in the embodiment of the present application is generally executed by a server / terminal device, and accordingly, the task processing device is generally arranged in the server / terminal device.
[0087] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.
[0088] Continue to refer Figure 2 , showing a flow chart of an embodiment of the task processing method according to the present application. According to different requirements, the order of the steps in the flow chart can be changed, and some steps can be omitted. The task processing method provided in the embodiment of the present application can be applied to any control scenario that requires an underwater thruster, and the task processing method can be applied to products in these scenarios, for example, underwater thruster control processing for underwater surveys involving claims scenarios in the financial insurance field. The task processing method comprises the following steps:
[0089] Step S201, obtaining the computing task of the underwater thruster.
[0090] In this embodiment, the task processing method is executed on the electronic device (eg Figure 1The server / terminal device shown in the figure) can obtain the computing task of the underwater thruster through a wired connection or a wireless connection. It should be pointed out that the above-mentioned wireless connection method may include but is not limited to 3G / 4G / 5G connection, Wi-Fi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (Ultra Wi DeBand) connection, and other wireless connection methods currently known or to be developed in the future. In the claims settlement scenario in the financial insurance field, small underwater thrusters are often used for underwater surveys to collect claims data required for claims settlement business. Small underwater thrusters are used for underwater surveys, underwater dangerous operations and other tasks. In the process of designing underwater thrusters, the design of the two aspects of the motion freedom and control method of the thruster are usually considered. The above-mentioned underwater thruster can specifically adopt a small four-degree-of-freedom underwater thruster. The four-degree-of-freedom design can meet the basic underwater movement requirements. It realizes movement in any direction in three-dimensional space and rotation in the direction of a certain coordinate axis. In terms of control, in order to ensure the stable movement of the thruster, motion control and attitude solution design are required. However, existing small-scale four-degree-of-freedom underwater thrusters are usually controlled by a single controller. This control method requires controlling multiple thrusters at the same time and performing tasks such as attitude calculation. The delay of the single controller when performing complex calculations will lead to accuracy problems in hardware control, resulting in poor stability of the underwater thruster during task execution. Specifically, this application divides the tasks of the underwater thruster into computing tasks and hardware control tasks. The hardware control tasks are mainly to control the movement of the underwater thruster, such as controlling the propeller to rotate in a specified direction. The computing task is responsible for analyzing the current environment and calculating the parameters that control the movement of the underwater thruster.
[0091] Step S202: Allocate the computing task to a preset first controller, so that the computing task is processed by the first controller and corresponding control parameter data is generated.
[0092] In this embodiment, the first controller may specifically use a Raspberry Pi. As a computing center, the Raspberry Pi can efficiently process complex environmental analysis algorithms, such as image processing, path planning, motion control algorithms, etc., using its powerful processor and rich software resources (such as Python, C++, etc.). Among them, the above-mentioned computing task is specifically to analyze the current environment and calculate the parameters for controlling the motion of the underwater propeller. The above-mentioned control parameter data is the parameters for controlling the motion of the underwater propeller, which may specifically include speed parameters, direction parameters and other parameters.
[0093] Step S203, obtaining a preset start character and end character.
[0094] In this embodiment, the above-mentioned start character is a byte pre-constructed as the start mark of the data packet, which is used to help the receiver correctly parse and verify the data. The start character can be any character or character sequence that will not appear in the valid content of the data packet, such as special characters in ASCII code (such as SOH, Start of Heading, 0x01) or a custom byte sequence. Similarly, the above-mentioned terminator is a byte pre-constructed as the end mark of the data packet. The terminator is also a unique character or character sequence that will not be confused with the content of the data packet (such as ETX, End of Text, 0x03).
[0095] Step S204, determining a target check code generation algorithm from a plurality of preset check code generation algorithms.
[0096] In this embodiment, the specific implementation process of determining the target check code generation algorithm from the preset multiple check code generation algorithms will be further described in detail in subsequent specific embodiments of the present application, and will not be elaborated on here.
[0097] Step S205: Process the control parameter data based on the target check code generation algorithm to generate a corresponding check code.
[0098] In this embodiment, the specific implementation process of processing the control parameter data based on the target check code generation algorithm to generate the corresponding check code will be further described in detail in subsequent specific embodiments of the present application and will not be elaborated on here.
[0099] Step S206: Generate a corresponding control parameter data packet based on the start character, the end character, the control parameter data and the check code.
[0100] In this embodiment, the specific implementation process of generating the corresponding control parameter data packet based on the start character, the end character, the control parameter data and the check code will be described in further detail in subsequent specific embodiments of the present application and will not be elaborated on here.
[0101] Step S207: sending the control parameter data packet to a preset second controller based on a preset communication interface, so that the second controller executes a hardware control task corresponding to the underwater thruster according to the control parameter data packet.
[0102] In the present embodiment, the above-mentioned communication interface can specifically adopt a serial port. The above-mentioned second controller can specifically adopt STM32. As a control core, STM32 is known for its high performance, low power consumption and rich peripheral interfaces (such as PWM, ADC, UART, etc.), and is very suitable for directly controlling the precise movement of actuators (such as propeller motors). STM32 can receive instructions from Raspberry Pi in real time and respond quickly. Wherein, after receiving the control parameter data packet, the second controller will use the same target check code generation algorithm to recalculate the target check code for the data part other than the start character, the terminator and the check code in the above-mentioned control parameter data packet. After the calculation is completed, the obtained target check code is compared with the check code in the received control parameter data packet. If the two are the same, it is considered that the control parameter data packet has not been tampered with or damaged during the data transmission process, and the hardware control task corresponding to the underwater thruster will be executed according to the control parameter data packet. If the two are different, it is considered that the control parameter data packet may be damaged, and it will intelligently request to resend the control instruction or take other error handling measures. In addition, the specific implementation process of sending the control parameter data packet to the preset second controller based on the preset communication interface will be further described in detail in subsequent specific embodiments of the present application, and will not be elaborated on here.
[0103] The present application first obtains the computing task of the underwater thruster; and assigns the computing task to a preset first controller, so that the computing task is processed by the first controller and the corresponding control parameter data is generated; after accommodating, the preset start symbol and end symbol are obtained; then the target check code generation algorithm is determined from a plurality of preset check code generation algorithms; the control parameter data is subsequently processed based on the target check code generation algorithm to generate a corresponding check code; further based on the start symbol, the end symbol, the control parameter data and the check code, a corresponding control parameter data packet is generated; finally, based on a preset communication interface, the control parameter data packet is sent to a preset second controller, so that the hardware control task corresponding to the underwater thruster is executed by the second controller according to the control parameter data packet. The present application divides the task of the underwater thruster into computing tasks and hardware control tasks and deploys them on the first controller and the second controller respectively, and completes the transmission and processing of the computing tasks and hardware control tasks of the underwater thruster by adopting a multi-controller collaborative method, thereby effectively realizing the efficient and stable operation of the underwater thruster. In addition, during the communication process between the first controller and the second controller, the target check code generation algorithm will be intelligently used to encrypt the control parameter data transmitted by the first controller, thereby ensuring the transmission of the control parameter data and helping to further improve the stability and reliability of the operation of the underwater thruster.
[0104] In some optional implementations, step S204 includes the following steps:
[0105] Get the preset test data.
[0106] In this embodiment, the test data are pre-collected parameter data for performing performance tests on various verification code generation algorithms.
[0107] A processing efficiency value of each of the verification code generation algorithms is generated based on the test data.
[0108] In this embodiment, a test environment is predetermined, and then in the test environment, each of the check code generation algorithms is used to generate a check code for the test data, and the processing efficiency value of each of the check code generation algorithms is calculated. The processing efficiency value refers to the time taken by the check code generation algorithm to generate a check code for a single test data.
[0109] Obtaining the effect feedback value of each of the verification code generation algorithms, and obtaining the verification strength value of each of the verification code generation algorithms.
[0110] In this embodiment, the effect feedback value of each of the check code generation algorithms can be found from the user evaluation data by consulting the open source user evaluation data about each of the check code generation algorithms. Among them, the above user evaluation data at least includes the effect feedback value of various check code generation algorithms fed back by the algorithm usage index. In addition, the above check strength value is a strength value that matches the check code length of each check code generation algorithm. Specifically, by obtaining the version value of the check code generation algorithm, the version value is divided by a preset value to generate a check strength value corresponding to the check code generation algorithm. There is no specific limitation on the value of the above preset index, which can be set according to actual usage requirements, and can be specifically set to 8. Exemplarily, if the check code generation algorithm is CRC-8, the version value corresponding to the check code generation algorithm is 8, then by calculating the ratio between 8 and the preset value (8), the result 1 is used as the check strength value of the check code generation algorithm.
[0111] The processing efficiency value, the effect feedback value and the verification strength value are calculated and processed based on a preset calculation strategy to generate a processing score for each verification code generation algorithm.
[0112] In this embodiment, the above-mentioned specific implementation process of calculating and processing the processing efficiency value, the effect feedback value and the verification strength value based on the preset calculation strategy to generate the processing score of each verification code generation algorithm will be further described in detail in the subsequent specific embodiments of this application and will not be elaborated in detail here.
[0113] A first check code generation algorithm with the highest processing score is selected from all the check code generation algorithms.
[0114] In this embodiment, a sorting algorithm that sorts values from high to low may be used to sort all the processing scores, and then the first verification code generation algorithm with the highest processing score is screened out from all the verification code generation algorithms according to the obtained sorting result.
[0115] The first check code generation algorithm is used as the target check code generation algorithm.
[0116] The present application generates the processing efficiency value of each of the check code generation algorithms by using test data, obtains the effect feedback value of each of the check code generation algorithms, and obtains the check strength value of each of the check code generation algorithms, and then calculates and processes the processing efficiency value, the effect feedback value and the check strength value based on the preset calculation strategy, generates the processing score of each of the check code generation algorithms, and subsequently selects the first check code generation algorithm with the highest processing score from all the check code generation algorithms as the target check code generation algorithm for processing the control parameter data. Since the first check code generation algorithm is the algorithm with the best comprehensive processing capability corresponding to the processing efficiency value, the effect feedback value and the check strength value among all the check code generation algorithms, the first check code generation algorithm is used as the target check code generation algorithm for generating the check code of the control parameter data, which effectively guarantees the determination accuracy and intelligence of the target check code generation algorithm. It is also conducive to the subsequent use of the target check code generation algorithm to process the control parameter data to generate the corresponding check code, which can effectively improve the generation efficiency of the check code and ensure the check strength of the obtained check code.
[0117] In some optional implementations of this embodiment, the step of calculating the processing efficiency value, the effect feedback value, and the verification strength value based on a preset calculation strategy to generate a processing score for each verification code generation algorithm includes the following steps:
[0118] A specified processing efficiency value, a specified effect feedback value, and a specified verification strength value of the second verification code generation algorithm are obtained.
[0119] In this embodiment, the second verification code generation algorithm is any one of all the verification code generation algorithms.
[0120] Get the preset weight generation algorithm.
[0121] In this embodiment, there is no specific limitation on the selection of the above-mentioned weight generation algorithm, and it can be randomly selected from algorithms such as factor analysis, hierarchical analysis method, entropy method, principal component analysis method, and standardization method.
[0122] Based on the weight generation algorithm, a first weight corresponding to the processing efficiency index is generated, a second weight corresponding to the effect feedback index is generated, and a third weight corresponding to the verification strength index is generated.
[0123] In this embodiment, weight generation processing can be performed on the processing efficiency index, the effect feedback index and the verification strength index according to the weight generation operation steps matching the above-mentioned weight generation algorithm, and a first weight corresponding to the processing efficiency index, a second weight corresponding to the effect feedback index, and a third weight corresponding to the verification strength index can be obtained.
[0124] Call the preset score calculation formula.
[0125] In this embodiment, the above score calculation formula may specifically include: G=a / X+b*Y+c*Z, wherein G is the processing score, X is the processing efficiency value, a is the first weight corresponding to the processing efficiency index, Y is the effect feedback value, b is the second weight corresponding to the effect feedback index, Z is the verification strength value, and c is the third weight corresponding to the verification strength index.
[0126] Based on the score calculation formula, the specified processing efficiency value, the specified effect feedback value, the specified verification strength value, the first weight, the second weight and the third weight are calculated and processed to obtain corresponding calculation results.
[0127] In this embodiment, the specified processing efficiency value, the specified effect feedback value, the specified verification strength value, the first weight, the second weight and the third weight can be substituted into the corresponding positions in the above-mentioned score calculation formula for calculation processing, and then the corresponding calculation result can be calculated.
[0128] The calculation result is used as a designated processing score of the second check code generation algorithm.
[0129] The present application generates a first weight corresponding to the processing efficiency index, generates a second weight corresponding to the effect feedback index, and generates a third weight corresponding to the verification strength index according to the obtained weight generation algorithm, and based on the obtained first weight, second weight and third weight, calls a preset number calculation formula to calculate the specified processing efficiency value, the specified effect feedback value, and the specified verification strength value, so as to achieve fast and accurate generation of the processing score of the second verification code generation algorithm, and ensure the data accuracy of the generated processing score. It is conducive to the subsequent selection of the first verification code generation algorithm with the highest processing score from all the verification code generation algorithms according to the obtained processing score and use it as the target verification code generation algorithm for the verification code of the control parameter data, effectively ensuring the determination accuracy and intelligence of the target verification code generation algorithm.
[0130] In some optional implementations, step S205 includes the following steps:
[0131] A register corresponding to the target check code generation algorithm is determined, and the register is initialized to a preset value.
[0132] In this embodiment, the preset value may be all 0 or all 1. And the size of the register is the same as the number of bits of the target check code generation algorithm.
[0133] The data content in the control parameter data is processed byte by byte, and the value of the register is updated based on the target check code generation algorithm.
[0134] In this embodiment, for each byte in the control parameter data, a specified form of XOR operation is performed on it and the current value of the register, and the result is left-shifted by the number of bits corresponding to the target check code generation algorithm. If the leftmost (highest bit) bit after the left shift is 1, the bit is XORed with the polynomial and the result is stored back in the register. This process is repeated until all bytes are processed.
[0135] After completing the processing of all the data contents, the current target value of the register is obtained.
[0136] In this embodiment, after all data contents in the control parameter data are processed, the current value in the register is the generated check code.
[0137] The target value is used as the check code.
[0138] The present application determines the register corresponding to the target check code generation algorithm and initializes the register to a preset value; then processes the data content in the control parameter data byte by byte, and updates the value of the register based on the target check code generation algorithm; after completing the processing of all the data content, obtains the current target value of the register, and uses the target value as the check code, so as to realize the use of the target check code generation algorithm to quickly and accurately generate the check code corresponding to the control parameter data, effectively improve the generation efficiency of the check code, and ensure the accuracy of the obtained check code. It is conducive to the subsequent rapid generation of the required control parameter data packet based on the obtained check code and the start character, the end character, and the control parameter data.
[0139] In some optional implementations, step S206 includes the following steps:
[0140] Gets the preset assembly order.
[0141] In this embodiment, the above assembly order can be set according to actual data assembly requirements, and preferably adopts the assembly order of [start character][end character][control parameter data][check code].
[0142] The start character, the end character, the control parameter data and the check code are assembled based on the assembly sequence to obtain corresponding assembly data.
[0143] In this embodiment, the start character, the end character, the control parameter data and the check code may be sorted according to the assembly order to obtain sorted data, and then the sorted data may be integrated to obtain corresponding complete data as the above-mentioned assembly data.
[0144] The assembled data is used as a control parameter data packet.
[0145] The present application obtains a preset assembly order; then assembles the start character, the end character, the control parameter data and the check code based on the assembly order to obtain corresponding assembly data; and subsequently uses the assembly data as a control parameter data packet. The present application uses a preset assembly order to assemble the start character, the end character, the control parameter data and the check code in sequence to obtain a corresponding control parameter data packet, thereby improving the generation efficiency and generation intelligence of the control parameter data packet.
[0146] In some optional implementations of this embodiment, step S207 includes the following steps:
[0147] Gets the target parameter type.
[0148] In this embodiment, the above target parameter types may at least include speed and direction.
[0149] A target control parameter value corresponding to the target parameter type is extracted from the control parameter data packet.
[0150] In this embodiment, the control parameter data packet is parsed by using the target parameter type to extract the target control parameter value corresponding to the target parameter type, ie, the speed parameter value and the direction parameter value, from the control parameter data packet.
[0151] Obtain a parameter threshold interval corresponding to the target parameter type.
[0152] In this embodiment, reasonable parameter threshold intervals are defined in advance for key parameters such as speed and direction based on the physical limitations of the propeller, safety requirements, and characteristics of the operating environment. Among them, the above-mentioned parameter threshold intervals include speed threshold intervals corresponding to speed parameters, and direction threshold intervals corresponding to direction parameters. Specifically, for speed parameters, a minimum speed threshold (such as 0, indicating that negative speed is not allowed) and a maximum speed threshold (such as the maximum safe speed of the propeller) can be set. For direction parameters, if the direction parameters are represented by angles or some kind of encoding, the corresponding minimum and maximum thresholds can also be set according to actual safety requirements.
[0153] Determine whether the target control parameter value is within the parameter threshold range.
[0154] In this embodiment, the target control parameter value includes a speed parameter value and a direction parameter value. The speed parameter value can be detected to determine whether it is within a preset speed threshold interval, and the direction parameter value can be detected to determine whether it is within a preset direction threshold interval. If the speed parameter value is within the speed threshold interval, and the direction parameter value is within the direction threshold interval, then it is determined that the target control parameter value is within the parameter threshold interval; if one or no parameter value of the direction parameter value and the speed parameter value is within the corresponding parameter threshold interval, then it is determined that the target control parameter value is not within the parameter threshold interval.
[0155] If so, the step of sending the control parameter data packet to a preset second controller based on a preset communication interface is executed.
[0156] In this embodiment, if it is detected that the target control parameter value is within the parameter threshold interval, it is determined that the target control parameter value has passed the data legality check, and then the step of sending the control parameter data packet to the preset second controller based on the preset communication interface will be executed later, ensuring the processing standardization and processing intelligence of the control parameter data packet. In addition, if it is detected that the target control parameter value is not within the parameter threshold interval, it is determined that the target control parameter value has not passed the data legality check, that is, there is an illegal parameter value in the target control parameter value. At this time, the step of sending the control parameter data packet to the preset second controller based on the preset communication interface will be refused. And an error report will be further sent to the first controller through the communication interface, so that the first controller can identify which parameter value is illegal and take corresponding repair measures (such as resending instructions, recording error logs, etc.). Among them, the specific format and content of the error report can be designed according to actual needs, and may specifically include error types (such as parameter out of range), illegal parameter names, illegal parameter values, and possible error codes or error descriptions. In addition, after sending the error report, the second controller will be intelligently controlled to suspend receiving new instructions until a confirmation message or a new valid instruction is received from the first controller. This can effectively prevent the continued execution of operations that may lead to adverse consequences before the problem of the target control parameter value failing the data legality verification is resolved.
[0157] Before sending the control parameter data packet to the preset second controller, the present application will intelligently extract the target control parameter value corresponding to the target parameter type from the control parameter data packet, and then use the parameter threshold range corresponding to the target parameter type to perform data legitimacy verification on the target control parameter value. Only after detecting that the target control parameter value has passed the data legitimacy verification will the subsequent step of sending the control parameter data packet to the preset second controller based on the preset communication interface be executed, thereby effectively ensuring the processing standardization and processing intelligence of the control parameter data packet sending, thereby improving the safety and stability of the thruster operation.
[0158] In some optional implementations of this embodiment, the electronic device may further perform the following steps:
[0159] Determine whether the first controller is in a state of full computing task load.
[0160] In this embodiment, the state of full load of computing tasks refers to the state that the number of computing tasks currently processed by the first controller is greater than the preset full load threshold. There is no limitation on the selection of the value of the full load threshold, which can be set according to actual business needs. In addition, when the first controller is in the state of full load of computing tasks, it will cause the first controller to have a delay in sending control instructions.
[0161] If the first controller is in a state of full computing task, it is determined whether a specified group of valid control parameter data is stored in the second controller.
[0162] In this embodiment, the specified group of valid control parameter data is specifically a previous group of valid control parameter data adjacent to the current time.
[0163] If the specified set of effective control parameter data is stored, the second controller is controlled to control the underwater thruster according to the specified set of effective control parameter data.
[0164] In this embodiment, if a specified set of valid control parameter data is stored in the second controller, the second controller is directly controlled to keep using the specified set of valid control parameter data to control the underwater thruster to ensure that the underwater thruster can continue to operate stably.
[0165] If the specified group of valid control parameter data is not stored, the specified control parameter data corresponding to the preset safety mode is obtained.
[0166] In this embodiment, the safety mode may be a deceleration mode or a stop mode. Designated control parameter data matching the safety mode is pre-built and stored so that it can be called when a control instruction transmission delay occurs in the subsequent underwater thruster.
[0167] The second controller is controlled to perform control processing on the underwater thruster according to the specified control parameter data.
[0168] In this embodiment, when it is detected that no valid control parameter data of a specified group is stored in the above-mentioned second controller, the above-mentioned second controller is controlled to use the specified control parameter data corresponding to the preset safety mode to control and process the underwater thruster, so as to ensure that the underwater thruster can continue to operate stably.
[0169] When the present application detects that the first controller is in a state of full computing task load, it will intelligently control the second controller to control and process the underwater thruster according to the valid control parameter data of the specified group or according to the specified control parameter data corresponding to the preset safety mode, based on the detection result of whether the second controller stores a specified group of valid control parameter data, thereby effectively ensuring that the underwater thruster can continue to operate stably.
[0170] In some optional implementations, since the propellers of the thruster in the horizontal direction can be divided into two groups, the front group is generally used for direction adjustment and the rear group is used as propulsion power. This method will lead to unstable motion control and increased energy consumption. The propellers can be set to a 45° angle for propulsion, and the midpoint line of the front and rear propellers can be used as the motion posture of the underwater thruster during control, while considering the steering and propulsion functions, so as to effectively avoid interference between the two groups of thrusters. Since the traditional propeller control method separates steering and propulsion, this will cause mutual interference between the propellers and reduce endurance. By changing the structure and motion control posture calculation method, the steering and propulsion functions of the thruster can be unified, reducing energy consumption and improving the underwater working endurance of the underwater thruster.
[0171] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0172] It should be emphasized that in order to further ensure the privacy and security of the above-mentioned control parameter data packet, the above-mentioned control parameter data packet can also be stored in a node of a blockchain.
[0173] The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0174] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0175] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0176] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0177] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0178] Further references Figure 3 , as a response to the above Figure 2 The present application provides an embodiment of a task processing device, and the device embodiment is similar to Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0179] like Figure 3 As shown, the task processing device 300 described in this embodiment includes: a first acquisition module 301, an allocation module 302, a second acquisition module 303, a determination module 304, a first generation module 305, a second generation module 306 and a sending module 307. Among them:
[0180] A first acquisition module 301 is used to acquire a computing task of an underwater thruster;
[0181] An allocation module 302 is used to allocate the computing task to a preset first controller, so that the computing task is processed by the first controller and corresponding control parameter data is generated;
[0182] The second acquisition module 303 is used to acquire a preset start character and end character;
[0183] A determination module 304 is used to determine a target check code generation algorithm from a plurality of preset check code generation algorithms;
[0184] A first generating module 305, configured to process the control parameter data based on the target check code generation algorithm to generate a corresponding check code;
[0185] A second generating module 306, configured to generate a corresponding control parameter data packet based on the start character, the end character, the control parameter data and the check code;
[0186] The sending module 307 is used to send the control parameter data packet to a preset second controller based on a preset communication interface, so that the second controller executes the hardware control task corresponding to the underwater thruster according to the control parameter data packet.
[0187] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the task processing method in the above-mentioned implementation mode, and are not described in detail here.
[0188] In some optional implementations of this embodiment, the determining module 304 includes:
[0189] The first acquisition submodule is used to acquire preset test data;
[0190] A first generating submodule, used for generating a processing efficiency value of each of the verification code generation algorithms based on the test data;
[0191] A second acquisition submodule is used to obtain an effect feedback value of each of the verification code generation algorithms, and to obtain a verification strength value of each of the verification code generation algorithms;
[0192] A second generation submodule, used for calculating and processing the processing efficiency value, the effect feedback value and the verification strength value based on a preset calculation strategy to generate a processing score of each verification code generation algorithm;
[0193] A screening submodule, used for screening out a first check code generation algorithm having the highest processing score from all the check code generation algorithms;
[0194] The first determination submodule is configured to use the first check code generation algorithm as the target check code generation algorithm.
[0195] In some optional implementations of this embodiment, the second generation submodule includes:
[0196] A first acquisition unit is used to acquire a specified processing efficiency value, a specified effect feedback value, and a specified verification strength value of a second verification code generation algorithm; wherein the second verification code generation algorithm is any one of all the verification code generation algorithms;
[0197] A second acquisition unit, used to acquire a preset weight generation algorithm;
[0198] A generating unit, configured to generate a first weight corresponding to a processing efficiency index, a second weight corresponding to an effect feedback index, and a third weight corresponding to a verification strength index based on the weight generating algorithm;
[0199] A calling unit, used to call a preset score calculation formula;
[0200] a calculation unit, configured to calculate the specified processing efficiency value, the specified effect feedback value, the specified verification strength value, the first weight, the second weight, and the third weight based on the score calculation formula to obtain a corresponding calculation result;
[0201] A determination unit is used to use the calculation result as a specified processing score of the second check code generation algorithm.
[0202] In some optional implementations of this embodiment, the first generating module 305 includes:
[0203] A second determination submodule, used to determine a register corresponding to the target check code generation algorithm, and initialize the register to a preset value;
[0204] A first processing submodule, used for processing the data content in the control parameter data byte by byte, and updating the value of the register based on the target check code generation algorithm;
[0205] A third acquisition submodule, used for acquiring the current target value of the register after completing the processing of all the data contents;
[0206] The third determination submodule is configured to use the target value as the verification code.
[0207] In some optional implementations of this embodiment, the second generating module 306 includes:
[0208] The fourth acquisition submodule is used to acquire a preset assembly sequence;
[0209] A second processing submodule is used to assemble the start character, the end character, the control parameter data and the check code based on the assembly order to obtain corresponding assembly data;
[0210] The fourth determining submodule is used to use the assembly data as a control parameter data packet.
[0211] In some optional implementations of this embodiment, the sending module 307 includes:
[0212] The fifth acquisition submodule is used to obtain the target parameter type;
[0213] An extraction submodule, used for extracting a target control parameter value corresponding to the target parameter type from the control parameter data packet;
[0214] A sixth acquisition submodule, used to acquire a parameter threshold interval corresponding to the target parameter type;
[0215] A judging submodule, used to judge whether the target control parameter value is within the parameter threshold range;
[0216] The execution submodule is used to execute the step of sending the control parameter data packet to the preset second controller based on the preset communication interface.
[0217] In some optional implementations of this embodiment, the task processing device further includes:
[0218] A first determination module, used to determine whether the first controller is in a state of full computing task load;
[0219] A second judgment module, configured to judge whether a specified group of valid control parameter data is stored in the second controller if the first controller is in a state of full computing task load;
[0220] A first control module is used to control the second controller to control the underwater thruster according to the specified group of effective control parameter data if the specified group of effective control parameter data is stored;
[0221] A third acquisition module, configured to acquire the specified control parameter data corresponding to the preset safety mode if the specified group of valid control parameter data is not stored;
[0222] The second control module is used to control the second controller to control the underwater thruster according to the specified control parameter data.
[0223] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4This is a basic structural block diagram of the computer device in this embodiment.
[0224] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 4 with components 41-43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital processors (DSPs), embedded devices, etc.
[0225] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.
[0226] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk equipped on the computer device 4, a smart memory card (Smart Med ia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions of the task processing method, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.
[0227] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run the computer-readable instructions stored in the memory 41 or process data, such as computer-readable instructions for running the task processing method.
[0228] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.
[0229] The present application also provides another implementation, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the task processing method as described above.
[0230] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0231] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.
Claims
1. A task processing method, characterized in that: The steps include: Obtain computational tasks for underwater thrusters; Allocating the computing task to a preset first controller so that the computing task is processed by the first controller and corresponding control parameter data is generated; Get the preset start and end characters; Determining a target check code generation algorithm from a plurality of preset check code generation algorithms; Processing the control parameter data based on the target check code generation algorithm to generate a corresponding check code; Generate a corresponding control parameter data packet based on the start character, the end character, the control parameter data and the check code; The control parameter data packet is sent to a preset second controller based on a preset communication interface, so that the second controller executes a hardware control task corresponding to the underwater thruster according to the control parameter data packet.
2. The task processing method according to claim 1, characterized in that: The step of determining a target check code generation algorithm from a plurality of preset check code generation algorithms specifically includes: Get preset test data; Generate a processing efficiency value of each of the verification code generation algorithms based on the test data; Obtaining an effect feedback value of each of the verification code generation algorithms, and obtaining a verification strength value of each of the verification code generation algorithms; Calculating and processing the processing efficiency value, the effect feedback value, and the verification strength value based on a preset calculation strategy to generate a processing score for each verification code generation algorithm; Filter out a first check code generation algorithm with the highest processing score from all the check code generation algorithms; The first check code generation algorithm is used as the target check code generation algorithm.
3. The task processing method according to claim 2, characterized in that: The step of calculating and processing the processing efficiency value, the effect feedback value and the verification strength value based on a preset calculation strategy to generate a processing score of each verification code generation algorithm specifically includes: Obtaining a specified processing efficiency value, a specified effect feedback value, and a specified verification strength value of a second verification code generation algorithm; wherein the second verification code generation algorithm is any one of all the verification code generation algorithms; Get the preset weight generation algorithm; Generate a first weight corresponding to a processing efficiency index, generate a second weight corresponding to an effect feedback index, and generate a third weight corresponding to a verification strength index based on the weight generation algorithm; Call the preset score calculation formula; Based on the score calculation formula, the specified processing efficiency value, the specified effect feedback value, the specified verification strength value, the first weight, the second weight, and the third weight are calculated to obtain a corresponding calculation result; The calculation result is used as a designated processing score of the second check code generation algorithm.
4. The task processing method according to claim 1, characterized in that: The step of processing the control parameter data based on the target check code generation algorithm to generate a corresponding check code specifically includes: Determine a register corresponding to the target check code generation algorithm, and initialize the register to a preset value; Processing the data content in the control parameter data byte by byte, and updating the value of the register based on the target check code generation algorithm; After completing the processing of all the data contents, obtaining the current target value of the register; The target value is used as the check code.
5. The task processing method according to claim 1, characterized in that: The step of generating a corresponding control parameter data packet based on the start character, the end character, the control parameter data and the check code specifically includes: Get the preset assembly order; Based on the assembly sequence, the start character, the end character, the control parameter data and the check code are assembled to obtain corresponding assembly data; The assembled data is used as a control parameter data packet.
6. The task processing method according to claim 1, characterized in that: The step of sending the control parameter data packet to a preset second controller based on a preset communication interface specifically includes: Get the target parameter type; Extracting a target control parameter value corresponding to the target parameter type from the control parameter data packet; Obtaining a parameter threshold interval corresponding to the target parameter type; Determining whether the target control parameter value is within the parameter threshold range; If so, the step of sending the control parameter data packet to a preset second controller based on a preset communication interface is executed.
7. The task processing method according to claim 1, characterized in that: The task processing method further includes: Determining whether the first controller is in a state of full computing task load; If the first controller is in a state of full computing task, determining whether the second controller stores a specified group of valid control parameter data; If the specified set of valid control parameter data is stored, controlling the second controller to control the underwater thruster according to the specified set of valid control parameter data; If the valid control parameter data of the specified group is not stored, obtaining the specified control parameter data corresponding to the preset safety mode; The second controller is controlled to perform control processing on the underwater thruster according to the specified control parameter data.
8. A task processing device, characterized in that: include: A first acquisition module, used to acquire a computing task of an underwater thruster; An allocation module, used for allocating the computing task to a preset first controller, so that the computing task is processed by the first controller and corresponding control parameter data is generated; A second acquisition module is used to acquire a preset start character and end character; A determination module, used to determine a target check code generation algorithm from a plurality of preset check code generation algorithms; A first generating module, used for processing the control parameter data based on the target check code generation algorithm to generate a corresponding check code; A second generating module, configured to generate a corresponding control parameter data packet based on the start character, the end character, the control parameter data and the check code; A sending module is used to send the control parameter data packet to a preset second controller based on a preset communication interface, so that the second controller executes the hardware control task corresponding to the underwater thruster according to the control parameter data packet.
9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the task processing method according to any one of claims 1 to 7 when executing the computer-readable instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the task processing method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Satellite load instruction design optimization method and device, storage medium and electronic equipment
CN119576418A
