Rapid data distribution service protocol replacement method, apparatus and device under communication management framework, and storage medium
By modifying and compiling the FastDDS header file and source file, and combining the dynamic library files of the target data distribution service, replacing the original protocol, the problem that FastDDS cannot meet specific application needs is solved, and protocol replacement and application needs are achieved.
Patent Information
- Application Number
- CN202411367661.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-02-11
AI Technical Summary
FastDDS cannot meet specific application needs when facing some specific application scenarios, resulting in the inability to effectively meet specific communication service application needs.
By obtaining the header file and service attributes in the source file of the fast data distribution service, determining the modification strategy, modifying the header file and source file, compiling and generating the target shared object file, and combining it with the dynamic library file of the target data distribution service, Replace the original fast data distribution service agreement.
It has implemented the replacement of the FastDDS protocol with the required target DDS protocol to meet the specific communication service application needs and solved the problem that FastDDS cannot meet the needs in some application scenarios.
Smart Images

Figure CN119415135A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of real-time communication technology, and in particular to a method, device, equipment and storage medium for replacing a fast data distribution service protocol under a communication management framework. Background Art
[0002] FastDDS (Fast Data Distribution Service) is a DDS (Data Distribution Service) standard library implemented in C++. It provides a publish-subscribe communication mechanism based on unreliable transmission, supports multiple QoS (Quality of Service) strategies, and can perform real-time message exchange on a standard network. It has the characteristics of high performance, real-time performance, flexibility and scalability.
[0003] However, FastDDS cannot meet specific application requirements in some specific application scenarios. Therefore, how to meet specific communication service application requirements is a problem that still needs to be solved.
[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of this application is to provide a method, device, equipment and storage medium for replacing a fast data distribution service protocol under a communication management framework, aiming to solve the technical problem of how to meet specific communication service application requirements.
[0006] To achieve the above objectives, the present application proposes a method for replacing a fast data distribution service protocol under a communication management framework, the method comprising:
[0007] Acquire each service attribute in the header file and the source file of the fast data distribution service, determine a corresponding modification strategy according to the service attribute, modify the header file and the source file according to the modification strategy, and obtain a target header file and a target source file;
[0008] Obtaining a build instruction file, and compiling the target header file and the source file using the build instruction file to obtain a compiled target shared object file;
[0009] A dynamic library file of a target data distribution service is obtained, and a fast data distribution service protocol is replaced according to the target shared object file and the dynamic library file.
[0010] In one embodiment, the step of modifying the header file and the source file according to the modification strategy includes:
[0011] Annotate the relevant types of the fast data distribution service in the header file;
[0012] Modify the code called by the client in the header file;
[0013] Modify the code called by the server in the header file;
[0014] Modify the function declaration code of the service search function in the header file;
[0015] Modify the code of the fast data distribution service in the source file.
[0016] In one embodiment, the step of modifying the code called by the client in the header file includes:
[0017] Modify the function interface code of the client fast data distribution service in the header file;
[0018] Modify the resource destruction code of the client fast data distribution service in the header file;
[0019] Modify the processing function code of the client fast data distribution service in the header file.
[0020] In one embodiment, the step of modifying the code called by the server in the header file includes:
[0021] Modify the function interface code of the fast data distribution service in the server in the header file;
[0022] Modify the resource destruction code of the fast data distribution service in the server in the header file;
[0023] Modify the data sending function code of the fast data distribution service in the server in the header file.
[0024] In one embodiment, the step of modifying the code of the fast data distribution service in the source file includes:
[0025] Annotate the service quality configuration management code of the fast data distribution service in the source file;
[0026] Modify the creation and callback function codes of the fast data distribution service in the source file;
[0027] Modify the resource destruction code of the fast data distribution service in the source file;
[0028] Modify the code in the source file used by the fast data distribution service to set, judge and delete user data.
[0029] In one embodiment, the step of obtaining a build instruction file, and compiling the target header file and the source file through the build instruction file to obtain a compiled target shared object file comprises:
[0030] Obtain a build instruction file, and add a dynamic library path and a header file path of a target data distribution service to the build instruction file;
[0031] Parsing the build instruction file to generate compile commands;
[0032] The target header file and the source file are compiled by the compile command to obtain a compiled target shared object file.
[0033] In one embodiment, the step of obtaining a dynamic library file of a target data distribution service and replacing a fast data distribution service protocol according to the target shared object file and the dynamic library file comprises:
[0034] Get the dynamic library file of the target data distribution service file;
[0035] Adding the dynamic library file to a software development kit;
[0036] Replace the shared object file of the fast data distribution service with the target shared object file.
[0037] In addition, to achieve the above purpose, the present application also proposes a fast data distribution service protocol replacement device under a communication management framework, and the fast data distribution service protocol replacement device under the communication management framework includes:
[0038] A modification module, used for obtaining each service attribute in the header file and the source file of the fast data distribution service, determining a corresponding modification strategy according to the service attribute, and modifying the header file and the source file according to the modification strategy to obtain a target header file and a target source file;
[0039] A compiling module, used for obtaining a build instruction file, and compiling the target header file and the source file through the build instruction file to obtain a compiled target shared object file;
[0040] The replacement module is used to obtain the dynamic library file of the target data distribution service, and replace the fast data distribution service protocol according to the target shared object file and the dynamic library file.
[0041] In addition, to achieve the above-mentioned objectives, the present application also proposes a fast data distribution service protocol replacement device under a communication management framework, the device comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the fast data distribution service protocol replacement method under the communication management framework as described above.
[0042] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the fast data distribution service protocol replacement method under the communication management framework as described above are implemented.
[0043] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the fast data distribution service protocol replacement method under the communication management framework as described above.
[0044] The present application proposes a method for replacing a fast data distribution service protocol under a communication management framework. The present application first obtains each service attribute in a header file and a source file of a fast data distribution service, determines a corresponding modification strategy according to the service attributes, modifies the header file and the source file according to the modification strategy, and obtains a target header file and a target source file; obtains a build instruction file, compiles the target header file and the source file through the build instruction file, and obtains a compiled target shared object file; obtains a dynamic library file of a target data distribution service, and replaces a fast data distribution service protocol according to the target shared object file and the dynamic library file.
[0045] In summary, this application can replace the FastDDS protocol with the required target DDS protocol by modifying the code, compiling and replacing it, thereby solving the problem of how to meet specific communication service application requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0047] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0048] Figure 1A flowchart diagram of a first embodiment of a method for replacing a fast data distribution service protocol under a communication management framework of the present application;
[0049] Figure 2 A flowchart diagram of a second embodiment of a method for replacing a fast data distribution service protocol under a communication management framework of the present application is provided;
[0050] Figure 3 This is a schematic diagram of the module structure of a fast data distribution service protocol replacement device under the communication management framework of an embodiment of the present application;
[0051] Figure 4 This is a schematic diagram of the device structure of the hardware operating environment involved in the method for replacing the fast data distribution service protocol under the communication management framework in the embodiment of the present application.
[0052] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0053] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0054] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0055] The main solution of the embodiment of the present application is: first, obtain each service attribute in the header file and source file of the fast data distribution service, determine the corresponding modification strategy according to the service attributes, modify the header file and the source file according to the modification strategy to obtain the target header file and the target source file; obtain the build instruction file, compile the target header file and the source file through the build instruction file to obtain the compiled target shared object file; obtain the dynamic library file of the target data distribution service, and replace the fast data distribution service protocol according to the target shared object file and the dynamic library file.
[0056] Since FastDDS cannot meet specific application requirements in some specific application scenarios, how to meet specific communication service application requirements is a problem that still needs to be solved.
[0057] This application can replace the FastDDS protocol with the required target DDS protocol by modifying the code, compiling and replacing, thereby solving the problem of how to meet specific communication service application requirements.
[0058] Based on this, the embodiment of the present application provides a method for replacing a fast data distribution service protocol under a communication management framework, referring to Figure 1 , Figure 1 This is a flowchart of the first embodiment of the method for replacing the fast data distribution service protocol under the communication management framework of the present application.
[0059] In this embodiment, the fast data distribution service protocol replacement method under the communication management framework includes steps S10 to S30:
[0060] Step S10: acquiring each service attribute in the header file and the source file of the fast data distribution service, determining a corresponding modification strategy according to the service attributes, modifying the header file and the source file according to the modification strategy, and obtaining a target header file and a target source file;
[0061] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a fast data distribution service protocol replacement device under a communication management framework, etc. The following takes the fast data distribution service protocol replacement device under a communication management framework as an example to illustrate this embodiment and the following embodiments.
[0062] It should be noted that header files are files that contain declarations such as function prototypes, macro definitions, structures, and enumerations. They usually have a .h extension and their main purpose is to provide interfaces and declarations so that other source files can use these declarations without knowing the specific implementation details. Source files are files that contain actual implementation code, including the actual implementation of the program, which defines various functions, variables, and data structures. Service attributes refer to configurations and policies related to service quality, which define the behavioral characteristics of DDS communication entities.
[0063] It is understandable that the step of modifying the header file and the source file according to the modification strategy to obtain the target header file and the target source file mainly involves commenting or replacing the FastDDS related codes in the header file and the source file with the required target DDS codes.
[0064] Step S20: obtaining a build instruction file, and compiling the target header file and the source file using the build instruction file to obtain a compiled target shared object file;
[0065] It should be noted that the build instruction file, namely the CMakeLists file, is the core configuration file of the build system. The file defines how to compile and link the source code in the project, as well as how to generate executable files, library files, etc. The target shared object file is the Shared Object file obtained after compilation. The Shared Object file is a form of dynamic link library, which is used to store executable code and data that can be shared between multiple programs. Through the SharedObject file, the system can reduce the storage of duplicate code, optimize resource usage, and allow the program to load specific library files as needed at runtime, thereby improving the flexibility and efficiency of the program.
[0066] In a feasible manner, the step of obtaining a build instruction file, compiling the target header file and the source file by using the build instruction file, and obtaining a compiled target shared object file comprises:
[0067] Obtain a build instruction file, and add a dynamic library path and a header file path of a target data distribution service to the build instruction file;
[0068] Parsing the build instruction file to generate compile commands;
[0069] The target header file and the source file are compiled by the compile command to obtain a compiled target shared object file.
[0070] It should be noted that first, the build instruction file is obtained, and the required DDS dynamic library and header file paths need to be added to the build instruction file. The purpose is that during the compilation process, the compiler needs to know the location of the header files in order to correctly include them, and the linker needs to know the location of the library files in order to correctly link these files.
[0071] It is understandable that the parsing of the build instruction file to generate a compile command first involves converting the build instruction file source code into assembly language or intermediate representation, specifically involving lexical analysis, syntax analysis, semantic analysis, optimization, and code generation, and then converting the generated assembly code into machine code to obtain a compile command. Through the compile command, the target header file and the source file can be compiled to obtain a target shared object file.
[0072] Step S30: Acquire the dynamic library file of the target data distribution service, and replace the fast data distribution service protocol according to the target shared object file and the dynamic library file.
[0073] It should be noted that dynamic library files are a special type of library files that contain code and resources that can be dynamically linked when the program is running. The main feature is that they are loaded during the execution of the program and are usually used to provide shared functions or services, allowing multiple programs to share the same code, thereby saving memory space and disk space. By replacing the original FastDDS file with the target shared object file and dynamic library file, the fast data distribution service protocol is replaced.
[0074] In a feasible manner, the step of obtaining the dynamic library file of the target data distribution service and replacing the fast data distribution service protocol according to the target shared object file and the dynamic library file includes:
[0075] Get the dynamic library file of the target data distribution service file;
[0076] Adding the dynamic library file to a software development kit;
[0077] Replace the shared object file of the fast data distribution service with the target shared object file.
[0078] It is understandable that a software development kit is a Software Development Kit, or SDK for short, which is a set of tools, libraries, documents, code examples or guidance to help developers create software applications. The dynamic library file is added to the software development kit to ensure that the dynamic library file of the DDS that needs to be used can be correctly found and used, while simplifying the deployment and management process and improving the compatibility and portability of the application. The shared object file of the fast data distribution service is replaced with the target shared object file in order to enable the application to subsequently use the required shared object file of the DDS, thereby completing the FastDDS protocol replacement.
[0079] The present application first obtains each service attribute in the header file and source file of the fast data distribution service, determines the corresponding modification strategy according to the service attributes, modifies the header file and the source file according to the modification strategy, and obtains the target header file and the target source file; obtains the build instruction file, compiles the target header file and the source file through the build instruction file, and obtains the compiled target shared object file; obtains the dynamic library file of the target data distribution service, and replaces the fast data distribution service protocol according to the target shared object file and the dynamic library file.
[0080] In summary, this application can replace the FastDDS protocol with the required target DDS protocol by modifying the code, compiling and replacing it, thereby solving the problem of how to meet specific communication service application requirements.
[0081] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 2 , the step S10 includes steps S101 to S105:
[0082] Step S101: annotating the relevant types of the fast data distribution service in the header file;
[0083] It should be noted that annotating the relevant types of FastDDS is the first step to replace the FastDDS protocol with the target DDS, which is used to avoid the old code interfering with the compilation process when the new code is introduced.
[0084] Step S102: modify the code called by the client in the header file;
[0085] It should be noted that the code called by the client in the header file refers to the code for the process called by the client. In a feasible manner, the step of modifying the code called by the client in the header file includes:
[0086] Modify the function interface code of the client fast data distribution service in the header file;
[0087] Modify the resource destruction code of the client fast data distribution service in the header file;
[0088] Modify the processing function code of the client fast data distribution service in the header file.
[0089] It should be noted that the function interface code is the programming interface code for the interaction between the application and the underlying service or library. These interfaces define how the application calls the functions provided by the service. Modify the function interface code of the client FastDDS in the header file, specifically replace the fastDDS function interface with the new DDS function interface in the Topic creation part; replace the fastDDS interface with the new DDS function interface in the creation of the subscription callback function and the creation of the datareader. Among them, Topic is used to define the type and name of the data; DataReader is used to read data from the DDS network. The subscription callback function is the function that is called when new data arrives.
[0090] It is understandable that modifying the resource destruction code of the client fast data distribution service in the header file specifically replaces fastDDS with the new DDS in the destruction-related code of the DataReader and Topic resources. The purpose of this step is to ensure that resources should be properly destroyed when they are no longer needed, so as to release system resources and avoid problems such as memory leaks.
[0091] It is understandable that modifying the processing function code of the client fast data distribution service in the header file specifically includes replacing the code of the processing function for receiving data; and replacing the code of the processing function for the subscription matching function.
[0092] Step S103: modify the code called by the server in the header file;
[0093] It should be noted that the code called by the server in the header file refers to the code of the process called by the server. In a feasible manner, the step of modifying the code called by the server in the header file includes:
[0094] Modify the function interface code of the fast data distribution service in the server in the header file;
[0095] Modify the resource destruction code of the fast data distribution service in the server in the header file;
[0096] Modify the data sending function code of the fast data distribution service in the server in the header file.
[0097] It is understandable that modifying the function interface code of the fast data distribution service in the server in the header file specifically includes replacing the fastDDS function interface code in the Topic and writer creation and destruction parts with the new DDS function interface code; wherein the writer creation part refers to creating one or more entities for publishing data in the DDS application. The writer destruction part is the process of deleting or releasing all resources associated with the writer. Modifying the function interface code of the fast data distribution service in the server in the header file specifically includes replacing the data sending function.
[0098] It should be noted that the main function of the data sending function is to transmit data from the publisher to all subscribers who have subscribed to the corresponding topic.
[0099] Step S104: modifying the function declaration code of the service search function in the header file;
[0100] It should be noted that the service lookup function allows a component (client) in the system to discover and execute or interact with the functions of other components (service providers).
[0101] Step S105: Modify the code of the fast data distribution service in the source file.
[0102] It should be noted that the source file of FastDDS contains the code that defines the communication protocol and mechanism, and this part of the code also needs to be replaced with the code of the target DDS. In a feasible manner, the step of modifying the code of the fast data distribution service in the source file includes:
[0103] Annotate the service quality configuration management code of the fast data distribution service in the source file;
[0104] Modify the creation and callback function codes of the fast data distribution service in the source file;
[0105] Modify the resource destruction code of the fast data distribution service in the source file;
[0106] Modify the code in the source file used by the fast data distribution service to set, judge and delete user data.
[0107] It should be noted that the service quality configuration management is used to ensure the reliability and real-time performance of data transmission, and the service quality configuration management code of the fast data distribution service in the source file is annotated to avoid conflicts with the configuration management of the new DDS.
[0108] The present application first annotates the relevant types of the fast data distribution service in the header file; and modifies the code called by the client in the header file; modifies the code called by the server in the header file; modifies the function declaration code of the service search function in the header file; and modifies the code of the fast data distribution service in the source file.
[0109] In summary, this application completes the replacement of the FastDDS protocol by annotating part of the FastDDS code in the header file and source file and replacing part of the FastDDS code with the new DDS code, thereby solving the problem of how to meet specific communication service application requirements.
[0110] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the method for replacing the fast data distribution service protocol under the communication management framework of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0111] This application also provides a fast data distribution service protocol replacement device under the communication management framework, please refer to Figure 3 , the fast data distribution service protocol replacement device under the communication management framework includes:
[0112] A modification module 10 is used to obtain each service attribute in the header file and the source file of the fast data distribution service, determine a corresponding modification strategy according to the service attribute, and modify the header file and the source file according to the modification strategy to obtain a target header file and a target source file;
[0113] The compiling module 20 is used to obtain a build instruction file, and compile the target header file and the source file according to the build instruction file to obtain a compiled target shared object file.
[0114] The replacement module 30 is used to obtain the dynamic library file of the target data distribution service, and replace the fast data distribution service protocol according to the target shared object file and the dynamic library file.
[0115] The present application first obtains each service attribute in the header file and source file of the fast data distribution service, determines the corresponding modification strategy according to the service attributes, modifies the header file and the source file according to the modification strategy, and obtains the target header file and the target source file; obtains the build instruction file, compiles the target header file and the source file through the build instruction file, and obtains the compiled target shared object file; obtains the dynamic library file of the target data distribution service, and replaces the fast data distribution service protocol according to the target shared object file and the dynamic library file.
[0116] In summary, this application can replace the FastDDS protocol with the required target DDS protocol by modifying the code, compiling and replacing it, thereby solving the problem of how to meet specific communication service application requirements.
[0117] In one embodiment, the modification module 10 is also used to annotate the relevant types of the fast data distribution service in the header file; modify the code called by the client in the header file; modify the code called by the server in the header file; modify the function declaration code of the service search function in the header file; and modify the code of the fast data distribution service in the source file.
[0118] In one embodiment, the modification module 10 is also used to modify the function interface code of the client rapid data distribution service in the header file; modify the resource destruction code of the client rapid data distribution service in the header file; and modify the processing function code of the client rapid data distribution service in the header file.
[0119] In one embodiment, the modification module 10 is also used to modify the function interface code of the fast data distribution service in the server end in the header file; modify the resource destruction code of the fast data distribution service in the server end in the header file; and modify the data sending function code of the fast data distribution service in the server end in the header file.
[0120] In one embodiment, the modification module 10 is also used to annotate the service quality configuration management code of the fast data distribution service in the source file; modify the creation and callback function code of the fast data distribution service in the source file; modify the resource destruction code of the fast data distribution service in the source file; and modify the code of the fast data distribution service in the source file for setting, judging and deleting user data.
[0121] In one embodiment, the compilation module 20 is also used to obtain a build instruction file, add a dynamic library path and a header file path of a target data distribution service to the build instruction file; parse the build instruction file to generate a compilation command; and compile the target header file and the source file through the compilation command to obtain a compiled target shared object file.
[0122] In one embodiment, the replacement module 30 is further used to obtain a dynamic library file of a target data distribution service file; add the dynamic library file to a software development kit; and replace a shared object file of a rapid data distribution service with a target shared object file.
[0123] The fast data distribution service protocol replacement device under the communication management framework provided by the present application adopts the fast data distribution service protocol replacement method under the communication management framework in the above-mentioned embodiment, which can solve the technical problem of how to meet the specific communication service application requirements. Compared with the prior art, the beneficial effects of the fast data distribution service protocol replacement device under the communication management framework provided by the present application are the same as the beneficial effects of the fast data distribution service protocol replacement method under the communication management framework provided by the above-mentioned embodiment, and the other technical features of the fast data distribution service protocol replacement device under the communication management framework are the same as the features disclosed in the above-mentioned embodiment method, which will not be repeated here.
[0124] The present application provides a fast data distribution service protocol replacement device under a communication management framework, and the fast data distribution service protocol replacement device under the communication management framework includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the fast data distribution service protocol replacement method under the communication management framework in the above-mentioned embodiment one.
[0125] Reference below Figure 4 , which shows a schematic diagram of the structure of a fast data distribution service protocol replacement device under the communication management framework suitable for implementing the embodiment of the present application. The fast data distribution service protocol replacement device under the communication management framework in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4The fast data distribution service protocol replacement device under the communication management framework shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0126] like Figure 4 As shown, the fast data distribution service protocol replacement device under the communication management framework may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM: Read Only Memory) 1002 or the program loaded from the storage device 1003 to the random access memory (RAM: Random Access Memory) 1004. Various programs and data required for the operation of the fast data distribution service protocol replacement device under the communication management framework are also stored in RAM1004. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. The input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The communication device 1009 can allow the fast data distribution service protocol replacement device under the communication management framework to communicate wirelessly or wired with other devices to exchange data. Although the figure shows a fast data distribution service protocol replacement device under the communication management framework with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have instead.
[0127] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0128] The fast data distribution service protocol replacement device under the communication management framework provided by the present application adopts the fast data distribution service protocol replacement method under the communication management framework in the above-mentioned embodiment, which can solve the technical problem of how to meet the specific communication service application requirements. Compared with the prior art, the beneficial effects of the fast data distribution service protocol replacement device under the communication management framework provided by the present application are the same as the beneficial effects of the fast data distribution service protocol replacement method under the communication management framework provided by the above-mentioned embodiment, and the other technical features of the fast data distribution service protocol replacement device under the communication management framework are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0129] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0130] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0131] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the fast data distribution service protocol replacement method under the communication management framework in the above-mentioned embodiment.
[0132] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0133] The above-mentioned computer-readable storage medium may be included in the fast data distribution service protocol replacement device under the communication management framework; or it may exist independently without being assembled into the fast data distribution service protocol replacement device under the communication management framework.
[0134] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the fast data distribution service protocol replacement device under the communication management framework, the fast data distribution service protocol replacement device under the communication management framework: obtains each service attribute in the header file and source file of the fast data distribution service, determines the corresponding modification strategy according to the service attribute, modifies the header file and the source file according to the modification strategy to obtain the target header file and the target source file; obtains the build instruction file, compiles the target header file and the source file through the build instruction file, and obtains the compiled target shared object file; obtains the dynamic library file of the target data distribution service, and replaces the fast data distribution service protocol according to the target shared object file and the dynamic library file.
[0135] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0136] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0137] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0138] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the method for replacing the fast data distribution service protocol under the above-mentioned communication management framework, and can solve the technical problem of how to meet specific communication service application requirements. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the method for replacing the fast data distribution service protocol under the communication management framework provided by the above-mentioned embodiment, and will not be repeated here.
[0139] The present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the method for replacing a fast data distribution service protocol under the communication management framework as described above.
[0140] The computer program product provided by this application can solve the technical problem of how to meet the specific communication service application requirements. Compared with the prior art, the beneficial effects of the computer program product provided by this application are the same as the beneficial effects of the fast data distribution service protocol replacement method under the communication management framework provided in the above embodiment, which will not be repeated here.
[0141] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A method for replacing a fast data distribution service protocol under a communication management framework, characterized in that: The method includes: Acquire each service attribute in the header file and the source file of the fast data distribution service, determine a corresponding modification strategy according to the service attribute, modify the header file and the source file according to the modification strategy, and obtain a target header file and a target source file; Obtaining a build instruction file, and compiling the target header file and the source file using the build instruction file to obtain a compiled target shared object file; A dynamic library file of a target data distribution service is obtained, and a fast data distribution service protocol is replaced according to the target shared object file and the dynamic library file.
2. The method according to claim 1, characterized in that The step of modifying the header file and the source file according to the modification strategy comprises: Annotate the relevant types of the fast data distribution service in the header file; Modify the code called by the client in the header file; Modify the code called by the server in the header file; Modify the function declaration code of the service search function in the header file; Modify the code of the fast data distribution service in the source file.
3. The method according to claim 2, characterized in that The step of modifying the code called by the client in the header file includes: Modify the function interface code of the client fast data distribution service in the header file; Modify the resource destruction code of the client fast data distribution service in the header file; Modify the processing function code of the client fast data distribution service in the header file.
4. The method according to claim 2, characterized in that The step of modifying the code called by the server in the header file includes: Modify the function interface code of the fast data distribution service in the server in the header file; Modify the resource destruction code of the fast data distribution service in the server in the header file; Modify the data sending function code of the fast data distribution service in the server in the header file.
5. The method according to claim 2, characterized in that The step of modifying the code of the fast data distribution service in the source file comprises: Annotate the service quality configuration management code of the fast data distribution service in the source file; Modify the creation and callback function codes of the fast data distribution service in the source file; Modify the resource destruction code of the fast data distribution service in the source file; Modify the code in the source file used by the fast data distribution service to set, judge and delete user data.
6. The method according to claim 1, characterized in that The step of obtaining a build instruction file, and compiling the target header file and the source file by using the build instruction file to obtain a compiled target shared object file comprises: Obtain a build instruction file, and add a dynamic library path and a header file path of a target data distribution service to the build instruction file; Parsing the build instruction file to generate compile commands; The target header file and the source file are compiled by the compile command to obtain a compiled target shared object file.
7. The method according to claim 1, characterized in that The step of obtaining a dynamic library file of a target data distribution service and replacing a fast data distribution service protocol according to the target shared object file and the dynamic library file comprises: Get the dynamic library file of the target data distribution service file; Adding the dynamic library file to a software development kit; Replace the shared object file of the fast data distribution service with the target shared object file.
8. A fast data distribution service protocol replacement device under a communication management framework, characterized in that: The device comprises: A modification module, used for obtaining each service attribute in the header file and the source file of the fast data distribution service, determining a corresponding modification strategy according to the service attribute, and modifying the header file and the source file according to the modification strategy to obtain a target header file and a target source file; A compiling module, used for obtaining a build instruction file, and compiling the target header file and the source file through the build instruction file to obtain a compiled target shared object file; The replacement module is used to obtain the dynamic library file of the target data distribution service, and replace the fast data distribution service protocol according to the target shared object file and the dynamic library file.
9. A fast data distribution service protocol replacement device under a communication management framework, characterized in that: The device comprises: a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of a fast data distribution service protocol replacement method under a communication management framework as described in any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the fast data distribution service protocol replacement method under the communication management framework according to any one of claims 1 to 7 are implemented.