A data processing method and device, electronic equipment and storage medium
By using common plugins to process commands in multi-vendor networks and distinguishing between common and differentiated logic, the problems of data bloat and high complexity are solved, and simplified networking and accurate control are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- RUIJIE NETWORKS CO LTD
- Filing Date
- 2022-12-28
- Publication Date
- 2026-05-15
AI Technical Summary
When multiple vendors are networked, the data becomes bloated and complex, maintenance costs are high, and the addition of new vendors can easily affect the quality of existing functions.
By calling a common plugin to process the received instructions, they are divided into common and differentiated processing. Only the differentiated logic is modified, reducing the complexity of network topology.
It simplifies the complexity and development difficulty of multi-vendor networking, and ensures the accuracy and flexibility of data processing.
Smart Images

Figure CN118295724B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a data processing method, apparatus, electronic device, and storage medium. Background Technology
[0002] In related technologies, when multiple vendors are networked, each vendor maintains its own independent data set, making it impossible to handle cross-vendor business. This leads to bloated data, high complexity, and high maintenance costs. If a new vendor wants to join the network, the overall orchestration logic of the network needs to be modified, which will affect the existing released functions and easily cause quality risks. Summary of the Invention
[0003] The purpose of this application is to provide a data processing method, apparatus, electronic device, and storage medium to reduce the complexity and development difficulty of networking among multiple vendors.
[0004] In a first aspect, embodiments of this application provide a data processing method applied to a terminal device, the method comprising:
[0005] The received first-level instruction is processed by a common plugin to obtain a second-level instruction; the first-level instruction is used to instruct the receiving terminal to execute the command.
[0006] If the first-level instruction is a common processing instruction, then the second-level instruction is sent to the receiving terminal;
[0007] If the first-level instruction is a common processing and differentiated processing instruction, then the corresponding plugin of the receiving terminal is invoked to process the second-level instruction to obtain the third-level instruction, and the third-level instruction is sent to the receiving terminal.
[0008] In this application, the common code processing logic of different receiving terminals is used as a common part for common processing. If the processing logic of a certain receiving terminal needs to be modified later, there is no need to modify the business logic of the common part. Only the business logic of the differentiated part of the receiving terminal needs to be modified, which reduces the complexity and development difficulty of networking multiple receiving terminals.
[0009] In some possible embodiments, before the method calls the common plugin to process the received first-level instructions to obtain second-level instructions, the method further includes:
[0010] Parse the first-level instruction to obtain the Uniform Resource Identifier (URI) corresponding to the first-level instruction;
[0011] The URI of the first-level instruction determines whether the first-level instruction is a common processing instruction or a common processing and differentiated processing instruction.
[0012] In this application, the processing method of the first-level instruction is determined by the URI in the first-level instruction, and the first-level instruction is processed by the corresponding processing method, so that the processing of the first-level instruction is more accurate.
[0013] In some possible embodiments, before the public plugin is invoked to process the received first-level instructions, the method further includes:
[0014] Retrieve the plugin corresponding to the pre-stored template device from the memory, and use the plugin of the template device as a common plugin, wherein the template device is a device that has common characteristics with multiple receiving devices.
[0015] In this application, by pre-storing the plugins corresponding to the template devices, the method of common processing of first-level instructions is made more convenient.
[0016] In some possible embodiments, the invocation of the common plugin processes the received first-level instructions to obtain second-level instructions, including:
[0017] The common plugin is invoked to process the first-level instruction based on the second-level instruction processing logic to obtain the second-level instruction;
[0018] The secondary instruction processing logic is obtained according to the following method:
[0019] The execution order of the code for processing first-level instructions is retrieved from memory, as well as the inherent logic of the code for processing the first-level instructions in the terminal device;
[0020] The execution order of the code that processes the first-level instructions and the inherent logic of the code that processes the first-level instructions are used as the second-level instruction processing logic.
[0021] In this application, first-level instructions are processed according to the execution order of the code and the inherent logic of the code, which ensures the accuracy of the processing of first-level instructions.
[0022] In some possible embodiments, after sending the secondary instruction to the receiving terminal, the method further includes:
[0023] If the execution result sent by the receiving terminal is received within the preset time period, it is determined that the control of the receiving terminal is successful.
[0024] If no execution result is received from the receiving terminal within the preset time period, it is determined that the control of the receiving terminal has failed.
[0025] In this application, by determining whether the execution result sent by the receiving device has been received, it is ensured that the control status of the receiving terminal can be understood in a timely manner.
[0026] In some possible embodiments, the step of calling the plugin corresponding to the receiving terminal to process the secondary instruction to obtain the tertiary instruction includes:
[0027] Retrieve the plugin corresponding to the receiving terminal from the memory, and use the plugin of the receiving device as a differentiated processing plugin;
[0028] The differential processing plugin is used to perform differential processing on the secondary instruction based on the three-level instruction processing logic to obtain the tertiary instruction; the secondary instruction is used to obtain the tertiary instruction that the receiving terminal can process.
[0029] The three-level instruction processing logic is obtained according to the following method:
[0030] The execution order of the code for processing secondary instructions by the receiving terminal and the inherent logic of the code for processing the secondary instructions by the receiving terminal are obtained from the memory.
[0031] The execution order of the code that processes the second-level instructions and the inherent logic of the code that processes the second-level instructions are used as the third-level instruction processing logic.
[0032] In this application, the accuracy of processing secondary instructions is ensured by processing them according to the execution order and inherent logic of the code.
[0033] In some possible embodiments, after sending the level-three instruction to the receiving terminal, the method further includes:
[0034] If the execution result sent by the receiving terminal is received within the preset time period, it is determined that the control of the receiving terminal is successful.
[0035] If no execution result is received from the receiving terminal within the preset time period, it is determined that the control of the receiving terminal has failed.
[0036] In this application, by determining whether the execution result sent by the receiving device has been received, it is ensured that the control status of the receiving terminal can be understood in a timely manner.
[0037] Secondly, this application also provides a data processing apparatus for use in a terminal device, the apparatus comprising:
[0038] The first-level instruction processing module is used to call the common plug-in to process the received first-level instructions and obtain second-level instructions; the first-level instructions are used to instruct the receiving terminal to execute the command.
[0039] A secondary instruction sending module is used to send the secondary instruction to the receiving terminal if the primary instruction is a common processing instruction;
[0040] The three-level instruction sending module is used to call the corresponding plug-in of the receiving terminal to process the second-level instruction if the first-level instruction is a common processing and differentiated processing instruction, so as to obtain the third-level instruction and send the third-level instruction to the receiving terminal.
[0041] In some possible embodiments, before the first-level instruction processing module executes a call to a common plugin to process the received first-level instruction and obtain the second-level instruction, it is further used for:
[0042] Parse the first-level instruction to obtain the Uniform Resource Identifier (URI) corresponding to the first-level instruction;
[0043] The URI of the first-level instruction determines whether the first-level instruction is a common processing instruction or a common processing and differentiated processing instruction.
[0044] In some possible embodiments, before the first-level instruction processing module executes the call to the common plugin to process the received first-level instruction, it is further configured to:
[0045] Retrieve the plugin corresponding to the pre-stored template device from the memory, and use the plugin of the template device as a common plugin, wherein the template device is a device that has common characteristics with multiple receiving devices.
[0046] In some possible embodiments, when the first-level instruction processing module executes a call to a common plugin to process the received first-level instruction and obtain a second-level instruction, it is specifically used for:
[0047] The common plugin is invoked to process the first-level instruction based on the second-level instruction processing logic to obtain the second-level instruction;
[0048] The secondary instruction processing logic is obtained according to the following method:
[0049] The execution order of the code for processing first-level instructions is retrieved from memory, as well as the inherent logic of the code for processing the first-level instructions in the terminal device;
[0050] The execution order of the code that processes the first-level instructions and the inherent logic of the code that processes the first-level instructions are used as the second-level instruction processing logic.
[0051] In some possible embodiments, after the secondary instruction sending module sends the secondary instruction to the receiving terminal, it is further configured to:
[0052] If the execution result sent by the receiving terminal is received within the preset time period, it is determined that the control of the receiving terminal is successful.
[0053] If no execution result is received from the receiving terminal within the preset time period, it is determined that the control of the receiving terminal has failed.
[0054] In some possible embodiments, when the third-level instruction sending module executes the call to the plugin corresponding to the receiving terminal to process the second-level instruction and obtain the third-level instruction, it is specifically used for:
[0055] Retrieve the plugin corresponding to the receiving terminal from the memory, and use the plugin of the receiving device as a differentiated processing plugin;
[0056] The differential processing plugin is used to perform differential processing on the secondary instruction based on the three-level instruction processing logic to obtain the tertiary instruction; the secondary instruction is used to obtain the tertiary instruction that the receiving terminal can process.
[0057] The three-level instruction processing logic is obtained according to the following method:
[0058] The execution order of the code for processing secondary instructions by the receiving terminal and the inherent logic of the code for processing the secondary instructions by the receiving terminal are obtained from the memory.
[0059] The execution order of the code that processes the second-level instructions and the inherent logic of the code that processes the second-level instructions are used as the third-level instruction processing logic.
[0060] In some possible embodiments, after the level-three instruction sending module sends the level-three instruction to the receiving terminal, it is further configured to:
[0061] If the execution result sent by the receiving terminal is received within the preset time period, it is determined that the control of the receiving terminal is successful.
[0062] If no execution result is received from the receiving terminal within the preset time period, it is determined that the control of the receiving terminal has failed.
[0063] Thirdly, another embodiment of this application also provides an electronic device, including 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, the instructions being executed by the at least one processor to enable the at least one processor to perform any of the methods provided in the first aspect embodiment of this application.
[0064] Fourthly, another embodiment of this application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for causing a computer to perform any of the methods provided in the first aspect of this application.
[0065] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description
[0066] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0067] Figure 1 This is a schematic diagram illustrating an application scenario of a data processing method provided in the embodiments of this application;
[0068] Figure 2 This is a schematic diagram of the overall process of a data processing method provided in the embodiments of this application;
[0069] Figure 3 This is a flowchart illustrating the processing method for determining a first-level instruction in a data processing method provided in this application embodiment;
[0070] Figure 4 This is a flowchart illustrating the determination of secondary instruction processing logic in a data processing method provided in this application embodiment;
[0071] Figure 5 This is a flowchart illustrating the process of determining the processing status of a first-level instruction in a data processing method provided in this application embodiment;
[0072] Figure 6 This is a flowchart illustrating the determination of three-level instructions for a data processing method provided in this application embodiment;
[0073] Figure 7A This is a flowchart illustrating the determination of the three-level instruction processing logic in a data processing method provided in this application embodiment;
[0074] Figure 7B This is a schematic diagram illustrating the user-terminal device interaction process of a data processing method provided in this application embodiment;
[0075] Figure 8This is a schematic diagram of an apparatus for a data processing method provided in an embodiment of this application;
[0076] Figure 9 This is a schematic diagram of an electronic device for a data processing method provided in an embodiment of this application. Detailed Implementation
[0077] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. Unless otherwise specified, the embodiments and features in the embodiments of this application can be arbitrarily combined with each other. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here.
[0078] The terms "first" and "second" in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the term "comprising" and any variations thereof are intended to cover non-exclusive protection. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses. The term "multiple" in this application can mean at least two, for example, two, three, or more, and is not limited by the embodiments of this application.
[0079] The data collection, dissemination, and use in this application all comply with relevant national laws and regulations.
[0080] The inventors discovered that in related technologies, when multiple vendors are networked, each vendor maintains its own data independently, making it impossible to handle cross-vendor business. This leads to bloated data, high complexity, and high maintenance costs. If a new vendor wants to join the network, the overall orchestration logic of the network needs to be modified, which will affect the existing released functions and easily cause quality risks.
[0081] In view of this, this application proposes a data processing method, apparatus, electronic device, and storage medium to solve the above-mentioned problems. The inventive concept of this application can be summarized as follows: a common plug-in is invoked to process the received first-level instruction to obtain a second-level instruction; the first-level instruction is used to instruct the receiving terminal to execute the command; if the first-level instruction is a common processing instruction, the second-level instruction is sent to the receiving terminal; if the first-level instruction is a common processing and differentiated processing instruction, the corresponding plug-in of the receiving terminal is invoked to process the second-level instruction to obtain a third-level instruction, and the third-level instruction is sent to the receiving terminal.
[0082] To facilitate understanding of the data processing method provided in this application, a detailed description is given below in conjunction with the accompanying drawings:
[0083] like Figure 1 The diagram shown illustrates an application scenario of a data processing method according to an embodiment of this application. The diagram includes: a terminal device 10, a memory 20, and a receiving terminal 30; wherein:
[0084] Terminal device 10 calls a common plugin to process the received first-level instruction to obtain a second-level instruction; the first-level instruction is used to indicate the command to be executed by the receiving terminal; the common plugin is stored in memory 20; if the first-level instruction is a common processing instruction, the second-level instruction is sent to the receiving terminal 30; if the first-level instruction is a common processing and differentiated processing instruction, the corresponding plugin of the receiving terminal 30 is called to process the second-level instruction to obtain a third-level instruction, and the third-level instruction is sent to the receiving terminal 30.
[0085] The description in this application focuses only on a single terminal device 10, memory 20, and receiving terminal 30. However, those skilled in the art should understand that the illustrated terminal device 10, memory 20, and receiving terminal 30 are intended to illustrate the operation of the terminal device 10, memory 20, and receiving terminal 30 involved in the technical solutions of this application, and do not imply any limitation on the number, type, or location of the terminal device 10, memory 20, and receiving terminal 30. It should be noted that adding additional modules to or removing individual modules from the illustrated environment will not change the underlying concept of the exemplary embodiments of this application. Furthermore, those skilled in the art will understand that the aforementioned data transmission and reception also need to be implemented through a network.
[0086] It should be noted that the memory in the embodiments of this application can be, for example, a cache system, hard disk storage, memory storage, etc. Furthermore, the data processing method proposed in this application is not only applicable to… Figure 1 The application scenarios shown are also applicable to any device with data processing needs.
[0087] To facilitate understanding of the data processing method provided in this application embodiment, the overall flow of the data processing method provided in this application embodiment is described below using a terminal device as the execution subject, such as... Figure 2 As shown, where:
[0088] In step 201: the common plugin is called to process the received first-level instruction to obtain the second-level instruction;
[0089] Among them, the first-level instruction is used to instruct the receiving terminal to execute the command;
[0090] In step 202: If the first-level instruction is a common processing instruction, then the second-level instruction is sent to the receiving terminal;
[0091] In step 203: If the first-level instruction is a common processing and differentiated processing instruction, then the corresponding plug-in of the receiving terminal is called to process the second-level instruction to obtain the third-level instruction, and the third-level instruction is sent to the receiving terminal.
[0092] In this application, the common code processing logic of different receiving terminals is used as a common part for common processing. If the processing logic of a certain receiving terminal needs to be modified later, there is no need to modify the business logic of the common part. Only the business logic of the differentiated part of the receiving terminal needs to be modified, which reduces the complexity and development difficulty of networking multiple receiving terminals.
[0093] To facilitate a further understanding of the data processing method provided in the embodiments of this application, the following will describe... Figure 2 The steps in the process are explained separately:
[0094] In some possible embodiments, in order to facilitate accurate determination of the processing method of the first-level instruction, after receiving the first-level instruction, it is first necessary to execute, as follows: Figure 3 The steps shown are as follows:
[0095] In step 301: Parse the first-level directive to obtain the URI corresponding to the first-level directive;
[0096] In step 302: Determine whether the first-level instruction is a common processing instruction or a common processing and differentiated processing instruction based on the URI of the first-level instruction.
[0097] In this application, a URI is a string used to identify the name of an Internet resource. This identifier allows users to interact with any resource (including local and Internet resources) through a specific protocol. Therefore, in this application, the processing method for first-level instructions is determined by identifying the URI, and the first-level instructions are processed according to the corresponding processing method, making the processing of first-level instructions more accurate.
[0098] In this embodiment of the application, before calling the common plugin to process the received first-level instruction, it is first necessary to determine the common plugin. In this application, this can be specifically implemented as follows: retrieve the plugin corresponding to the template device that is pre-stored in the memory, and use the plugin of the template device as the common plugin. The template device is a device that has common characteristics with multiple receiving devices.
[0099] For example, if technicians compare the instruction processing flow of multiple receiving terminals and determine that steps 1, 2, and 3 in each receiving terminal are the same as the instruction processing flow of device 1, then device 1 is used as a template device, and the plugins that execute steps 1, 2, and 3 in the template device are used as common plugins.
[0100] In some possible embodiments, after obtaining the common plugin, when the common plugin is called to process the received first-level instructions to obtain second-level instructions, the specific implementation can be as follows: the common plugin is called to process the first-level instructions based on the second-level instruction processing logic to obtain the second-level instructions; wherein the second-level instruction processing logic is based on, for example... Figure 4 The steps shown yielded the following:
[0101] In step 401: the execution order of the code for processing first-level instructions is obtained from memory, as well as the inherent logic of the code for processing first-level instructions in the terminal device;
[0102] In step 402: The execution order of the code and the inherent logic of the code are treated as secondary instruction processing logic.
[0103] For example, if the execution order of the code for executing a level 1 instruction by a terminal device is to execute step 1 first, then step 2, and finally step 3, and the inherent logic of the code for executing a level 1 instruction is inherent logic 1, then when the terminal device calls a common plugin to process a level 1 instruction, it processes the level 1 instruction according to step 1, step 2, step 3, and inherent logic 1.
[0104] In some other possible embodiments, in order to further make the process of calling common plugins to process first-level instructions more universal, the application may obtain only a portion of the execution order as the execution order of processing first-level instructions when obtaining the execution order of the code that processes first-level instructions on the terminal device.
[0105] For example, if the execution order of the code for executing a level 1 instruction on a terminal device is to execute step 1 first, then step 2, and finally step 3, and the inherent logic of the code for executing a level 1 instruction is inherent logic 1, then when the terminal device calls a common plugin to process a level 1 instruction, it can process the level 1 instruction based solely on step 1, step 2, and inherent logic 1.
[0106] If the processing of the first-level instruction is completed, and a second-level instruction is obtained and determined to be an instruction to be sent to the receiving terminal, then the second-level instruction is sent to the receiving terminal. In this application, to ensure timely understanding of the control status of the receiving terminal, after sending the second-level instruction to the receiving terminal, the following steps need to be executed: Figure 5 The steps shown are as follows:
[0107] In step 501: Determine whether the execution result sent by the receiving terminal is received within the preset time period. If it is received, proceed to step 502; otherwise, proceed to step 503.
[0108] In step 502: Confirm successful control of the receiving terminal;
[0109] In step 503: It is determined that control of the receiving terminal has failed.
[0110] In this application, by determining whether the execution result sent by the receiving device has been received, it is ensured that the control status of the receiving terminal can be understood in a timely manner.
[0111] After receiving the secondary instruction, if it is determined that the secondary instruction is of the type used to obtain a tertiary instruction that the receiving terminal can receive, then it is necessary to call the corresponding plugin of the receiving terminal to process the secondary instruction to obtain the tertiary instruction. Specifically, this can be implemented as follows: Figure 6 The steps shown are as follows:
[0112] In step 601: retrieve the plugin corresponding to the receiving terminal from the memory, and use the plugin of the receiving terminal as the differentiation processing plugin;
[0113] In step 602: The differential processing plugin is used to perform differential processing on the second-level instructions based on the third-level instruction processing logic to obtain the third-level instructions.
[0114] The three-level instruction processing logic can be adopted as follows: Figure 7A The method shown is used to obtain:
[0115] In step 701: the execution order of the code for processing secondary instructions by the receiving terminal and the inherent logic of the code for processing secondary instructions by the receiving terminal are obtained from the memory;
[0116] In step 702: The execution order of the code that processes the second-level instructions and the inherent logic of the code that processes the second-level instructions are used as the third-level instruction processing logic.
[0117] For example, if the execution order of the code for executing a secondary instruction by the receiving device is to execute step 1 first, then step 2, and finally step 3, and the inherent logic of the code for executing the secondary instruction is inherent logic 2, then when the terminal device calls the plug-in of the receiving device to process the secondary instruction, it processes the secondary instruction according to step 1, step 2, step 3 and inherent logic 1.
[0118] In this application, the accuracy of processing secondary instructions is ensured by processing them according to the execution order and inherent logic of the code.
[0119] The following describes the implementation process of the data processing method provided in the embodiments of this application:
[0120] like Figure 7B As shown, the interaction flow between the user and the terminal device is as follows:
[0121] In step 711: The user creates network resources and determines the template device based on the processing of instructions by multiple receiving terminals;
[0122] In step 712: The user uses the template device's plugin as a common plugin and stores the common plugin in the memory;
[0123] In step 713: The user stores the execution order of the code that processes the first-level instructions, as well as the inherent logic of the code that processes the first-level instructions, into memory;
[0124] In step 714: The terminal device retrieves a common plugin from the memory to process the received first-level instruction and obtain the second-level instruction;
[0125] In step 715: The terminal device calls the corresponding plugin of the receiving terminal to process the secondary instruction, obtain the tertiary instruction, and sends the tertiary instruction to the receiving terminal (it should be noted that the receiving terminal...). Figure 7B (not shown in the image);
[0126] In step 716: If the user determines that there is a new access device, the plugin corresponding to the new access device is stored in the memory.
[0127] In some possible embodiments, such as Figure 7B The users shown can be maintenance personnel and developers who maintain networks and equipment, and multiple receiving terminals ( Figure 7B(Not shown in the image) represent multiple different manufacturers; when processing instructions, technicians use the pre-selected template device and the differentiated plug-ins corresponding to each receiving terminal as a common orchestration part, which is uniformly managed by the terminal device, that is, the terminal device acts as a common orchestration server to process instructions; the common orchestration part includes two parts: common processing and differentiated processing. The common processing part is performed by the terminal device calling the plug-ins of the template device, and the differentiated processing part is performed by the terminal device calling the plug-ins corresponding to each receiving terminal. In this application, the specific category of receiving terminal is not limited.
[0128] In this embodiment of the application, after sending the level 3 instruction to the receiving terminal, in order to facilitate understanding of the control status of the receiving terminal, it is also necessary to implement the following: Figure 5 The steps shown will not be repeated here.
[0129] like Figure 8 As shown, based on the same inventive concept, a data processing device 800 is proposed, the device comprising:
[0130] The first-level instruction processing module 8001 is used to call the common plug-in to process the received first-level instructions and obtain second-level instructions; the first-level instructions are used to instruct the receiving terminal to execute the command.
[0131] The secondary instruction sending module 8002 is used to send the secondary instruction to the receiving terminal if the primary instruction is a common processing instruction;
[0132] The third-level instruction sending module 8003 is used to call the corresponding plug-in of the receiving terminal to process the second-level instruction if the first-level instruction is a common processing and differentiated processing instruction, so as to obtain the third-level instruction and send the third-level instruction to the receiving terminal.
[0133] In some possible embodiments, before the first-level instruction processing module 8001 executes the call to a common plugin to process the received first-level instruction and obtain the second-level instruction, it is further used for:
[0134] Parse the first-level instruction to obtain the Uniform Resource Identifier (URI) corresponding to the first-level instruction;
[0135] The URI of the first-level instruction determines whether the first-level instruction is a common processing instruction or a common processing and differentiated processing instruction.
[0136] In some possible embodiments, before the first-level instruction processing module 8001 executes the call to the common plugin to process the received first-level instruction, it is further configured to:
[0137] Retrieve the plugin corresponding to the pre-stored template device from the memory, and use the plugin of the template device as a common plugin, wherein the template device is a device that has common characteristics with multiple receiving devices.
[0138] In some possible embodiments, when the first-level instruction processing module 8001 executes the call to a common plugin to process the received first-level instruction and obtains a second-level instruction, it is specifically used for:
[0139] The common plugin is invoked to process the first-level instruction based on the second-level instruction processing logic to obtain the second-level instruction;
[0140] The secondary instruction processing logic is obtained according to the following method:
[0141] The execution order of the code for processing first-level instructions is retrieved from memory, as well as the inherent logic of the code for processing the first-level instructions in the terminal device;
[0142] The execution order of the code that processes the first-level instructions and the inherent logic of the code that processes the first-level instructions are used as the second-level instruction processing logic.
[0143] In some possible embodiments, after the secondary instruction sending module 8002 sends the secondary instruction to the receiving terminal, it is further configured to:
[0144] If the execution result sent by the receiving terminal is received within the preset time period, it is determined that the control of the receiving terminal is successful.
[0145] If no execution result is received from the receiving terminal within the preset time period, it is determined that the control of the receiving terminal has failed.
[0146] In some possible embodiments, when the third-level instruction sending module 8003 executes the call to the plug-in corresponding to the receiving terminal to process the second-level instruction and obtain the third-level instruction, it is specifically used for:
[0147] Retrieve the plugin corresponding to the receiving terminal from the memory, and use the plugin of the receiving device as a differentiated processing plugin;
[0148] The differential processing plugin is used to perform differential processing on the secondary instruction based on the three-level instruction processing logic to obtain the tertiary instruction; the secondary instruction is used to obtain the tertiary instruction that the receiving terminal can process.
[0149] The three-level instruction processing logic is obtained according to the following method:
[0150] The execution order of the code for processing secondary instructions by the receiving terminal and the inherent logic of the code for processing the secondary instructions by the receiving terminal are obtained from the memory.
[0151] The execution order of the code that processes the second-level instructions and the inherent logic of the code that processes the second-level instructions are used as the third-level instruction processing logic.
[0152] In some possible embodiments, after the level 3 instruction sending module 8003 sends the level 3 instruction to the receiving terminal, it is further configured to:
[0153] If the execution result sent by the receiving terminal is received within the preset time period, it is determined that the control of the receiving terminal is successful.
[0154] If no execution result is received from the receiving terminal within the preset time period, it is determined that the control of the receiving terminal has failed.
[0155] After introducing the data processing method and apparatus according to exemplary embodiments of this application, an electronic device according to another exemplary embodiment of this application will be described next.
[0156] Those skilled in the art will understand that various aspects of this application can be implemented as a system, method, or program product. Therefore, various aspects of this application can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, collectively referred to herein as a "circuit," "module," or "system."
[0157] In some possible implementations, the electronic device according to this application may include at least one processor and at least one memory. The memory stores program code that, when executed by the processor, causes the processor to perform the steps of the data processing methods described above according to various exemplary embodiments of this application.
[0158] The following reference Figure 9 To describe an electronic device 130 according to this embodiment of the present application. Figure 9 The electronic device 130 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0159] like Figure 9 As shown, the electronic device 130 is presented in the form of a general-purpose electronic device. The components of the electronic device 130 may include, but are not limited to: at least one processor 131, at least one memory 132, and a bus 133 connecting different system components (including memory 132 and processor 131).
[0160] Bus 133 represents one or more of several bus structures, including a memory bus or memory controller, peripheral bus, processor, or local bus using any of the various bus structures.
[0161] The memory 132 may include a readable medium in the form of volatile memory, such as random access memory (RAM) 1321 and / or cache memory 1322, and may further include read-only memory (ROM) 1323.
[0162] The memory 132 may also include a program / utility 1325 having a set (at least one) of program modules 1324, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.
[0163] Electronic device 130 can also communicate with one or more external devices 134 (e.g., keyboard, pointing device, etc.), and with one or more devices that enable a user to interact with electronic device 130, and / or with any device that enables electronic device 130 to communicate with one or more other electronic devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 135. Furthermore, electronic device 130 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 136. As shown, network adapter 136 communicates with other modules used by electronic device 130 via bus 133. It should be understood that, although... Figure 9 As not shown, other hardware and / or software modules may be used in conjunction with electronic device 130, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0164] In some possible implementations, various aspects of the data processing method provided in this application can also be implemented in the form of a program product, which includes program code that, when the program product is run on a computer device, causes the computer device to perform the steps of a data processing method according to various exemplary embodiments of this application as described above.
[0165] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0166] The program product for data processing according to the embodiments of this application can be a portable compact disc read-only memory (CD-ROM) and include program code, and can run on an electronic device. However, the program product of this application is not limited thereto. In this document, the readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0167] A readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying readable program code. This propagated data signal may take many forms, including—but not limited to—electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0168] The program code contained on the readable medium may be transmitted using any suitable medium, including—but not limited to—wireless, wired, fiber optic, RF, etc., or any suitable combination thereof.
[0169] Program code for performing the operations of this application can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's electronic device, partially on the user's device, as a standalone software package, partially on the user's electronic device and partially on a remote electronic device, or entirely on a remote electronic device or server. In cases involving remote electronic devices, the remote electronic device can be connected to the user's electronic device via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external electronic device (e.g., via the Internet using an Internet service provider).
[0170] It should be noted that although several units or sub-units of the device have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of this application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided and embodied by multiple units.
[0171] Furthermore, although the operations of the method of this application are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
[0172] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0173] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0174] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0175] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0176] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A data processing method, characterized in that, Applied to a terminal device, the method includes: The received first-level instruction is processed by a common plugin to obtain a second-level instruction; the first-level instruction is used to instruct the receiving terminal to execute the command. If the first-level instruction is a common processing instruction, then the second-level instruction is sent to the receiving terminal; If the first-level instruction is a common processing and differentiated processing instruction, then the corresponding plugin of the receiving terminal is invoked to process the second-level instruction to obtain the third-level instruction, and the third-level instruction is sent to the receiving terminal; wherein, The common plugin is invoked to process the received first-level instructions to obtain second-level instructions, including: The common plugin is invoked to process the first-level instruction based on the second-level instruction processing logic to obtain the second-level instruction; The secondary instruction processing logic is obtained according to the following method: The execution order of the code for processing first-level instructions is retrieved from memory, as well as the inherent logic of the code for processing the first-level instructions in the terminal device; The execution order of the code that processes the first-level instructions and the inherent logic of the code that processes the first-level instructions are used as the second-level instruction processing logic; The process of calling the plugin corresponding to the receiving terminal to process the secondary instruction and obtain the tertiary instruction includes: Retrieve the plugin corresponding to the receiving terminal from the memory, and use the plugin of the receiving terminal as a differentiated processing plugin; The differential processing plugin is used to perform differential processing on the secondary instruction based on the three-level instruction processing logic to obtain the tertiary instruction; the secondary instruction is used to obtain the tertiary instruction that the receiving terminal can process. The three-level instruction processing logic is obtained according to the following method: The execution order of the code for processing secondary instructions by the receiving terminal and the inherent logic of the code for processing the secondary instructions by the receiving terminal are obtained from the memory. The execution order of the code that processes the second-level instructions and the inherent logic of the code that processes the second-level instructions are used as the third-level instruction processing logic.
2. The method according to claim 1, characterized in that, Before the method calls the common plugin to process the received first-level instructions to obtain the second-level instructions, it further includes: Parse the first-level instruction to obtain the Uniform Resource Identifier (URI) corresponding to the first-level instruction; The URI of the first-level instruction determines whether the first-level instruction is a common processing instruction or a common processing and differentiated processing instruction.
3. The method according to claim 1, characterized in that, Before the common plugin is invoked to process the received first-level instructions, the method further includes: Retrieve the plugin corresponding to the pre-stored template device from the memory, and use the plugin of the template device as a common plugin, wherein the template device is a device that has common characteristics with multiple receiving devices.
4. The method according to claim 1, characterized in that, After sending the secondary instruction to the receiving terminal, the method further includes: If the execution result sent by the receiving terminal is received within the preset time period, it is determined that the control of the receiving terminal is successful. If no execution result is received from the receiving terminal within the preset time period, it is determined that the control of the receiving terminal has failed.
5. The method according to claim 1, characterized in that, After sending the level-three instruction to the receiving terminal, the method further includes: If the execution result sent by the receiving terminal is received within the preset time period, it is determined that the control of the receiving terminal is successful. If no execution result is received from the receiving terminal within the preset time period, it is determined that the control of the receiving terminal has failed.
6. A data processing apparatus, characterized in that, Applied to a terminal device, the device includes: The first-level instruction processing module is used to call the common plug-in to process the received first-level instructions and obtain second-level instructions; the first-level instructions are used to instruct the receiving terminal to execute the command. A secondary instruction sending module is used to send the secondary instruction to the receiving terminal if the primary instruction is a common processing instruction; The level-three instruction sending module is used to, if the level-one instruction is a common processing and differentiated processing instruction, call the corresponding plugin of the receiving terminal to process the level-two instruction to obtain the level-three instruction, and then send the level-three instruction to the receiving terminal; wherein... The primary instruction processing module is specifically used for: The common plugin is invoked to process the first-level instruction based on the second-level instruction processing logic to obtain the second-level instruction; The secondary instruction processing logic is obtained according to the following method: The execution order of the code for processing first-level instructions is retrieved from memory, as well as the inherent logic of the code for processing the first-level instructions in the terminal device; The execution order of the code that processes the first-level instructions and the inherent logic of the code that processes the first-level instructions are used as the second-level instruction processing logic; The three-level instruction sending module is specifically used for: Retrieve the plugin corresponding to the receiving terminal from the memory, and use the plugin of the receiving terminal as a differentiated processing plugin; The differential processing plugin is used to perform differential processing on the secondary instruction based on the three-level instruction processing logic to obtain the tertiary instruction; the secondary instruction is used to obtain the tertiary instruction that the receiving terminal can process. The three-level instruction processing logic is obtained according to the following method: The execution order of the code for processing secondary instructions by the receiving terminal and the inherent logic of the code for processing the secondary instructions by the receiving terminal are obtained from the memory. The execution order of the code that processes the second-level instructions and the inherent logic of the code that processes the second-level instructions are used as the third-level instruction processing logic.
7. An electronic device, characterized in that, The method 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 to implement the method as described in any one of claims 1 to 5.
8. A computer storage medium, characterized in that, The computer storage medium stores a computer program that enables the computer to perform the method as described in any one of claims 1-5.