Communication transmission method, mobile robot and base station
By preloading protocol templates on mobile robots and base stations, the assembly and analysis of template digital information and requested data is achieved, and the problem of slow data transmission rate in a network-free environment is solved, and the data transmission efficiency between mobile robots and base stations is improved.
Patent Information
- Application Number
- CN202510390245.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-07-22
AI Technical Summary
When existing mobile robots communicate with base stations in a network-free environment, the data transmission rate is slow, the data volume is large, and the reception response is slow, resulting in a longer interaction time and affecting user experience and functional implementation.
By preloading the target protocol templates on the mobile robot and the base station, the mobile robot assembles the template digital information and requested data according to the protocol template, obtains the requested assembly data, and transmits it to the base station; the base station parses the requested assembly data, obtains the response data, and assembles it according to the protocol template and then passes it back to the mobile robot to achieve efficient data transmission.
It effectively reduces the interaction and delay of data volume during communication transmission, improves the data transmission rate between mobile robots and base stations, and is suitable for mobile robots and base stations with low processing speed and low memory.
Smart Images

Figure CN120358463A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of mobile robot communication, and particularly to a communication transmission method, a mobile robot, and a base station. Background Art
[0002] With the development of robot technology, existing mobile robots (such as window cleaning robots, floor cleaning robots, or lawn mowing robots, etc.) are becoming more and more intelligent. For example, new products of a base station with charging function and a window cleaning robot have emerged. The application areas of window cleaning robots are also becoming more and more extensive, not only limited to use in a home network environment, but may also be used in places without a network, such as public toilet cleaning, factory warehouse cleaning, etc.
[0003] When existing base stations with charging function and mobile robots are applied in places without a network, the communication between the mobile robot and the base station usually interacts through Bluetooth, infrared, etc. However, the data transmission rates of these interaction methods are slow, the data volume is large, and the reception response is slow, resulting in an extended interaction time between the mobile robot and the base station, affecting the user experience and the realization of functions. Summary of the Invention
[0004] Based on this, in view of the problem that when the existing base stations with charging function and mobile robots are applied in places without a network, the data transmission rate is slow, the data volume is large, and the reception response is slow, resulting in an extended interaction time between the mobile robot and the base station, it is necessary to provide a communication transmission method, a mobile robot, and a base station that can effectively reduce the data volume interaction and delay and improve the data transmission rate.
[0005] To achieve the above object, in a first aspect, an embodiment of the present invention provides a communication transmission method, which is applied to a mobile robot, and the mobile robot is used for communication connection with a base station; the communication transmission method includes the following steps:
[0006] Obtain a target protocol template corresponding to a function request to be sent;
[0007] According to the target protocol template, assemble the template digital information and request data corresponding to the function request to be sent to obtain request assembled data, and transmit the request assembled data to the base station;
[0008] Obtain response assembled data transmitted by the base station, and parse the response assembled data according to the target protocol template to obtain response data.
[0009] In one embodiment, the target protocol template includes a template information definition area and a request data definition area;
[0010] The step of assembling the template digital information and request data corresponding to the function request to be sent according to the target protocol template to obtain request assembled data includes:
[0011] Fill the template digital information in the template information definition area to obtain the first intermediate information, and fill the request data in the request data definition area to obtain the second intermediate information;
[0012] Assemble the first intermediate information and the second intermediate information to obtain the request assembly data.
[0013] In one embodiment, the template information definition area includes a template identification unit, a version identification unit, a request serial number unit, and a function quantity unit;
[0014] The step of filling the template digital information in the template information definition area to obtain the first intermediate information includes:
[0015] Obtain the template identification number and the version number according to the target protocol template;
[0016] Obtain the number of requested functions according to the function request to be sent;
[0017] Accumulate the request serial numbers cyclically according to the number of requests corresponding to the function request to be sent to obtain the request serial number;
[0018] Fill the template identification number in the template identification unit, the version number in the version identification unit, the request serial number in the request serial number unit, and the number of requested functions in the function quantity unit to obtain the first intermediate information.
[0019] In one embodiment, the request data definition area includes a request function parameter unit, a request content length unit, and a request content unit;
[0020] The step of filling the request data in the request data definition area to obtain the second intermediate information includes:
[0021] Obtain the request function parameter number, the request content length number, and the request content according to the function request to be sent;
[0022] Fill the request function parameter number in the request function parameter unit, the request content length number in the request content length unit, and the request content in the request content unit to obtain the second intermediate information.
[0023] In a second aspect, an embodiment of the present invention further provides a communication transmission method, which is applied to a base station for communicatively connecting a mobile robot; the communication transmission method includes the following steps:
[0024] Obtain the request assembly data transmitted by the mobile robot and the target protocol template corresponding to the request assembly data;
[0025] Parse the request assembly data according to the target protocol template to obtain the template digital information and the request data;
[0026] Process the request data to obtain response data, and based on the target protocol template, assemble the template digital information and the response data to obtain the response assembly data, and transmit the response assembly data to the mobile robot.
[0027] In one embodiment, the target protocol template includes a template information definition area and a response data definition area;
[0028] The steps of assembling the template digital information and the response data based on the target protocol template to obtain the response assembly data include:
[0029] Fill the template digital information in the template information definition area to obtain the first intermediate information, and fill the response data in the response data definition area to obtain the third intermediate information;
[0030] Assemble the first intermediate information and the third intermediate information to obtain the response assembly data.
[0031] In one embodiment, the response data definition area includes a response function parameter unit, a response content length unit, and a response content unit;
[0032] The steps of filling the response data in the response data definition area to obtain the third intermediate information include:
[0033] According to the response data, obtain the response function parameter number, the response content length number, and the response content;
[0034] Fill the response function parameter number in the response function parameter unit, the response content length number in the response content length unit, and the response content in the response content unit to obtain the third intermediate information.
[0035] In a third aspect, an embodiment of the present invention further provides a mobile robot, including a mobile robot body, a first communication module, and a first controller. The first controller and the first communication module are disposed on the mobile robot body, and the first controller is connected to the first communication module; the first communication module is used to connect to a base station;
[0036] The first controller is configured to execute the steps of the communication transmission method in any one of the above.
[0037] In one embodiment, the first communication module is a Bluetooth communication module or an infrared communication module.
[0038] In a fourth aspect, an embodiment of the present invention further provides a base station, including a base station body, a second communication module, and a second controller. The second controller and the second communication module are disposed on the base station body, and the second controller is connected to the second communication module; the second communication module is used to connect to a mobile robot;
[0039] The second controller is used to execute the steps of any one of the above communication transmission methods.
[0040] One of the above technical solutions has the following advantages and beneficial effects:
[0041] In the embodiment of the above communication transmission method, it is applied to a mobile robot, and the mobile robot is used to communicate and connect to a base station; by obtaining a target protocol template corresponding to the function request to be sent; according to the target protocol template, the template digital information and request data corresponding to the function request to be sent are assembled to obtain request assembly data, and the request assembly data is transmitted to the base station; the response assembly data transmitted by the base station is obtained, and the response assembly data is parsed according to the target protocol template to obtain response data, so as to realize efficient data transmission between a mobile robot with low hardware configuration and a base station. The present application pre-loads the protocol templates respectively through the mobile robot and the base station. When the mobile robot initiates a request, it can query the corresponding target protocol template, and then assemble the template digital information and request data according to the target protocol template to obtain request assembly data, and send the request assembly data to the base station, so that the base station parses and processes the request assembly data, and assembles the response data according to the processing result to obtain response assembly data, and the response assembly data is transmitted back to the mobile robot, and then the mobile robot parses the response assembly data to obtain response data, so as to realize efficient data transmission between the mobile robot and the base station, effectively reduce the data volume interaction and delay in the communication transmission process, and improve the data transmission rate of the mobile robot, which is suitable for use on mobile robots with low processing speed and low memory. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A schematic diagram of an application environment of a communication transmission method in an embodiment;
[0043] Figure 2 is a flow chart of a communication transmission method applied to a mobile robot in one embodiment;
[0044] Figure 3 A flowchart of a step of requesting assembly data acquisition in one embodiment;
[0045] Figure 4 It is a flowchart of a first intermediate information acquisition step in an embodiment;
[0046] Figure 5 It is a schematic diagram of the process of the second intermediate information acquisition step in one embodiment;
[0047] Figure 6 A schematic diagram of a flow chart of a communication transmission method applied to a base station in an embodiment;
[0048] Figure 7It is a schematic flow chart for the response assembly data acquisition step in an embodiment;
[0049] Figure 8 It is a schematic structural connection diagram of a mobile robot and a base station in an embodiment;
[0050] Figure 9 It is a schematic diagram of the communication interaction between a mobile robot and a base station in an embodiment. Detailed implementation manners
[0051] In order to enable those skilled in the art to better understand the solution of this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of this application.
[0052] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so as to describe the embodiments of this application here. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0053] In addition, the meaning of the term "plurality" should be two or more.
[0054] The communication transmission method provided by this application can be applied to, for example Figure 1In the application environment shown. Among them, the robot system includes a mobile robot 102 and a base station 104, and the mobile robot 102 is connected to the base station 104 in communication. The mobile robot 102 is used to obtain the target protocol template corresponding to the function request to be sent; according to the target protocol template, the template digital information and request data corresponding to the function request to be sent are assembled to obtain the request assembly data, and the request assembly data is transmitted to the base station 104; the response assembly data transmitted by the base station 104 is obtained, and the response assembly data is parsed according to the target protocol template to obtain the response data. The base station 104 is used to obtain the request assembly data transmitted by the mobile robot 102 and the target protocol template corresponding to the request assembly data; according to the target protocol template, the request assembly data is parsed to obtain the template digital information and the request data; the request data is processed to obtain the response data, and the template digital information and the response data are assembled based on the target protocol template to obtain the response assembly data, and the response assembly data is transmitted to the mobile robot 102. Among them, the mobile robot 102 can be but not limited to a sweeping robot, a window cleaning robot or a lawn mowing robot. The base station 104 may be used to recycle and charge the mobile robot 102 ; the base station 104 may also be used to recycle and clean the mobile robot 102 .
[0055] In one embodiment, Figure 2 As shown, a communication transmission method is provided, which is applied to a mobile robot, and the mobile robot is used to communicate with a base station; the communication transmission method includes the following steps:
[0056] Step S210: Obtain a target protocol template corresponding to the function request to be sent.
[0057] Among them, the mobile robot can preset and load several target protocol templates, the base station can preset and load several target protocol templates, and each target protocol template loaded by the mobile robot is the same as each target protocol template loaded by the base station. The function request to be sent may include at least one function request. For example, the function request to be sent may include request function A and request function B, request function A is the corresponding working mode (workMode), and request function B is the corresponding water level (waterLevel).
[0058] When the mobile robot initiates a request, it queries the corresponding protocol template according to the function request to be sent, and then obtains the target protocol template corresponding to the function request to be sent.
[0059] Step S220: assemble the template digital information and request data corresponding to the function request to be sent according to the target protocol template to obtain request assembly data, and transmit the request assembly data to the base station.
[0060] Among them, the template data information is used to represent the template information definition of the target protocol template. The template digital information is identified by digital values; the request data can also be identified by corresponding digital values. In different protocols, the same number can represent different functions, which can increase the utilization rate of the repetition of numbers in different protocol definitions and avoid the larger data volume caused by the rapid growth of numbers.
[0061] For example, in function A of the machine, "1" is defined as "workMode", which means that the value corresponding to 1 represents the working mode; in function B of the machine: "1" is defined as "waterLevel", that is, the value corresponding to 1 represents the water outlet level. Although both functions A and B send the number 1, the receiving party can make correct response processing according to the protocol definition. Exemplarily, function A has 10 parameters, defined as 1 to 10, and function B has 9 parameters, which can be defined as 1 to 9, so as to avoid the need for more bytes to represent numbers exceeding 256 bits due to the rapid growth of numbers, thereby achieving the purpose of reducing the data volume. It should be noted that the length of numbers is significantly less than the number of bytes occupied by letters. For example: "1" is "workMode", the number 1 only occupies 8 bits or less, while the letter workMode requires at least 64 bits (ASCII encoding) or more (such as UTF8 encoding).
[0062] For example, according to the function request to be sent, the corresponding template digital information and request data are obtained, and based on the protocol format of the target protocol template, the corresponding template digital information and request data are assembled, and then the request assembled data is obtained, and the request assembled data is transmitted to the base station, realizing the concise transmission of the request data and effectively improving the data transmission rate of the mobile robot.
[0063] Step S230: Obtain the response assembled data transmitted by the base station, and parse the response assembled data according to the target protocol template to obtain the response data.
[0064] Among them, the base station is used to receive the request assembled data, parse the request assembled data based on the target protocol template to obtain the request data, and then process the request data to obtain the response data. The base station is also used to assemble and process the response data based on the corresponding target protocol template to obtain the response assembled data, and transmit the response assembled data to the mobile robot.
[0065] The mobile robot can receive response assembly data, and based on the corresponding target protocol template, parse and process the response assembly data to obtain response data, thereby realizing data interaction between the mobile robot and the base station and streamlining the transmission of response data, which effectively improves the data transmission rate of the mobile robot and can ensure efficient data transmission between the mobile robot with low processing speed and low memory and the base station, thus avoiding prolonged interaction time between the mobile robot and the base station.
[0066] It should be noted that the communication method between the mobile robot and the base station can be Bluetooth communication or infrared communication.
[0067] In the above-mentioned embodiment, it is applied to a mobile robot, and the mobile robot is used to communicate and connect to a base station; by obtaining a target protocol template corresponding to the function request to be sent; according to the target protocol template, the template digital information and request data corresponding to the function request to be sent are assembled to obtain request assembly data, and the request assembly data is transmitted to the base station; the response assembly data transmitted by the base station is obtained, and according to the target protocol template, the response assembly data is parsed to obtain response data, so as to realize efficient data transmission between a mobile robot with low hardware configuration and a base station. The present application pre-loads the protocol templates respectively through the mobile robot and the base station. When the mobile robot initiates a request, it can query the corresponding target protocol template, and then assemble the template digital information and request data according to the target protocol template to obtain request assembly data, and send the request assembly data to the base station, so that the base station can parse and process the request assembly data, and assemble the response data according to the processing result to obtain response assembly data, and the response assembly data is transmitted back to the mobile robot, and then the mobile robot parses the response assembly data to obtain response data, so as to realize efficient data transmission between the mobile robot and the base station, effectively reduce the data volume interaction and delay in the communication transmission process, and improve the data transmission rate of the mobile robot, which is suitable for use on mobile robots with low processing speed and low memory.
[0068] In one embodiment, the target protocol template includes a template information definition area and a request data definition area. Figure 3 As shown, according to the target protocol template, the template digital information and request data corresponding to the function request to be sent are assembled to obtain the request assembly data, including:
[0069] Step S310: Fill the template digital information into the template information definition area to obtain the first intermediate information, and fill the request data into the request data definition area to obtain the second intermediate information.
[0070] The target protocol template can be divided into a template information definition area and a request data definition area based on the protocol format. The template information definition area is used to set the definition information of the template, and the request data definition area is used to set the definition information of the request data. The first intermediate information can be information defined numerically based on the corresponding protocol template; the second intermediate information can be information defined numerically based on the corresponding request data.
[0071] For example, the mobile robot queries the corresponding target protocol template according to the function request to be sent, and processes the function request to be sent according to the target protocol template to obtain template digital information and request data. Then, based on the protocol format of the target protocol template, the template digital information is filled in the template information definition area to obtain the first intermediate information; the request data is filled in the request data definition area to obtain the second intermediate information.
[0072] Step S320: Assemble the first intermediate information and the second intermediate information to obtain the request assembly data.
[0073] Based on the protocol format of the corresponding target protocol template, the first intermediate information and the second intermediate information are assembled to obtain the request assembly data, and the request assembly data is transmitted to the base station to achieve the streamlined transmission of the request data, so that the base station can parse and process the request assembly data, and assemble the response data according to the processing result to obtain the response assembly data, and the response assembly data is sent back to the mobile robot. Then, the mobile robot parses the response assembly data to obtain the response data, realizing the efficient data transmission between the mobile robot and the base station, effectively reducing the data volume interaction and delay in the communication transmission process, improving the data transmission rate of the mobile robot, and being applicable to mobile robots with low processing speed and low memory.
[0074] In one embodiment, the template information definition area includes a template identification unit, a version identification unit, a request sequence number unit, and a function quantity unit. As Figure 4 shown, the steps of filling the template digital information in the template information definition area to obtain the first intermediate information include:
[0075] Step S410: Obtain the template identification number and the version number according to the target protocol template.
[0076] Among them, the template information definition area defines the identification, version number, protocol length, function quantity, etc. of the template numerically. The target protocol template divides the template information definition area into a template identification unit, a version identification unit, a request sequence number unit, and a function quantity unit based on the protocol format. The template identification unit is used to set the template identification number, for example, the template identification number is set to 1; the version identification unit is used to set the template version number, for example, the template version number is set to 1.
[0077] According to the function request to be sent, query the corresponding target protocol template, and then obtain the template identification number and version number according to the target protocol template.
[0078] Step S420: Obtain the number of requested functions according to the function request to be sent.
[0079] Among them, the function quantity unit is used to set the number of requested functions corresponding to the function request to be sent. For example, if the number of functions in the function request to be sent is 1, the number of requested functions is set to 1.
[0080] For example, if the function request to be sent includes 1 function parameter, the number of requested functions is 1; if the function request to be sent includes 2 function parameters, the number of requested functions is 2.
[0081] Step S430: Cumulatively loop the request serial number according to the number of requests corresponding to the function request to be sent, and obtain the request serial number.
[0082] Among them, the request serial number unit is used to set the request serial number. For example, the initial request serial number is set to 1, and the next request serial number will be cumulatively increased by 1. When the request serial number reaches the maximum value, it will start to loop from 1 again.
[0083] Exemplarily, set the maximum value of the cumulative loop to 255. Then, when the function request to be sent is the initial request, the request serial number; as the number of requests increases, the request serial number will be cumulatively increased until the request serial number accumulates to 255, and then start to loop and accumulate from 1 again to realize the determination of the request serial number.
[0084] Step S440: Fill the template identification number in the template identification unit, the version number in the version identification unit, the request serial number in the request serial number unit, and the number of requested functions in the function quantity unit to obtain the first intermediate information.
[0085] Among them, based on the protocol format of the corresponding target protocol template, fill the template identification number in the template identification unit, the version number in the version identification unit, the request serial number in the request serial number unit, and the number of requested functions in the function quantity unit, and then obtain the first intermediate information. For example, if the function request to be sent includes function requests for workMode and waterLevel, the number of requested functions is 2, the request serial number is set to 1, and according to the query of the corresponding target protocol template, the template identification is 1 and the version number is 1. Then, fill 1 in the template identification unit, 1 in the version identification unit, 1 in the request serial number unit, and 2 in the function quantity unit, and then the decimal format of the first intermediate information is "1112".
[0086] In one embodiment, the request data definition area includes a request function parameter unit, a request content length unit, and a request content unit. As Figure 5 shown, the steps of filling the request data in the request data definition area to obtain the second intermediate information include:
[0087] Step S510: Obtain the request function parameter number, the request content length number, and the request content according to the function request to be sent.
[0088] Among them, the request data definition area defines the request function parameter, the request content length number, and the request content corresponding to the request data based on numbers. The target protocol template divides the request data definition area into a request function parameter unit, a request content length unit, and a request content unit based on the protocol format. The request function parameter unit is used to set the request function parameter number. For example, if the corresponding request is waterLevel, the request function parameter number is set to 2; the request content length unit is used to set the request content length number. For example, if the numerical value of waterLevel is set to 3, then the request content length number is set to 1; the request content unit is used to set the request content. For example, the request content number of waterLevel is set to 3.
[0089] Confirm the corresponding function request according to the function request to be sent, and then obtain the request function parameter number, the request content length number, and the request content.
[0090] Step S520: Fill the request function parameter number in the request function parameter unit, the request content length number in the request content length unit, and the request content in the request content unit to obtain the second intermediate information.
[0091] Among them, based on the protocol format of the corresponding target protocol template, fill the request function parameter number in the request function parameter unit, the request content length number in the request content length unit, and the request content in the request content unit, and then obtain the second intermediate information. For example, if the function requests to be sent include the function requests of workMode and waterLevel, the value of workMode is ABCD, and the value of waterLevel is 3, then the request function parameter corresponding to the workMode request is 1, and the request content length is 4; the request function parameter corresponding to the waterLevel request is 2, and the request content length is 1. Then, the decimal format of the second intermediate information is "104ABCD2013".
[0092] By assembling the first intermediate information "1112" and the second intermediate information "104ABCD2013", the requested assembled data "1112104ABCD2013" is obtained, and the requested assembled data is transmitted to the base station to achieve streamlined transmission of the requested data, so that the base station can parse and process the requested assembled data, and assemble the response data according to the processing result to obtain the response assembled data, and the response assembled data is sent back to the mobile robot. Then, the mobile robot parses the response assembled data to obtain the response data, realizing efficient data transmission between the mobile robot and the base station, effectively reducing the data volume interaction and delay in the communication transmission process, improving the data transmission rate of the mobile robot, and being applicable to mobile robots with low processing speed and low memory.
[0093] In the above example, compared with the traditional JSON-based processing, such as defining {"m": 1, "w": "ABCD", "l": 3}, a total of 24 characters are used. While "1112104ABCD2013" only uses 15 characters, and the data volume is reduced by about 38%. In addition, in the traditional JSON definition method, when there are more protocol parameters, the bytes of the key will be longer, and the definition and meaning are not convenient for people to understand. The embodiment of the present application significantly reduces the data compared with the traditional JSON method. At the same time, due to the adoption of the binary processing method, as the parameters increase, compared with the traditional string JSON definition (including many extra separator characters, and binary data needs to be converted into base64 strings, etc.), the degree of reduction will be further improved. The present application can maintain a lower data volume. Since it only involves binary bit operations and string searches, it is suitable for use on mobile robots with low processing speed and low memory. It can also be used as a communication protocol between some more advanced mobile robots and base stations, improving the adaptability of the machine.
[0094] It should be noted that the data assembly based on the target protocol template can also be changed according to the actual application situation. For example, if the number of templates exceeds 256, the position can be expanded to 16 bits.
[0095] In one embodiment, as Figure 6 shown, the embodiment of the present invention also provides a communication transmission method, which is applied to a base station. The base station is used to communicate with a mobile robot; the communication transmission method includes the following steps:
[0096] Step S610: Obtain the requested assembled data transmitted by the mobile robot and the target protocol template corresponding to the requested assembled data.
[0097] Among them, the mobile robot can preset and load several target protocol templates, the base station presets and loads several target protocol templates, and the target protocol templates loaded by the mobile robot are the same as the target protocol templates loaded by the base station. When the mobile robot initiates a request, it queries the corresponding protocol template according to the function request to be sent, and then obtains the target protocol template corresponding to the function request to be sent. The mobile robot obtains the corresponding template digital information and request data according to the function request to be sent, assembles the corresponding template digital information and request data based on the protocol format of the target protocol template, and then obtains the request assembly data, and transmits the request assembly data to the base station, so that the base station can obtain the request assembly data transmitted by the mobile robot, and obtains the corresponding target protocol template according to the request assembly data.
[0098] Step S620: Parse the request assembly data according to the target protocol template to obtain template digital information and request data.
[0099] The base station parses the request assembly data based on the target protocol template to obtain the request data and the template digital information, so that the base station can process the request data and obtain the response data.
[0100] Step S630: process the request data to obtain response data, and assemble the template digital information and the response data based on the target protocol template to obtain response assembly data, and transmit the response assembly data to the mobile robot.
[0101] The base station processes the request data to obtain response data, and assembles the template digital information and the response data based on the corresponding target protocol template to obtain response assembly data, and transmits the response assembly data to the mobile robot, so that the mobile robot parses and processes the received response assembly data based on the corresponding target protocol template to obtain response data, thereby realizing data interaction between the base station and the mobile robot, realizing streamlined transmission of response data, and effectively improving the data transmission rate of the mobile robot, which can ensure high-efficiency data transmission between the base station with low processing speed and low memory and the mobile robot, and avoid extending the interaction time between the base station and the mobile robot.
[0102] In the above-mentioned embodiment, it is applied to a base station, and the base station is used to communicate with a mobile robot; the base station can parse and process the request assembly data transmitted by the mobile robot, and assemble the response data according to the processing result to obtain the response assembly data, and the response assembly data is transmitted back to the mobile robot, and then the mobile robot parses the response assembly data to obtain the response data, thereby realizing efficient data transmission between the base station and the mobile robot, effectively reducing the data volume interaction and delay in the communication transmission process, and improving the data transmission rate of the base station, which is suitable for use on base stations with low processing speed and low memory.
[0103] In one embodiment, the target protocol template includes a template information definition area and a response data definition area. As Figure 7 shown, based on the target protocol template, the steps of assembling the template digital information and the response data to obtain the response assembly data include:
[0104] Step S710: Fill the template digital information in the template information definition area to obtain the first intermediate information, and fill the response data in the response data definition area to obtain the third intermediate information.
[0105] For example, the target protocol template can be divided into a template information definition area, a request data definition area, and a response data definition area based on the protocol format. The response data definition area is used to set the definition information of the response data. The third intermediate information can be information defined based on the numbers of the corresponding response data. For the descriptions of the template information definition area and the request data definition area, reference can be made to the descriptions of the template information definition area and the request data definition area in the above embodiments, which will not be elaborated here.
[0106] For example, the base station fills the template digital information in the template information definition area based on the protocol format of the corresponding target protocol template to obtain the first intermediate information; fills the response data in the response data definition area to obtain the third intermediate information. It should be noted that the template digital information includes the response serial number of the corresponding response, and the request serial number during the request is the same as the response serial number during the corresponding response, so that the requests and responses can be paired one by one.
[0107] Step S720: Assemble the first intermediate information and the third intermediate information to obtain the response assembly data.
[0108] Based on the protocol format of the corresponding target protocol template, the first intermediate information and the third intermediate information are assembled to obtain the response assembly data, and the response assembly data is transmitted to the mobile robot to achieve the streamlined transmission of the response data, so that the mobile robot can parse and process the response assembly data to obtain the response data, realizing the efficient data transmission between the base station and the mobile robot, effectively reducing the data volume interaction and delay in the communication transmission process, improving the data transmission rate of the base station, and being applicable to use on a base station with low processing speed and low memory. In another example, the first intermediate information, the second intermediate information, and the third intermediate information can be assembled based on the protocol format of the corresponding target protocol template to obtain the response assembly data.
[0109] In one embodiment, the response data definition area includes a response function parameter unit, a response content length unit, and a response content unit. The step of filling the response data into the response data definition area to obtain the third intermediate information includes: obtaining a response function parameter number, a response content length number, and a response content according to the response data; filling the response function parameter number into the response function parameter unit, the response content length number into the response content length unit, and the response content into the response content unit to obtain the third intermediate information.
[0110] Among them, the response data definition area defines the response function parameter, the response content length number, and the response content corresponding to the response data based on numbers. The target protocol template divides the response data definition area into a response function parameter unit, a response content length unit, and a response content unit based on the protocol format. The response function parameter unit is used to set the response function parameter number. For example, if the corresponding response is result, the response function parameter number is set to 1; the response content length unit is used to set the response content length number. For example, if the numerical value of result is set to 1, the response content length number is set to 1; the response content unit is used to set the response content. For example, the response content number of result is set to 1.
[0111] The base station obtains a response function parameter number, a response content length number, and a response content according to the response data, and based on the protocol format of the corresponding target protocol template, fills the response function parameter number 1 into the response function parameter unit, the response content length number 1 into the response content length unit, and the response content 1 into the response content unit. Then, the decimal format of the third intermediate information obtained is "1011".
[0112] It should be understood that although Figures 2 to 7 the steps in the flowchart are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise clearly stated in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, Figures 2 to 7 at least a part of the steps in
[0113] In one embodiment, as Figure 8As shown, an embodiment of the present invention also provides a mobile robot, including a mobile robot body 810, a first communication module 820 and a first controller 830, the first controller 830 and the first communication module 820 are arranged on the mobile robot body 810, the first controller 830 is connected to the first communication module 820; the first communication module 820 is used to connect to a base station; the first controller 830 is used to execute the steps of any one of the above-mentioned communication transmission methods.
[0114] For example, the first communication module 820 is a Bluetooth communication module or an infrared communication module. The mobile robot body 810 may be a sweeping robot body, a window cleaning robot body or a lawn mowing robot body.
[0115] like Figure 9 As shown, the first controller 830 based on the mobile robot is connected to the first communication module 820; the first communication module 820 is connected to the base station; the first controller 830 obtains the target protocol template corresponding to the function request to be sent; according to the target protocol template, the template digital information and request data corresponding to the function request to be sent are assembled to obtain request assembly data, and the request assembly data is transmitted to the base station through the first communication module 820; the first controller 830 obtains the response assembly data transmitted by the base station through the first communication module 820, and according to the target protocol template, the response assembly data is parsed to obtain response data, thereby realizing efficient data transmission between the mobile robot with low hardware configuration and the base station. The present application pre-loads the protocol templates through the mobile robot and the base station respectively. When the mobile robot initiates a request, it can query the corresponding target protocol template, and then assemble the template digital information and the request data according to the target protocol template to obtain the request assembly data, and send the request assembly data to the base station so that the base station can parse and process the request assembly data, and assemble the response data according to the processing result to obtain the response assembly data, and the response assembly data is sent back to the mobile robot, and then the mobile robot parses the response assembly data to obtain the response data, thereby realizing efficient data transmission between the mobile robot and the base station, effectively reducing the data volume interaction and delay in the communication transmission process, and improving the data transmission rate of the mobile robot. It is suitable for use on mobile robots with low processing speed and low memory.
[0116] In one embodiment, Figure 8 As shown, an embodiment of the present invention also provides a base station, including a base station body 840, a second communication module 850 and a second controller 860, the second controller 860 and the second communication module 850 are arranged on the base station body 840, and the second controller 860 is connected to the second communication module 850; the second communication module 850 is used to connect to the mobile robot; the second controller 860 is used to execute the steps of any one of the above-mentioned communication transmission methods.
[0117] For example, the second communication module 850 is a Bluetooth communication module or an infrared communication module. The base station body 840 can be used to charge the mobile robot; the base station can also be used to recycle and clean the mobile robot.
[0118] As Figure 9 shown, the second controller 860 of the base station is connected to the second communication module 850; the second communication module 850 is connected to the mobile robot; the second controller 860 obtains the request assembly data transmitted by the mobile robot and the target protocol template corresponding to the request assembly data through the second communication module 850; the second controller 860 parses the request assembly data according to the target protocol template to obtain the template digital information and the request data; the second controller 860 processes the request data to obtain the response data, and based on the target protocol template, assembles the template digital information and the response data to obtain the response assembly data, and transmits the response assembly data to the mobile robot through the second communication module 850, realizing efficient data transmission between the base station with low hardware configuration and the mobile robot, effectively reducing the data volume interaction and delay in the communication transmission process, improving the data transmission rate of the base station, and being applicable to use on a base station with low processing speed and low memory.
[0119] In one embodiment, a computer-readable storage medium is further provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the communication transmission method in any one of the above are implemented.
[0120] In one example, when the computer program is executed by a processor, the following steps are implemented:
[0121] Obtain the target protocol template corresponding to the function request to be sent; according to the target protocol template, assemble the template digital information and the request data corresponding to the function request to be sent to obtain the request assembly data, and transmit the request assembly data to the base station; obtain the response assembly data transmitted by the base station, and according to the target protocol template, parse the response assembly data to obtain the response data.
[0122] In another example, when the computer program is executed by a processor, the following steps are implemented:
[0123] Obtain the request assembly data transmitted by the mobile robot and the target protocol template corresponding to the request assembly data; according to the target protocol template, parse the request assembly data to obtain the template digital information and the request data; process the request data to obtain the response data, and based on the target protocol template, assemble the template digital information and the response data to obtain the response assembly data, and transmit the response assembly data to the mobile robot.
[0124] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. 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 methods. Among them, any reference to a memory, storage, database, or other medium used in the embodiments provided in the present application can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.
[0125] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, 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, it should be considered as the scope described in this specification.
[0126] The above embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the appended claims.
Claims
1. A communication transmission method, characterized in that, Applied to a mobile robot, the mobile robot is used for communication connection with a base station; the communication transmission method includes the following steps: Obtain a target protocol template corresponding to a function request to be sent; According to the target protocol template, assemble the template digital information and request data corresponding to the function request to be sent to obtain request assembly data, and transmit the request assembly data to the base station; Obtain the response assembly data transmitted by the base station, and parse the response assembly data according to the target protocol template to obtain response data.
2. The communication transmission method according to claim 1, wherein The target protocol template includes a template information definition area and a request data definition area; The step of assembling the template digital information and request data corresponding to the function request to be sent according to the target protocol template to obtain request assembly data includes: Fill the template digital information in the template information definition area to obtain first intermediate information, and fill the request data in the request data definition area to obtain second intermediate information; Assemble the first intermediate information and the second intermediate information to obtain the request assembly data.
3. The communication transmission method according to claim 2, characterized in that, The template information definition area includes a template identification unit, a version identification unit, a request sequence number unit, and a function quantity unit; The step of filling the template digital information in the template information definition area to obtain first intermediate information includes: Obtain a template identification number and a version number according to the target protocol template; Obtain the number of requested functions according to the function request to be sent; Circularly accumulate the request sequence numbers according to the number of requests corresponding to the function request to be sent to obtain a request sequence number; Fill the template identification number in the template identification unit, the version number in the version identification unit, the request sequence number in the request sequence number unit, and the number of requested functions in the function quantity unit to obtain the first intermediate information.
4. The communication transmission method according to claim 2, wherein The request data definition area includes a request function parameter unit, a request content length unit, and a request content unit; The step of filling the request data in the request data definition area to obtain second intermediate information includes: Obtain a request function parameter number, a request content length number, and a request content according to the function request to be sent; Fill the request function parameter number in the request function parameter unit, the request content length number in the request content length unit, and the request content in the request content unit to obtain the second intermediate information.
5. A communication transmission method, characterized in that, Applied to a base station, the base station is used for communication connection with a mobile robot; the communication transmission method includes the following steps: Obtain the request assembly data transmitted by the mobile robot and the target protocol template corresponding to the request assembly data; Parse the request assembly data according to the target protocol template to obtain template digital information and request data; Process the request data to obtain response data, and based on the target protocol template, assemble the template digital information and the response data to obtain response assembly data, and transmit the response assembly data to the mobile robot.
6. The communication transmission method according to claim 5, characterized in that, The target protocol template includes a template information definition area and a response data definition area; The steps of assembling the template digital information and the response data based on the target protocol template to obtain response assembly data include: Filling the template digital information in the template information definition area to obtain first intermediate information, and filling the response data in the response data definition area to obtain third intermediate information; Assembling the first intermediate information and the third intermediate information to obtain the response assembly data.
7. The communication transmission method according to claim 6, wherein The response data definition area includes a response function parameter unit, a response content length unit, and a response content unit; The steps of filling the response data in the response data definition area to obtain third intermediate information include: Obtaining a response function parameter number, a response content length number, and a response content according to the response data; Filling the response function parameter number in the response function parameter unit, the response content length number in the response content length unit, and the response content in the response content unit to obtain the third intermediate information.
8. A mobile robot, characterized in that, It includes a mobile robot body, a first communication module, and a first controller. The first controller and the first communication module are arranged on the mobile robot body, and the first controller is connected to the first communication module; the first communication module is used to connect to a base station; The first controller is used to execute the steps of the communication transmission method according to any one of claims 1 to 4.
9. The mobile robot according to claim 8, wherein The first communication module is a Bluetooth communication module or an infrared communication module.
10. A base station, characterized in that, It includes a base station body, a second communication module, and a second controller. The second controller and the second communication module are arranged on the base station body, and the second controller is connected to the second communication module; the second communication module is used to connect to a mobile robot; The second controller is used to execute the steps of the communication transmission method according to any one of claims 5 to 7.