Data processing method and related device
By placing the verification before the simulation during the system model building process and performing verification based on the data flow, the problems of low efficiency and inaccuracy caused by the interweaving of simulation and verification in the existing technology are solved, and a more efficient system is achieved Model building and simulation process.
Patent Information
- Application Number
- CN202411371227.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2024-12-24
AI Technical Summary
In the prior art, simulation and verification methods are intertwined, resulting in low efficiency and may cause lag when building large-scale system models, which cannot effectively ensure the correctness of the model.
Put the verification before the simulation, and check based on the data flow during the system model construction process, and continue to build the module only if the verification is passed, ensuring that the verification results of each module are passed before the next operation is performed. Until all modules pass the verification.
The efficiency of the simulation stage is improved, the accuracy of the built system model is ensured, and the low efficiency and lag problems caused by interleaving checksum simulation are avoided.
Smart Images

Figure CN119180153A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a data processing method and related devices. Background Art
[0002] In order to analyze system performance and optimize the system, the system behavior is usually simulated based on simulation to study the system performance and optimize the design.
[0003] In practical applications, in order to ensure correctness, the correctness of model building and the correctness of the simulation process need to be verified, such as verification based on model verification rules to determine whether they are correct. However, the verification and simulation methods used in related technologies have problems such as low efficiency. Summary of the invention
[0004] In order to solve the above technical problems, the present application provides a data processing method and related devices, which place verification before simulation, decouple verification from simulation, and improve efficiency.
[0005] The embodiments of the present application disclose the following technical solutions:
[0006] On the one hand, an embodiment of the present application provides a data processing method, the method comprising:
[0007] In the process of building a system model corresponding to a business function, determining a data stream received by the i-th module, the system model being used to implement the business function;
[0008] Verifying the data stream received by the i-th module according to the verification rule corresponding to the i-th module to obtain a verification result corresponding to the i-th module;
[0009] If the verification result corresponding to the i-th module indicates that the verification has been passed, a building prompt message is generated, where the building prompt message is used to prompt the user to perform operations for building the system model;
[0010] In response to a model building operation performed by the user based on the building prompt message, obtaining an i+1th module corresponding to the model building operation;
[0011] If the i+1th module is connected after the i-th module, the data stream output by the i-th module is transmitted to the i+1th module, and the data stream received by the i+1th module is verified according to the verification rule corresponding to the i+1th module to obtain the verification result corresponding to the i+1th module;
[0012] In response to the building completion operation performed by the user, the system model is determined based on N modules, and the verification results corresponding to the N modules respectively indicate that the verification is passed.
[0013] On the other hand, an embodiment of the present application provides a data processing device, the device comprising a determination unit, a verification unit, a generation unit, and an acquisition unit:
[0014] The determining unit is used to determine the data stream received by the i-th module in the process of building a system model corresponding to the business function, and the system model is used to implement the business function;
[0015] The verification unit is used to verify the data stream received by the i-th module according to the verification rule corresponding to the i-th module, and obtain the verification result corresponding to the i-th module;
[0016] The generating unit is configured to generate a building prompt message if the verification result corresponding to the i-th module indicates that the verification has been passed, wherein the building prompt message is used to prompt the user to perform operations for building the system model;
[0017] The acquisition unit is used for acquiring the (i+1)th module corresponding to the model building operation in response to the model building operation performed by the user based on the building prompt message;
[0018] The verification unit is further configured to, if the i+1th module is connected after the i-th module, transfer the data stream output by the i-th module to the i+1th module, and verify the data stream received by the i+1th module according to the verification rule corresponding to the i+1th module to obtain a verification result corresponding to the i+1th module;
[0019] The determination unit is further configured to determine the system model based on N modules in response to a completion operation of the construction performed by the user, wherein the verification results corresponding to the N modules respectively indicate passing the verification.
[0020] In another aspect, an embodiment of the present application provides a computer device, the computer device comprising a processor and a memory:
[0021] The memory is used to store program code and transmit the program code to the processor;
[0022] The processor is used to execute the data processing method described in the above aspects according to the instructions in the program code.
[0023] On the other hand, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and the computer program is used to execute the data processing method described in the above aspects.
[0024] It can be seen from the above technical solution that verification is performed in the process of building the system model, and finally a complete system model is built. Specifically, according to the verification rule corresponding to the i-th module, the data stream received by the i-th module is verified, and the verification result corresponding to the i-th module is obtained. If the verification is indicated, a building prompt message is generated to prompt the user to implement the operation for building the system model. Then, in response to the model building operation implemented based on the building prompt message, the corresponding i+1 module is obtained, that is, the i+1 module is a new module that continues to be built after determining that the i-th module has passed the verification. If the i+1 module is connected to the i-th module, the data stream output by the i-th module is passed to the i+1 module, and the data stream received by the i+1 module is verified according to the verification rule corresponding to the i+1 module. In this way, verification is performed during the construction process, and only after verification will the construction continue, until the construction is completed in response to the user's implementation, the system model is determined based on N modules, and the verification results corresponding to the N modules respectively indicate that the verification is passed. In practical applications, simulation can be performed after the system model is obtained. Therefore, compared with the related art in which verification and simulation are intertwined, that is, verification while simulating, in the present application, verification is placed before simulation, decoupled from simulation, and verification is based on data flow, and construction will only continue after passing the verification, thereby ensuring the accuracy of the constructed system model, which is beneficial to improving the efficiency of the simulation stage. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0026] Figure 1 A flowchart of a data processing method provided in an embodiment of the present application;
[0027] Figure 2 A structural diagram of a data processing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0029] The verification and simulation method used in the related technology is to interweave verification with simulation, which is a method of simulating and verifying at the same time, resulting in problems such as low efficiency. Especially when building models corresponding to large-scale systems, the interweaving method is not only inefficient, but may also cause problems such as freezing.
[0030] To this end, the present application provides a data processing method and related devices, which decouple the verification from the simulation by placing the verification before the simulation, and verifying based on the data flow, and only continuing to build after passing the verification, thereby ensuring the accuracy of the built system model. In practical applications, simulation can only be performed after the system model is obtained, so verification is performed during the process of building the system model, which is conducive to improving the efficiency of the simulation stage.
[0031] The data processing method provided in the embodiments of the present application can be implemented by a computer device, which can be a terminal device or a server, wherein the server can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. Terminal devices include but are not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, etc. Terminal devices and servers can be directly or indirectly connected via wired or wireless communication, and this application does not impose any restrictions on this.
[0032] The specific examples are as follows:
[0033] Figure 1 A flowchart of a data processing method provided in an embodiment of the present application is described by taking a server as the aforementioned computer device as an example. The method includes S101-S106:
[0034] S101: In the process of building a system model corresponding to a business function, determining a data stream received by an i-th module.
[0035] Among them, the system model is used to implement business functions. Usually, the system model can be composed of multiple modules. In the process of building the system model, the corresponding multiple modules are determined to build the system model. Usually, different modules can implement different functions. The data stream received by the i-th module can refer to the data that the i-th module needs to process. The process of processing the received data stream can be considered as the process of the module implementing its own function based on its own logic.
[0036] S102: According to the verification rule corresponding to the i-th module, the data stream received by the i-th module is verified to obtain the verification result corresponding to the i-th module.
[0037] Next, the data stream received by the ith module can be verified according to the verification rules corresponding to the ith module to obtain the verification result corresponding to the ith module. The verification result corresponding to the ith module can be used to indicate whether the verification is passed, thereby determining whether the ith module is built correctly.
[0038] In practical applications, different modules may have different logics and different data streams to be processed. Therefore, in one possible implementation, different modules may have different corresponding verification rules, which may be determined based on actual conditions. In this application, the verification of each module is based on the verification rules corresponding to the model, which is conducive to ensuring the accuracy of the verification results.
[0039] S103: If the verification result corresponding to the i-th module indicates that the verification has passed, a building prompt message is generated.
[0040] If the verification result corresponding to the i-th module indicates that the verification is passed, it indicates that the current construction is normal and the construction can continue. Specifically, a construction prompt message can be generated, and the construction prompt message can be used to prompt the user to perform operations for building the system model.
[0041] On the contrary, if the verification result corresponding to the i-th module indicates that the verification has not been passed, it indicates that there may be an abnormality in the current construction, and an abnormal prompt message can be generated accordingly to facilitate user inspection and repair. For ease of understanding, the embodiment of the present application provides the following method as an example:
[0042] In a possible implementation, if the verification rule corresponding to the i-th module is used to indicate the type of data stream that the i-th module can process and the value of the data stream, then the verification result corresponding to the i-th module is used to indicate whether the data stream received by the i-th module conforms to the type and value, that is, the verification focuses on the type and value of the data stream. Correspondingly, if the verification result corresponding to the i-th module indicates that the verification has not passed, an abnormal prompt message is generated. At this time, the cause of the abnormality may be a problem with the data stream itself, or there may be a problem with the connection relationship between the modules, resulting in the above-mentioned type or value not conforming to the verification rule in the data flow. Therefore, the abnormal prompt message generated at this time can be used to prompt the user that the data stream is abnormal or the connection relationship of the i-th module is abnormal.
[0043] Based on this, when the verification fails, an exception can be thrown so that the user can check and repair it in time. In addition, the generated exception prompt message can provide possible error diagnosis and improvement suggestions to help users locate and fix the problem.
[0044] For example, if the verification rule of the i-th module indicates that the module does not allow the input of Boolean type data stream, or the module does not allow precision loss during the calculation process, etc., the verification is performed in combination with these different rules. If the verification can be passed correctly, the subsequent steps are performed, otherwise an exception is thrown.
[0045] S104: In response to the model building operation performed by the user based on the building prompt message, obtaining an (i+1)th module corresponding to the model building operation.
[0046] In actual applications, after the i-th module passes the verification, if the user believes that the current system model has not been built and needs to continue to be built, the model building operation can be implemented, that is, the model building operation belongs to the aforementioned operation for building the system model. Accordingly, in response to the model building operation implemented by the user based on the building prompt message, the i+1th module corresponding to the model building model can be obtained, and the i+1th module can refer to the module newly built by the user through the model building operation.
[0047] S105: If the i+1th module is connected after the i-th module, the data stream output by the i-th module is passed to the i+1th module, and the data stream received by the i+1th module is verified according to the verification rule corresponding to the i+1th module to obtain the verification result corresponding to the i+1th module.
[0048] If the i+1th module is connected after the i-th module, it indicates that the data flow of the system needs to flow from the i-th module to the i+1th module. Therefore, the data flow output by the i-th module can be passed to the i+1th module, and the data flow received by the i+1th module can be verified according to the verification rule corresponding to the i+1th module to obtain the verification result corresponding to the i+1th module. Based on this, the direction of the data flow is determined by judging the connection relationship between the modules to determine the data flow received by the module.
[0049] It should be noted that if the connection relationship between the other i modules changes after the user builds the i+1th module, it means that the data streams received by other modules may have changed. Therefore, at this time, the modules whose received data streams have changed can be re-executed based on the corresponding verification rules to verify the latest construction situation, which is conducive to ensuring the accuracy of the system model.
[0050] It should also be noted that if the i+1th module is connected after the i-th module, the data stream output by the i-th module belongs to the data stream received by the i+1th module. In practical applications, a module can be connected after multiple modules, so the data stream received by the i+1th module can also include the data streams output by other modules connected before the i+1th module.
[0051] Correspondingly, if the i+1th module is not connected after the i+1th module, similar to the i+1th module, the data stream received by the i+1th module can be determined, such as whether there are other modules connected before the i+1th module. If so, the data output by other modules connected before the i+1th module can be used as the data stream received by the i+1th module. If not, the data stream received by the i+1th module can be determined according to the type of the i+1th module. For example, if the type of the i+1th module indicates that the module is a constant module, usually, the constant module will not be connected to other modules before, but can be connected to other modules afterwards. Its function is to obtain the data stream and input it to the module connected after it.
[0052] S106: In response to the building completion operation performed by the user, a system model is determined based on the N modules.
[0053] In the actual construction process, the above steps are implemented repeatedly until the user believes that the system model is completed, and the user can perform the construction completion operation. At this time, in response to the construction completion operation performed by the user, the system model can be determined based on N modules, where N is an integer greater than 1, and N modules can refer to all modules built for business functions when the user performs the construction completion operation.
[0054] It is understandable that when the construction completion operation is implemented and the system model is determined based on N modules, the verification results corresponding to the N modules respectively indicate that they have passed the verification. In addition, the construction completion operation is also a type of operation for building a system model.
[0055] Compared with the method of interweaving verification and simulation in related technologies, in the present application, verification is placed before simulation, decoupled from simulation, and verification is based on data flow, and construction will only continue after passing the verification. Finally, when the construction is completed, all N modules have passed the verification, thus ensuring the accuracy of the constructed system model, which is beneficial to improving the efficiency of the simulation stage.
[0056] Based on this, a method for performing verification in the process of building a system model is provided, so that verification is decoupled from simulation, and verification is performed according to the verification rules corresponding to each module itself and based on the data flow to improve the accuracy of the system model. It should also be noted that the configuration method of the verification rules corresponding to each module and the determination method for the data flow are not limited in this application. For ease of understanding, the embodiments of this application provide the following methods as examples:
[0057] In order to facilitate users to build system models, in a possible implementation, it is also possible to support user-defined verification rules to meet the user's customized needs, etc., which is conducive to improving the efficiency of building system models. In specific implementation, in response to the input operation implemented by the user, the target verification rule for the target module corresponding to the input operation can be obtained first, and the target module belongs to the aforementioned N modules. Then, according to the target verification rule, the verification rule corresponding to the target module can be configured.
[0058] Among them, the target verification rule can be a verification rule for the target module input by the user. Therefore, based on this configuration of the verification rule corresponding to the target module, the user can customize the verification rules of each module according to actual needs, improve the user experience, and more conveniently meet the user's customization needs, etc., which is conducive to improving the efficiency of building the system model. In addition, because it supports user-defined input verification rules, there is no need to develop other modules to meet the user's customization needs, avoiding the increase of development costs.
[0059] For example, the verification rules may indicate whether to allow precision loss during simulation, whether to adopt a certain rounding mode when type rounding occurs or to directly treat it as an exception, whether the expected data flow behavior is based on the accuracy of the result or the final simulation speed of the model, etc. In actual applications, users can flexibly customize according to actual needs to meet various situations in the production environment.
[0060] In a possible implementation, the data streams received by the aforementioned N modules are determined based on the data corresponding to the business function. Based on this, verification is also performed using the data corresponding to the business function. In this way, verification based on the data stream during the construction process is conducive to ensuring the correctness of the data streams between the modules in the final system model, thereby ensuring the correctness of the data flow in the subsequent simulation stage to improve the simulation efficiency.
[0061] It can be seen from the above technical solution that verification is performed in the process of building the system model, and finally a complete system model is built. Specifically, according to the verification rule corresponding to the i-th module, the data stream received by the i-th module is verified, and the verification result corresponding to the i-th module is obtained. If the verification is indicated, a building prompt message is generated to prompt the user to implement the operation for building the system model. Then, in response to the model building operation implemented based on the building prompt message, the corresponding i+1 module is obtained, that is, the i+1 module is a new module that continues to be built after determining that the i-th module has passed the verification. If the i+1 module is connected to the i-th module, the data stream output by the i-th module is passed to the i+1 module, and the data stream received by the i+1 module is verified according to the verification rule corresponding to the i+1 module. In this way, verification is performed during the construction process, and only after verification will the construction continue, until the construction is completed in response to the user's implementation, the system model is determined based on N modules, and the verification results corresponding to the N modules respectively indicate that the verification is passed. In practical applications, simulation can be performed after the system model is obtained. Therefore, compared with the related art in which verification and simulation are intertwined, that is, verification while simulating, in the present application, verification is placed before simulation, decoupled from simulation, and verification is based on data flow, and construction will only continue after passing the verification, thereby ensuring the accuracy of the constructed system model, which is beneficial to improving the efficiency of the simulation stage.
[0062] In actual applications, after the system model is built, simulation can be performed. Specifically, the system model can be simulated using data corresponding to the business functions. Since verification is performed before simulation, the verification function and the simulation function are decoupled, which is conducive to improving simulation efficiency and scalability.
[0063] In the specific implementation, after the construction is completed, the constructed system model can be analyzed, such as analyzing the current system model according to the flow of data flow, the relevant data carried by the data flow, etc., to parse and separate a series of preconditions required for simulation. For example, the flow of data flow can reflect the connectable relationship between modules, which can also reflect the execution order of modules.
[0064] Therefore, in a possible implementation, the execution order of the N modules can be determined based on the connection relationship between the N modules. Accordingly, during simulation, the data corresponding to the business functions can be used to execute the N modules in sequence according to the execution order. Based on this, the execution order of the N modules required for simulation can be determined by analyzing the constructed system model to improve the simulation efficiency.
[0065] Exemplarily, if the output end of the first module is connected to the input end of the second module, and the output end of the second module is connected to the input end of the third module, then in the execution order, the first module is executed earlier than the second module, and the second module is executed earlier than the third module, and the first module, the second module and the third module all belong to N modules.
[0066] For ease of understanding, as an example, the business function is used to instruct the adjustment of the engine speed based on the throttle opening. The first module may be a throttle opening input module, which is used to determine the throttle opening, that is, the output data stream is the throttle opening. And, the second module is a speed determination module, which is used to process the received throttle opening and determine the engine speed corresponding to the throttle opening, that is, the output data stream is the engine speed corresponding to the throttle opening. And, the third module may be a speed adjustment module, which is used to adjust the engine speed to the received engine speed based on the received engine speed.
[0067] In actual applications, in order to realize business functions, it may be necessary to implement business functions through multiple loop iterations based on the loop execution system model. For example, the business function is used to instruct to increase the vehicle's driving speed. Specifically, it is expected to increase the vehicle's driving speed from 0 to 100 within a preset time (such as 10 minutes). In order to ensure the stability of the vehicle during actual driving, the adjustment of the driving speed can be gradually increased. For example, in the first loop, the driving speed is increased from 0 to 20 through the system model, and then increased from 20 to 40 in the next loop, etc.
[0068] Therefore, the aforementioned preconditions may also include the module execution frequency, which may be set according to actual needs and may be used to indicate the number of cycles that need to be executed in order to implement business functions. Exemplarily, if the module execution frequency is 2 times within 10 minutes, the data obtained after simulation may be reflected in the driving speed at the 5th minute and the driving speed at the 10th minute. If the module execution frequency is 10 times within 10 minutes, the data obtained after simulation may be reflected in the driving speed at the 1st minute, the driving speed at the 2nd minute, ..., and the driving speed at the 10th minute. In this way, the specific process of increasing the driving speed can be reflected in a more fine-grained manner, and a more accurate simulation can be achieved.
[0069] In addition, it should be noted that this application does not impose any restrictions on the settings of each module. In practical applications, each module can be set based on function. Exemplarily, for more complex situations, a state machine can be set to configure different state flows to implement more complex data flow processing logic. For example, if the received data flow meets condition a, the received data flow is processed based on the logic of state flow a. If the received data flow meets condition b, the received data flow is processed based on the logic of state flow b.
[0070] In addition, some key information of the data flow can be recorded during the verification process, that is, during the data flow process, such as whether it has passed through some discrete modules, some state transition conditions when the data flow flows in the state machine, etc. Based on this, it can better solve more complex situations in modeling, such as loop processing, whether mutually exclusive conditions occur during the state machine state transition, conditions for cyclic state transitions, conflicting conditions, etc. Usually, these complex situations may cause the state machine to deadlock. Deadlock means that the current logic cannot move forward and falls into an infinite loop state, so that the required transfer cannot be completed, resulting in the model not working as expected, or the simulation cannot be completed.
[0071] In the implementation process, better processing can be achieved based on the way of setting the interface. Among them, the interface is an abstract type that defines a group of abstract methods. The interface provides a mechanism to separate method declaration from implementation, allowing multiple classes to implement the same interface and provide their own method implementations. In practical applications, interfaces are widely used in Java to implement multiple inheritance, loose coupling between implementation classes, and definition specifications. In this application, first a method can be defined in a Java interface, and the return value of this method is an entity class (here it is considered that the data information filled in the entity class is the aforementioned data flow), and then different modules will implement this interface, according to the data flow received from the input, combined with the verification rules of the module itself, and refill the data flow, that is, the output data flow is obtained. If the verification fails, interruption or warning processing is performed according to this abnormal situation. If the verification passes, it continues to be passed backward, and so on, until the system model is built.
[0072] It can be understood that it basically corresponds to the method embodiment, so the relevant parts can refer to the partial description of the method embodiment.
[0073] Figure 2 A structural diagram of a data processing device provided in an embodiment of the present application, the device includes a determination unit 201, a verification unit 202, a generation unit 203 and an acquisition unit 204:
[0074] The determining unit 201 is used to determine the data stream received by the i-th module in the process of building a system model corresponding to the business function, and the system model is used to implement the business function;
[0075] The verification unit 202 is used to verify the data stream received by the i-th module according to the verification rule corresponding to the i-th module, and obtain the verification result corresponding to the i-th module;
[0076] The generating unit 203 is used to generate a building prompt message if the verification result corresponding to the i-th module indicates that the verification is passed, and the building prompt message is used to prompt the user to perform operations for building the system model;
[0077] The acquisition unit 204 is used for acquiring the (i+1)th module corresponding to the model building operation in response to the model building operation performed by the user based on the building prompt message;
[0078] The verification unit 202 is further configured to, if the i+1th module is connected after the i-th module, transfer the data stream output by the i-th module to the i+1th module, and verify the data stream received by the i+1th module according to the verification rule corresponding to the i+1th module to obtain a verification result corresponding to the i+1th module;
[0079] The determining unit 201 is further configured to determine the system model based on N modules in response to a completion operation of the building performed by the user, wherein the verification results corresponding to the N modules respectively indicate that the verification has been passed.
[0080] In a possible implementation manner, the acquiring unit is further configured to:
[0081] In response to an input operation performed by the user, obtaining a target verification rule for a target module corresponding to the input operation, the target module belonging to the N modules;
[0082] According to the target verification rule, configure the verification rule corresponding to the target module.
[0083] In a possible implementation, if the verification rule corresponding to the i-th module is used to indicate the type of data stream that the i-th module can process and the value of the data stream, then the verification result corresponding to the i-th module is used to indicate whether the data stream received by the i-th module conforms to the type and the value, and the generating unit is further used to:
[0084] If the verification result corresponding to the i-th module indicates that the verification has not been passed, an abnormal prompt message is generated, and the abnormal prompt message is used to prompt that the user data flow is abnormal or the connection relationship of the i-th module is abnormal.
[0085] In a possible implementation, the device further includes a simulation unit:
[0086] The simulation unit is used to simulate the system model using the data corresponding to the business function.
[0087] In a possible implementation, the simulation unit is further used for:
[0088] Based on the connection relationship between the N modules, determining the execution order corresponding to the N modules;
[0089] The N modules are executed in sequence according to the execution order using the data corresponding to the business functions.
[0090] In one possible implementation, if the output end of the first module is connected to the input end of the second module, and the output end of the second module is connected to the input end of the third module, then in the execution order, the first module is executed earlier than the second module, and the second module is executed earlier than the third module, and the first module, the second module and the third module all belong to the N modules.
[0091] In a possible implementation manner, the data streams received by the N modules are determined based on data corresponding to the service function.
[0092] It can be seen from the above technical solution that verification is performed in the process of building the system model, and finally a complete system model is built. Specifically, according to the verification rule corresponding to the i-th module, the data stream received by the i-th module is verified, and the verification result corresponding to the i-th module is obtained. If the verification is indicated, a building prompt message is generated to prompt the user to implement the operation for building the system model. Then, in response to the model building operation implemented based on the building prompt message, the corresponding i+1 module is obtained, that is, the i+1 module is a new module that continues to be built after determining that the i-th module has passed the verification. If the i+1 module is connected to the i-th module, the data stream output by the i-th module is passed to the i+1 module, and the data stream received by the i+1 module is verified according to the verification rule corresponding to the i+1 module. In this way, verification is performed during the construction process, and only after verification will the construction continue, until the construction is completed in response to the user's implementation, the system model is determined based on N modules, and the verification results corresponding to the N modules respectively indicate that the verification is passed. In practical applications, simulation can be performed after the system model is obtained. Therefore, compared with the related art in which verification and simulation are intertwined, that is, verification while simulating, in the present application, verification is placed before simulation, decoupled from simulation, and verification is based on data flow, and construction will only continue after passing the verification, thereby ensuring the accuracy of the constructed system model, which is beneficial to improving the efficiency of the simulation stage.
[0093] In another aspect, an embodiment of the present application provides a computer device, the computer device comprising a processor and a memory:
[0094] The memory is used to store program code and transmit the program code to the processor;
[0095] The processor is used to execute the data processing method provided in the above embodiment according to the instructions in the program code.
[0096] The computer device may include a terminal device or a server, and the aforementioned data processing apparatus may be configured in the computer device.
[0097] On the other hand, an embodiment of the present application further provides a storage medium, wherein the storage medium is used to store a computer program, and the computer program is used to execute the data processing method provided by the above embodiment.
[0098] In addition, an embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the data processing method provided in the above embodiment.
[0099] A person of ordinary skill in the art can understand that: all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium can be at least one of the following media: read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, etc., various media that can store program codes.
[0100] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.
[0101] It should be noted that, in this article, relational terms such as "first" and "second", etc. (if any) are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0102] The above is a detailed introduction to a data processing method and related devices provided by the embodiment of the present application. The principles and implementation methods of the present application are described in detail using specific examples herein. The description of the above embodiments is only used to help understand the method of the present application. At the same time, for those skilled in the art, according to the method of the present application, there will be changes in the specific implementation methods and application scopes.
[0103] In summary, the content of this specification should not be understood as limiting the present application, and any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in this application should be included in the protection scope of this application. Moreover, based on the implementations provided in the above aspects, this application can also be further combined to provide more implementations.
Claims
1. A data processing method, characterized in that: The method comprises: In the process of building a system model corresponding to a business function, determining a data stream received by the i-th module, the system model being used to implement the business function; Verifying the data stream received by the i-th module according to the verification rule corresponding to the i-th module to obtain a verification result corresponding to the i-th module; If the verification result corresponding to the i-th module indicates that the verification has been passed, a building prompt message is generated, where the building prompt message is used to prompt the user to perform operations for building the system model; In response to a model building operation performed by the user based on the building prompt message, obtaining an i+1th module corresponding to the model building operation; If the i+1th module is connected after the i-th module, the data stream output by the i-th module is transmitted to the i+1th module, and the data stream received by the i+1th module is verified according to the verification rule corresponding to the i+1th module to obtain the verification result corresponding to the i+1th module; In response to the building completion operation performed by the user, the system model is determined based on N modules, and the verification results corresponding to the N modules respectively indicate that the verification is passed.
2. The method according to claim 1, characterized in that The method further comprises: In response to an input operation performed by the user, obtaining a target verification rule for a target module corresponding to the input operation, the target module belonging to the N modules; According to the target verification rule, configure the verification rule corresponding to the target module.
3. The method according to claim 1, characterized in that If the verification rule corresponding to the i-th module is used to indicate the type of data stream that the i-th module can process and the value of the data stream, then the verification result corresponding to the i-th module is used to indicate whether the data stream received by the i-th module conforms to the type and the value, and the method further includes: If the verification result corresponding to the i-th module indicates that the verification has not been passed, an abnormal prompt message is generated, and the abnormal prompt message is used to prompt that the user data flow is abnormal or the connection relationship of the i-th module is abnormal.
4. The method according to claim 1, characterized in that: The method further comprises: The system model is simulated using the data corresponding to the business function.
5. The method according to claim 4, characterized in that The simulating the system model by using the data corresponding to the business function includes: Based on the connection relationship between the N modules, determining the execution order corresponding to the N modules; The N modules are executed in sequence according to the execution order using the data corresponding to the business functions.
6. The method according to claim 5, characterized in that If the output end of the first module is connected to the input end of the second module, and the output end of the second module is connected to the input end of the third module, then in the execution order, the first module is executed earlier than the second module, and the second module is executed earlier than the third module, and the first module, the second module and the third module all belong to the N modules.
7. The method according to any one of claims 1 to 6, characterized in that: The data streams received by the N modules are determined based on the data corresponding to the business functions.
8. A data processing device, characterized in that: The device comprises a determination unit, a verification unit, a generation unit and an acquisition unit: The determining unit is used to determine the data stream received by the i-th module in the process of building a system model corresponding to the business function, and the system model is used to implement the business function; The verification unit is used to verify the data stream received by the i-th module according to the verification rule corresponding to the i-th module, and obtain the verification result corresponding to the i-th module; The generating unit is configured to generate a building prompt message if the verification result corresponding to the i-th module indicates that the verification has been passed, wherein the building prompt message is used to prompt the user to perform operations for building the system model; The acquisition unit is used for acquiring the (i+1)th module corresponding to the model building operation in response to the model building operation performed by the user based on the building prompt message; The verification unit is further configured to, if the i+1th module is connected after the i-th module, transfer the data stream output by the i-th module to the i+1th module, and verify the data stream received by the i+1th module according to the verification rule corresponding to the i+1th module to obtain a verification result corresponding to the i+1th module; The determination unit is further configured to determine the system model based on N modules in response to a completion operation of the construction performed by the user, wherein the verification results corresponding to the N modules respectively indicate passing the verification.
9. A computer device, characterized in that: The computer device comprises a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is configured to execute the method according to any one of claims 1 to 7 according to the instructions in the program code.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method according to any one of claims 1 to 7.
