WO2023103844A1 - Data processing method and apparatus - Google Patents

Data processing method and apparatus Download PDF

Info

Publication number
WO2023103844A1
WO2023103844A1 PCT/CN2022/135115 CN2022135115W WO2023103844A1 WO 2023103844 A1 WO2023103844 A1 WO 2023103844A1 CN 2022135115 W CN2022135115 W CN 2022135115W WO 2023103844 A1 WO2023103844 A1 WO 2023103844A1
Authority
WO
WIPO (PCT)
Prior art keywords
service model
service
symbol
semantic
model
Prior art date
Application number
PCT/CN2022/135115
Other languages
French (fr)
Chinese (zh)
Inventor
仇兴中
康泰
黄玮
Original Assignee
阿里云计算有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 阿里云计算有限公司 filed Critical 阿里云计算有限公司
Publication of WO2023103844A1 publication Critical patent/WO2023103844A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/43Checking; Contextual analysis
    • G06F8/436Semantic checking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • G06F8/427Parsing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Definitions

  • the present application relates to the field of new generation information technology, in particular to a data processing method and device.
  • the server has developed rapidly. Developers can deploy a large number of service models in the server for tenants to rent, and generate applications based on the rented service model and the code developed by the tenant, and then based on The application provides external services.
  • a tenant when a tenant needs to provide services to a large number of customers, it can determine the service model in the application involved in the customer's online data, and then call the service model in the server to process the customer's online data, so as to provide services for customers.
  • This application shows a data processing method and device.
  • the present application shows a data processing method, which is applied to a server.
  • the server has multiple applications for providing external services, and each application uses at least one of the multiple applications in the server.
  • the service model is developed in the server, and at least part of the service models included in the application have dependencies; the method includes: when the first service model in the server is changed, in the Find at least one second service model that depends on the first service model in at least some of the multiple applications in the server; for each found second service model, the second service model Perform semantic verification to obtain a semantic verification result of the second service model, and output the first Semantic verification results of the two-service model.
  • the present application shows a data processing method, which is applied to a terminal, and the method includes: receiving a schematic diagram sent by a server; the schematic diagram is used to indicate a dependency relationship and mark a semantic problem in the second service model, so
  • the dependency relationship includes the dependency relationship between the second service model and the first service model; the dependency relationship is that the server performs semantic verification on the second service model and obtains the Acquired when the semantic verification result of the second service model has a semantic problem, and the second service model includes when the first service model in the server is changed, multiple At least one service model that depends on the first service model found in at least some of the applications; each application is developed in the server by at least using multiple service models in the server; in the application At least some of the included service models have dependencies among them; and the schematic diagram is rendered.
  • the present application shows a data processing device, which is applied to a server, and the server has multiple applications for providing external services, and each application uses at least one of the multiple applications in the server.
  • the service model is developed in the server, and at least part of the service models included in the application have dependencies;
  • the device includes: a search module, used for the case where the first service model in the server is changed Next, search for at least one second service model that depends on the first service model in at least some of the applications in the plurality of applications in the server;
  • the first checking module is configured to, for each found A second service model, performing semantic verification on the second service model to obtain the semantic verification result of the second service model, and an output module for using the semantic verification result of the second service model in In a case where it is indicated that there is a semantic problem in the second service model, a semantic verification result of the second service model is output.
  • the present application shows a data processing device, which is applied to a terminal, and the device includes: a second receiving module, configured to receive a schematic diagram sent by the server; the schematic diagram is used to indicate dependencies and mark the second There is a semantic problem in the service model, and the dependency relationship includes the dependency relationship between the second service model and the first service model; the dependency relationship is that the server is performing semantic verification on the second service model, and obtained when the semantic verification result indicating that there is a semantic problem in the second service model is obtained, when the first service model included in the second service model in the server is changed, in At least one service model that depends on the first service model found in at least some of the multiple applications in the server; Developed in the terminal; at least some service models included in the application have dependencies; a rendering module is used for rendering the schematic diagram.
  • the present application shows an electronic device, the electronic device comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to perform any of the foregoing aspects method shown.
  • the present application shows a non-transitory computer-readable storage medium.
  • the instructions in the storage medium are executed by the processor of the electronic device, the electronic device can execute the Methods.
  • the present application shows a computer program product.
  • the instructions in the computer program product are executed by the processor of the electronic device, the electronic device can execute the method as shown in any one of the foregoing aspects.
  • the present application includes the following advantages:
  • the real-time performance is poor, it takes a long time, and the labor cost is high, resulting in a long time for the target application to be interrupted to provide services to customers, resulting in poor customer experience and poor tenant experience.
  • the server when the first service model in the server is changed, at least one second service model dependent on the first service model in at least some of the multiple applications is searched in the server. For any second service model found, perform semantic verification on the second service model to obtain the semantic verification result of the second service model, where the semantic verification result of the second service model is used to indicate the second service model If there is a semantic problem in the second service model, output the semantic verification result of the second service model.
  • At least one second service model that depends on the first service model in at least some of the multiple applications can be quickly learned, and semantic verification of each second service model can be performed, so that each second service can be obtained as soon as possible
  • the ability to quickly restore the ability to process online data normally so that applications including the second service model can quickly recover the ability to normally process online data of customers, so that applications including the second service model can quickly recover Provide services to customers, reducing the duration of application interruptions including the second service model to provide services to customers, and improving real-time performance, that is, reducing the length of time that applications including the second service model are delayed in normal processing of online data , improving customer experience as well as tenant experience.
  • the tenant can also execute the process of this solution to verify that the first service model includes Whether the application includes other service models with semantic problems, and if other service models are included, developers can be prompted to optimize other service models, so as to eliminate the semantic problems of other service models, and avoid the occurrence of "tenant generated by other service models In the application scenario, due to semantic problems in other service models, the generated application cannot provide services to customers normally, which can avoid reducing customer experience and tenant experience.
  • the server can check the semantics of the service model, and if there is a semantic problem in the service model, the developer can be prompted Service model optimization, to eliminate the semantic problem of the service model, avoiding the semantic problem in the scenario where the tenant develops the application based on the service model and optimize the service model at that time, so as to avoid the delay of the optimization process at that time.
  • the developer of the server can use the browser on the terminal to receive and view the schematic diagram, and can use the browser on the terminal to optimize the service model in the server without installing the And use specialized development tools, which can improve convenience and reduce the cost of use.
  • tenants can also use a browser to develop applications on the terminal (for example, select the service model in the server and develop the required computer program code by themselves) and view schematic diagrams without installing and using special development tools on the terminal.
  • the convenience can be improved and the use cost can be reduced.
  • FIG. 1 is a flow chart of the steps of a data processing method of the present application.
  • Fig. 2 is a flowchart of steps of another data processing method of the present application.
  • FIG. 3 is a flow chart of steps in yet another data processing method of the present application.
  • Fig. 4 is a schematic diagram of the present application.
  • Fig. 5 is a structural block diagram of a data processing device of the present application.
  • Fig. 6 is a structural block diagram of another data processing device of the present application.
  • Fig. 7 is a structural block diagram of a device of the present application.
  • the server has multiple applications for providing external services, and each application is developed on the server at least by means of multiple service models in the server, and at least some of the service models in the applications have dependencies.
  • Tenants can develop applications by means of service models in the server, and provide services to customers based on the applications, wherein the service models in the applications may have dependencies. Different tenants can use the service model in the server to generate their own applications, and provide services to customers based on their respective applications.
  • tenants can choose some service models in the server according to their actual needs, and secondly, they can develop some computer program codes they need according to their actual conditions.
  • the developed computer program codes can also be used as service models. For example, tenants need There are some functions that they need in their own applications, but the service model provided by the server cannot realize these functions, then the tenant can develop computer program codes by themselves to realize these functions through the self-developed computer program codes, among which, a Functional computer program code can also be viewed as a service model.
  • the application can be generated according to the service model selected in the server and the self-developed service model.
  • the service models included in the application at least some of the service models have a dependency relationship, or all the service models have a dependency relationship.
  • the service model in the application can be invoked sequentially on the server according to the dependencies between the service models in the application, and the online processing can be processed based on the invoked service model, so as to Achieve service to customers.
  • the developer of the server may need to change a certain service model developed in the server according to actual needs, for example, a certain symbol is changed or deleted in the service model.
  • the application when the application cannot process the customer's online data normally, the application will report an error to indicate the application error, and the developer will start to solve the error report after sensing the application error report
  • the developers since no relevant logs about the changed service model were recorded in advance, the developers could not determine the real cause of "the application cannot process the customer's online data normally” based on the application's error report. If there is no reason, the problem of "the application cannot process the customer's online data normally" cannot be solved.
  • developers need to manually analyze which service models are included in the application and the dependencies between the service models, and then manually verify the source code of each service model in the application, and according to the dependencies between the service models and the dependencies of each service model
  • the source code manually analyzes the real reason of "the application cannot process the customer's online data normally", and then manually optimizes the application according to the real reason to solve the problem of "the application cannot process the customer's online data normally”.
  • the logical link in the above method includes: a service model is changed - the application cannot process the customer's online data normally - the application reports an error - the developer perceives the error - manually analyzes the real reason - manually optimizes the application, due to the long logical link , After a service model is changed and the application cannot process the customer's online data normally, it will take a long time to solve the problem that the application cannot process the customer's online data normally, and the solution efficiency is low. As a result, application interruptions take a long time to provide services to customers, resulting in poor customer experience and poor tenant experience.
  • the inventor came to a conclusion: the above method starts manual verification only after a service model is changed so that the application cannot process the customer's online data normally (that is, after a problem occurs). .
  • the inventor obtained at least one solution: abandoning the idea of the above-mentioned method, after a service model is changed, it is possible to immediately start the service model related to the change without waiting for whether the application can process the customer's online data normally.
  • the service model can be verified, and it can be automatically verified.
  • the service model with semantic problems is verified, the developer is immediately prompted to optimize the semantic model with semantic problems, which can reduce labor costs and improve the problem-solving efficiency. efficiency.
  • FIG. 1 shows a schematic flowchart of a data processing method of the present application.
  • the method is applied to the server.
  • the server has multiple applications for providing external services.
  • Each application is developed on the server by at least using multiple service models in the server.
  • the application includes at least part of the service models. There is a dependency relationship between them, where the method can include the following processes:
  • step S101 when the first service model in the server is changed, at least one second service model dependent on the first service model in at least some of the multiple applications is searched in the server.
  • the second service models may all directly depend on the first service model.
  • a part of the second service model may directly depend on the first service model, and another part of the service model may directly depend on the part of the second service model.
  • the second service model 1 depends on the first service model
  • the second service model 2 depends on the second service model.
  • Service model 1, further, the second service model 3 may also depend on the second service model 2 and so on.
  • this step can be implemented through the following process, including:
  • the server it can be detected regularly or in real time whether the service model developed by the developer of the server has been changed.
  • the first service model is a changed service model of one or more than two service models developed in the server by the developer of the server.
  • each application developed by each tenant on the server includes at least part of the service models on the server, and the service models on the server included in each application are different.
  • Some applications use the first service model, and some applications do not use the first service model.
  • the change of the first service model may cause the applications using the first service model to be unable to run normally, but usually will not cause the applications not using the first service model to be unable to run normally.
  • step 12 when the first service model in the server is changed, at least one target application using the first service model can be searched in the server, and then step 12) is performed.
  • the target application includes the first service model, and secondly, among service models other than the first service model included in the target application, there often exists at least one service model that depends on the first service model.
  • At least one service model depends (including direct dependence and indirect dependence, etc.) on the first service model, and since the first service model is changed, it depends on at least one of the first service models
  • There may be a semantic problem in the service model so that at least one service model that depends on the first service model may not run normally, and thus the application may not run normally.
  • this step can be implemented through the following process, including:
  • any corresponding entry in the corresponding relationship, the model identifier of the actively dependent service model and the service identifier of the dependent service model in the corresponding entry are an application developed in the server and the application being developed After the actively dependent service model is deployed in the dependency relationship of the dependent service model, the corresponding relationship is stored.
  • the service models corresponding to the found service identifiers may be determined as the second service model.
  • the application when searching for at least one second service model that depends on the first service model in at least some of the multiple applications, the application may not be introduced, but the server may use the recorded dependency relationship between the service models Directly searching for at least one second service model that depends on the first service model in at least some of the multiple applications does not rely on the application to search, which can improve the search efficiency.
  • step S102 for any second service model found, semantic verification is performed on the second service model to obtain the semantic verification result of the second service model.
  • semantic verification result of the second service model It is used to output the semantic verification result of the second service model when it indicates that there is a semantic problem in the second service model.
  • the semantic verification result of the second service model may be sent to the terminal used by the developer of the second service model to Make the developer of the second service model obtain the semantic verification result of the second service model, and learn that there is a semantic problem in the second service model according to the semantic verification result of the second service model, and optimize the second service model to eliminate the second service model. Semantic issues of the second service model.
  • the real-time performance is poor, it takes a long time, and the labor cost is high, resulting in a long time for the target application to be interrupted to provide services to customers, resulting in poor customer experience and poor tenant experience.
  • the server when the first service model in the server is changed, at least one second service model dependent on the first service model in at least some of the multiple applications is searched in the server. For any second service model found, perform semantic verification on the second service model to obtain the semantic verification result of the second service model, where the semantic verification result of the second service model is used to indicate the second service model If there is a semantic problem in the second service model, output the semantic verification result of the second service model.
  • At least one second service model that depends on the first service model in at least some of the multiple applications can be quickly learned, and semantic verification of each second service model can be performed, so that each second service can be obtained as soon as possible
  • the ability to quickly restore the ability to process online data normally so that applications including the second service model can quickly recover the ability to normally process online data of customers, so that applications including the second service model can quickly recover Provide services to customers, reducing the duration of application interruptions including the second service model to provide services to customers, and improving real-time performance, that is, reducing the length of time that applications including the second service model are delayed in normal processing of online data , improving customer experience as well as tenant experience.
  • the tenant can also execute the process of this solution to verify that the first service model includes Whether the application includes other service models with semantic problems, and if other service models are included, developers can be prompted to optimize other service models, so as to eliminate the semantic problems of other service models, and avoid the occurrence of "tenant generated by other service models In the application scenario, due to semantic problems in other service models, the generated application cannot provide services to customers normally, which can avoid reducing customer experience and tenant experience.
  • the server can check the semantics of the service model, and if there is a semantic problem in the service model, the developer can be prompted Service model optimization, to eliminate the semantic problem of the service model, avoiding the semantic problem in the scenario where the tenant develops the application based on the service model and optimize the service model at that time, so as to avoid the delay of the optimization process at that time.
  • the developer of the server can use the browser on the terminal to receive and view the schematic diagram, and can use the browser on the terminal to optimize the service model in the server without installing the And use specialized development tools, which can improve convenience and reduce the cost of use.
  • tenants can also use a browser to develop applications on the terminal (for example, select the service model in the server and develop the required computer program code by themselves) and view schematic diagrams without installing and using special development tools on the terminal.
  • the convenience can be improved and the use cost can be reduced.
  • the semantic verification result of the second service model is used to indicate that there is a semantic problem in the second service model, it often indicates that there is a semantic problem in the second service model.
  • the first service model The change of the service model is likely to lead to the failure of the second service model (for example, the inability to process the customer's online data normally), which will lead to the failure of the target application (for example, the inability to process the customer's online data normally), resulting in the inability to Serve customers normally.
  • the developer of the second service model can be prompted that there is a semantic problem in the second service model, The developer of the second service model optimizes the second service model according to the prompt, so as to eliminate the semantic problem of the second service model.
  • the dependency relationship between the second service model and the first service model is obtained, and then a schematic diagram for indicating the dependency relationship and marking a semantic problem in the second service model is generated.
  • the changed symbol in the first service model when generating a diagram indicating the dependency and marking a semantic problem in the second service model, can be obtained, and the changed symbol in the second service model can be obtained.
  • the target symbols include symbols that cause semantic problems caused by the changed symbols, and then generate a Schematic diagram of a changed symbol in one service model that marks a target symbol in a second service model with semantic problems.
  • the dependency relationship between the changed symbol in the first service model and the target symbol in the second service model can be reflected, and when there are multiple target symbols in the second service model, It may also reflect the dependency relationship among the target symbols in the second service model, and the like.
  • the schematic diagram to the terminal used by the developer of the second service model, for example, send the schematic diagram to the terminal used by the developer of the second service model, so that the terminal used by the developer of the second service model can display the schematic diagram, thus,
  • the developer of the second service model can see the schematic diagram on the terminal he uses, and according to the schematic diagram, he can quickly know that there is a semantic problem in the second service model and perceive the dependency relationship macroscopically, and can The dependency relationship quickly determines that there is a semantic problem in the second service model caused by the change of the first service model, and then assists developers to optimize the second service model according to the change of the first service model to eliminate the semantic problem of the second service model .
  • the developer of the second service model can quickly determine the dependency link about the first service model and the second service model through the visualized schematic diagram, thereby improving the efficiency of eliminating semantic problems of the second service model.
  • the foreseeable problems are the semantic problems that may appear in the service model that the server developers can analyze in advance through experience, for example, the lack of start nodes, the lack of end nodes, and the defined symbols are not used. Solutions to predictable semantic problems can be worked out, etc.
  • the semantic verification result of the second service model is used to indicate that there is a semantic problem in the second service model
  • at least one solution for solving the semantic problem of the second service model may be obtained, and then A solution can be recommended to the developer of the second service model, so that the developer of the second service model can solve the semantic problem of eliminating the second service model as soon as possible according to the solution.
  • developers can avoid manually searching, summarizing and summarizing the solutions for solving the semantic problems of the second service model, and can directly and quickly obtain the solutions for solving the semantic problems of the second service model provided by the server, thereby saving
  • the time spent by developers manually searching, summarizing and summarizing the solutions for solving the semantic problems of the second service model can improve the efficiency of solving the semantic problems of the second service model and reduce labor costs.
  • the solution may include at least one feasible suggestion for solving the semantic problem of the second service model, etc.
  • the solution may be a document, or a paragraph including multiple steps for explaining the semantic problem of the second service model.
  • the present application includes many ways to perform semantic verification on the second service model.
  • the following is an example of the way to perform semantic verification on the second service model. It should be understood that the following methods are only partial
  • the verification method there are other methods for semantic verification of the second service model, which are not listed in this application, and the following methods do not limit the verification method of this application.
  • the symbol itself should not be defined in the second service model, This symbol does not need to be used in the second service model, and the symbol is redundant and redundant in the second service model, which can be regarded as a semantic problem in the second service model.
  • the symbol needs to be used in the second service model, and the symbol is also defined in the second service model, but the developer of the server did not include it in the second service model due to a mistake in the process of developing the second service model.
  • This symbol is referenced in the service model, so that the second service model cannot use the symbol, which may affect the normal operation of the second service model or affect the normal processing of data by the second service model, which can be regarded as a semantic problem in the second service model.
  • process branch 1 there are more than two process branches in the second service model, for example, including process branch 1 and process branch 2, etc., when condition 1 is met, process branch 1 is executed, and when condition 2 is met , execute process branch 2 and so on.
  • the symbol in the first service model is changed, but the symbol is referenced in the second service model and supports the reference to the changed type of the symbol.
  • the type of the symbol is already in the first service model is changed, at this time, it is likely to cause: after the symbol referenced by the second service model is changed, the output data type changes instead of the type that the second service model needs to output, which leads to the second service model
  • the type of data that needs to be output does not match the type of data that is actually output. In this way, there is a semantic problem in the second service model.
  • the type that needs to refer to the symbol is the type of the symbol before the change
  • this causes the type of the symbol that the member needs to refer to in the expression in the second service model to be different from the actual referenced first service If the type of the symbol in the model does not match, the symbol referenced by the member of the expression in the second service model is invalid, so there is a semantic problem in the second service model.
  • the target application includes multiple service models, and the target application involves multiple scopes, each scope involves a part of the service models, and the service models involved in different scopes may be different.
  • step S201 among the scopes involved in the target application, determine the target scope involved in the second service model.
  • the target scope involved in the second service model includes: the scope where the second service model is located, and includes: a scope related to the scope where the second service model is located.
  • the relationship between the scopes can be set in advance by the developer of the server. For example, the scopes of each developed service model are analyzed in advance, and then the actual scenarios of each scope are analyzed to determine the relationship between each scope. Related relationship, and set the related relationship between each scope in the server.
  • scopes include an order domain, a user domain (related services about a user's account), a payment domain, a collection domain, a shopping cart domain, and an instant messaging domain.
  • step S202 the symbol table involved in the target scope is acquired, and the symbol table at least includes: symbols involved in the target scope and types of symbols involved in the target scope.
  • the AST (Abstract Syntax Tree, Abstract Syntax Tree) of each service model involved in the target scope can be obtained respectively, and then the symbol table of each service model is generated respectively according to the AST of each service model.
  • the AST of the service model can be generated in real time, for example, the AST of the service model is generated according to the source code corresponding to the service model, and then the AST of the service model is extracted from the AST of the service model The symbol and symbol type in the service model, and then generate the symbol table of the service model according to the symbol and symbol type in the service model.
  • the symbol table of the model generates a symbol table involved in the target scope, for example, combining the generated symbol tables of each service model into a symbol table involved in the target scope.
  • the server can automatically generate the service model AST, and generate the symbol table of the service model according to the AST of the service model, and then store the symbol table of the service model in the server, so that when the server needs to obtain the symbol table of the service model, it can be directly in The symbol table of the service model stored in the server is obtained, instead of generating the symbol table of the service model in real time, thereby saving time.
  • the symbol table of the first service model after modification is different from the symbol table of the first service model before modification, even if the symbol table of the first service model is stored in the server in advance , stores the symbol table of the first service model before modification, and in this application, the target scope often also involves the first service model, so when obtaining the symbol table of the first service model, the is the symbol table for the changed first service model.
  • the AST of the first service model may be obtained, and then the symbol table of the first service model may be generated according to the AST of the first service model.
  • the target scope is stored in advance on the server.
  • the stored symbol tables of other service models may be directly obtained, so as to save time and improve the efficiency of obtaining symbol tables of other service models.
  • the symbol table of the service model cached in advance can be obtained, and the symbol table of the service model cached in advance is developed on the server side. model is generated and cached. The same is true for every other service model involved in the target scope except the first service model.
  • the symbol table of the first service model after change is different from the symbol table of the first service model before change, in order to obtain the symbol table of the first service model after change
  • the symbol table can save time and improve acquisition efficiency.
  • the symbol table of the first service model is generated according to the AST of the first service model
  • the first service model before the change is cached in the server.
  • the generated symbol table of the first service model is used to replace the cached symbol table of the first service model before the change.
  • the generated symbol table of the first service model is cached in the server.
  • step S203 at least according to the symbol table involved in the target scope, perform symbol type-related semantic verification on the second service model.
  • the AST of the second service model is obtained, wherein the AST of the second service model can be generated in real time, for example, the AST of the second service model is generated according to the source code corresponding to the second service model, or if the AST of the second service model is generated in advance
  • the AST of the second service model is cached in the server (if the developer of the server develops the second service model in advance, the server will generate the AST of the second service model and cache the AST of the second service model in the server) , then the server can obtain the pre-cached AST of the second service model, which can save time, and then compare the AST of the second service model and the symbol table involved in the target scope to perform symbol type-related semantics on the second service model Verify to obtain the semantic verification result of the second service model.
  • the second service model found in the AST of the second service model, the second For any symbol referenced by the service model, the type of the symbol can be determined in the symbol table involved in the target scope.
  • a type-related semantic check is performed on the symbol according to the type of the symbol.
  • the type of the symbol can be determined according to the form of the symbol, and then type-related semantic checks are performed on the symbol according to the type of the symbol .
  • the type of the symbol is determined according to the form of the symbol, in the case that the symbol refers to a member of a structure, the type of the member of the referenced structure is obtained, and according to the type of the member of the referenced structure Determines the type of the symbol, for example, types the referenced structure member as the type of the symbol.
  • the symbol is an expression
  • the operator in the expression is obtained, and the type of the symbol is determined according to the operator in the expression.
  • the type of the content output by the expression can be determined, therefore, the type of the symbol can be determined according to the operator in the expression.
  • the type of the return value of the function is obtained, and the type of the symbol is determined according to the type of the return value of the function, for example, the type of the return value of the function is determined as the type of the symbol.
  • FIG. 3 shows a schematic flowchart of another data processing method of the present application.
  • the method is applied to a terminal, where the method may include the following procedures:
  • step S301 the schematic diagram sent by the server is received; the schematic diagram is used to indicate the dependency relationship and mark the semantic problem of the second service model, and the dependency relationship includes the dependency relationship between the second service model and the first service model; the dependency relationship is a service It is obtained when the end performs semantic verification on the second service model and obtains a semantic verification result indicating that there is a semantic problem in the second service model, and the second service model is included in the first service model in the server.
  • at least one service model that depends on the first service model is found in at least some of the multiple applications in the server; The developed, at least part of the service models included in the application have dependencies among them.
  • step S302 the schematic diagram is rendered.
  • the first service model includes service model A
  • the second service model includes service model B, service model C, service model D, service model E, and service model F.
  • service model B, service model C and service model D directly depend on service model A
  • service model E and service model F directly depend on service model D (equivalent to service model E and service model F indirectly relying on service model A).
  • a schematic diagram can be shown in FIG. 4 .
  • the developer of the second service model can see the schematic diagram on the terminal, and according to the schematic diagram, can quickly know that there is a semantic problem in the second service model and perceive the dependency relationship macroscopically, and can quickly determine based on the perceived dependency relationship Find out that there is a semantic problem in the second service model caused by the change of the first service model, and then assist developers to optimize the second service model according to the change of the first service model, so as to eliminate the semantic problem of the second service model.
  • the developer of the second service model can quickly determine the dependency link about the first service model and the second service model through the visualized schematic diagram, thereby improving the efficiency of eliminating semantic problems of the second service model.
  • the developer can optimize the second service model on the terminal, for example, input the optimization operation of the second service model on the terminal, and receive the In the case of an optimization operation, the second service model may be optimized according to the optimization operation to obtain an optimized second service model, and then the optimized second service model may be submitted to the server.
  • the server receives the optimized second service model submitted by the terminal; performs semantic verification on the optimized second service model, and obtains the semantic verification result of the optimized second service model; the specific verification method can refer to the aforementioned implementation The description of the example will not be described in detail here.
  • the semantic verification result of the optimized second service model is used to indicate that there is no semantic problem in the optimized second service model, sending to the terminal the semantic verification result that the optimized second service model has no semantic problem .
  • the terminal may cancel the mark in the schematic diagram that the optimized second service model has a semantic problem.
  • the semantic problem of making the developer aware of the second service model has been eliminated.
  • the developer can know that there is a semantic problem in the second service model according to the schematic diagram. If the developer needs to optimize one of the second service models, he can input the value of one of the second service models in the schematic diagram.
  • the developer needs to optimize one of the second service models, so that Obtain the source code file of one of the second service models according to the touch operation; for example, obtain the source code file of one of the second service models through interaction with the server, and display the source code of one of the second service models The source code in the file, so that developers can directly modify the source code of one of the second service models, so as to realize the optimization of one of the second service models.
  • the target symbol that causes a semantic problem caused by the changed symbol in the first service model can be determined in one of the second service models; and then can be used in one of the second service models
  • the source code for the target symbol is identified in the model's source code file; the source code for the target symbol is then displayed.
  • the developer can directly obtain the source code of the target symbol and directly modify the source code of the target symbol, avoiding the developer from manually searching for the source code of the target symbol in the source code file in real time, thereby improving efficiency and simplifying the operation of the developer, etc. .
  • FIG. 5 it shows a structural block diagram of a data processing device of the present application, which is applied to a server, and the server has a plurality of applications for providing external services, and each application is at least by means of the server.
  • Multiple service models in the application are developed in the server, and at least some of the service models included in the application have dependencies; the device includes:
  • a search module 11, configured to find, in the server, dependencies on the first service model in at least some of the applications in the plurality of applications when the first service model in the server is changed at least one second service model;
  • the first verification module 12 is configured to perform semantic verification on the second service model for each found second service model, and obtain the semantic verification of the second service model The verification result,
  • an output module 13, configured to output the semantic verification result of the second service model when the semantic verification result of the second service model indicates that there is a semantic problem in the second service model.
  • the search module includes: a first search unit, configured to search the server for at least one target application that uses the first service model; a first determination unit, configured to For each found target application, among multiple service models included in the target application, determine a second service model that depends on the first service model.
  • the search module includes: a second search unit, configured to, in the pre-configured correspondence between the model identifier of the actively dependent service model and the service identifier of the dependent service model, Using the service identifier of the first service model as the service identifier of the dependent service model, searching for the model identifier of the corresponding actively dependent service model; the second determination unit is configured to determine the at least one The second service model; wherein, any one of the corresponding entries in the corresponding relationship, the model identifier of the actively dependent service model and the service identifier of the dependent service model in the corresponding entry are at the server After an application is developed in the developed application and the actively dependent service model is deployed in the developed application, the dependent relationship of the dependent service model is stored in the corresponding relationship.
  • the device further includes: a first acquiring module, configured to, when the semantic verification result of the second service model indicates that there is a semantic problem in the second service model, Obtaining a dependency relationship between the second service model and the first service model; a generating module, configured to generate a schematic diagram indicating the dependency relationship and marking semantic problems in the second service model; the first A sending module, configured to send the schematic diagram to a terminal used by a developer of the second service model.
  • the generating module includes: a first obtaining unit, configured to obtain the changed symbol in the first service model, and determine in the second service model that the The changed symbol causes a target symbol of a semantic problem; a generating unit configured to generate a symbol used to indicate that the target symbol in the second service model depends on the changed symbol in the first service model, and mark A schematic diagram of a semantic problem in the target symbol in the second service model.
  • the device further includes: a second acquiring module, configured to, when the semantic verification result of the second service model indicates that there is a semantic problem in the second service model, Obtaining at least one solution for solving the semantic problem of the second service model; a second sending module, configured to send the solution to a terminal used by a developer of the second service model.
  • the device further includes: a first receiving module, configured to receive an optimized second service model submitted by a terminal; Obtained after optimizing the second service model of the semantic problem; the second verification module is used to perform semantic verification on the optimized second service model, and obtain the semantic verification result of the optimized second service model; the third sending A module, configured to send the optimized second service model no semantic problem to the terminal when the semantic verification result of the optimized second service model is used to indicate that the optimized second service model has no semantic problem Semantic verification results for the question.
  • the first checking module includes: a third determining unit, configured to determine, among the scopes involved in the target application, the target scope involved in the second service model;
  • the second acquiring unit is configured to acquire a symbol table involved in the target scope, the symbol table at least includes: symbols involved in the target scope and types of symbols involved in the target scope;
  • a verification unit It is used for performing symbol type-related semantic check on the second service model according to at least the symbol table involved in the target scope.
  • the verification unit includes: a first verification subunit, configured for any symbol referenced by the second service model, where the symbol refers to a member of a structure
  • the second verification subunit is configured to, for any symbol referenced by the second service model, if the symbol is an expression, obtain the operator in the expression, according to the The operator in the above expression determines the type of the symbol, and performs a type-related semantic check on the symbol according to the type of the symbol
  • the third checking subunit is used for the second service model For any symbol referenced, if the symbol calls a function, obtain the type of the return value of the function, determine the type of the symbol according to the type of the return value of the function, and determine the type of the symbol according to the type of the symbol The symbols perform type-related semantic checks.
  • the first verification module is specifically configured to: detect whether the type of the symbol referenced in the second service model is defined in the target application; and/or, detect the Whether the symbol referenced in the second service model is defined in the target application; and/or, detecting whether the type of the symbol expected to be referenced in the second service model matches the type of the symbol actually referenced; and/or Detecting whether a symbol defined in the second service model is referenced in the second service model; and/or detecting whether a process branch in the second service model has a trigger condition to be executed; and/or Detecting whether the expected output data type in the second service model matches the actual output data type; and/or detecting whether there is a start node and an end node in the second service model; and/or , detecting whether the type of the member in the expression in the second service model matches the type of the member supported by the expression.
  • the real-time performance is poor, it takes a long time, and the labor cost is high, resulting in a long time for the target application to be interrupted to provide services to customers, resulting in poor customer experience and poor tenant experience.
  • the server when the first service model in the server is changed, at least one second service model dependent on the first service model in at least some of the multiple applications is searched in the server. For any second service model found, perform semantic verification on the second service model to obtain the semantic verification result of the second service model, where the semantic verification result of the second service model is used to indicate the second service model If there is a semantic problem in the second service model, output the semantic verification result of the second service model.
  • At least one second service model that depends on the first service model in at least some of the multiple applications can be quickly learned, and semantic verification of each second service model can be performed, so that each second service can be obtained as soon as possible
  • the ability to quickly restore the ability to process online data normally so that applications including the second service model can quickly recover the ability to normally process online data of customers, so that applications including the second service model can quickly recover Provide services to customers, reducing the duration of application interruptions including the second service model to provide services to customers, and improving real-time performance, that is, reducing the length of time that applications including the second service model are delayed in normal processing of online data , improving customer experience as well as tenant experience.
  • the tenant can also execute the process of this solution to verify that the first service model includes Whether the application includes other service models with semantic problems, and if other service models are included, developers can be prompted to optimize other service models, so as to eliminate the semantic problems of other service models, and avoid the occurrence of "tenant generated by other service models In the application scenario, due to semantic problems in other service models, the generated application cannot provide services to customers normally, which can avoid reducing customer experience and tenant experience.
  • the server can check the semantics of the service model, and if there is a semantic problem in the service model, the developer can be prompted Service model optimization, to eliminate the semantic problem of the service model, avoiding the semantic problem in the scenario where the tenant develops the application based on the service model and optimize the service model at that time, so as to avoid the delay of the optimization process at that time.
  • the developer of the server can use the browser on the terminal to receive and view the schematic diagram, and can use the browser on the terminal to optimize the service model in the server without installing the And use specialized development tools, which can improve convenience and reduce the cost of use.
  • tenants can also use a browser to develop applications on the terminal (for example, select the service model in the server and develop the required computer program code by themselves) and view schematic diagrams without installing and using special development tools on the terminal.
  • the convenience can be improved and the use cost can be reduced.
  • FIG. 6 shows a structural block diagram of a data processing device of the present application, which is applied to a terminal, and the device includes:
  • the second receiving module 21 is configured to receive a schematic diagram sent by the server; the schematic diagram is used to indicate a dependency relationship and mark a semantic problem in the second service model, and the dependency relationship includes a relationship between the second service model and the first service model The dependency relationship among them; the dependency relationship is obtained when the server performs semantic verification on the second service model and obtains a semantic verification result indicating that there is a semantic problem in the second service model Yes, the second service model includes when the first service model in the server is changed, look up in at least some of the applications in the server that depend on the first service At least one service model of the model; each application is developed in the server at least by means of multiple service models in the server; at least some of the service models included in the application have dependencies; the rendering module 22, Used to render the schematic.
  • the device further includes: a third acquisition module, configured to, in the case of receiving a touch operation on one of the second service models in the schematic diagram, according to the touch The operation is to obtain the source code file of the one of the second service models; the display module is configured to display the source code in the source code file of the one of the second service models.
  • the display module includes: a fourth determination unit, configured to determine, in the one of the second service models, the semantic problem caused by the changed symbol in the first service model A target symbol; a fifth determining unit, configured to determine the source code of the target symbol in the source code file of the one of the second service models; a display unit, configured to display the source code of the target symbol.
  • the device further includes: an optimization module, configured to, for each second service model, upon receiving an optimization operation for the second service model, according to the optimization operation Optimizing the second service model to obtain an optimized second service model; submitting a module for submitting the optimized second service model to the server; unmarking module for receiving feedback from the server, optimizing In the case of the semantic verification result that the second service model after optimization does not have a semantic problem, cancel the mark in the schematic diagram that the second service model after optimization has a semantic problem.
  • the real-time performance is poor, it takes a long time, and the labor cost is high, resulting in a long time for the target application to be interrupted to provide services to customers, resulting in poor customer experience and poor tenant experience.
  • the server when the first service model in the server is changed, at least one second service model dependent on the first service model in at least some of the multiple applications is searched in the server. For any second service model found, perform semantic verification on the second service model to obtain the semantic verification result of the second service model, where the semantic verification result of the second service model is used to indicate the second service model If there is a semantic problem in the second service model, output the semantic verification result of the second service model.
  • At least one second service model that depends on the first service model in at least some of the multiple applications can be quickly learned, and semantic verification of each second service model can be performed, so that each second service can be obtained as soon as possible
  • the ability to quickly restore the ability to process online data normally so that applications including the second service model can quickly recover the ability to normally process online data of customers, so that applications including the second service model can quickly recover Provide services to customers, reducing the duration of application interruptions including the second service model to provide services to customers, and improving real-time performance, that is, reducing the length of time that applications including the second service model are delayed in normal processing of online data , improving customer experience as well as tenant experience.
  • the tenant can also execute the process of this solution to verify that the first service model includes Whether the application includes other service models with semantic problems, and if other service models are included, developers can be prompted to optimize other service models, so as to eliminate the semantic problems of other service models, and avoid the occurrence of "tenant generated by other service models In the application scenario, due to semantic problems in other service models, the generated application cannot provide services to customers normally, which can avoid reducing customer experience and tenant experience.
  • the server can check the semantics of the service model, and if there is a semantic problem in the service model, the developer can be prompted Service model optimization, to eliminate the semantic problem of the service model, avoiding the semantic problem in the scenario where the tenant develops the application based on the service model and optimize the service model at that time, so as to avoid the delay of the optimization process at that time.
  • the developer of the server can use the browser on the terminal to receive and view the schematic diagram, and can use the browser on the terminal to optimize the service model in the server without installing the And use specialized development tools, which can improve convenience and reduce the cost of use.
  • tenants can also use a browser to develop applications on the terminal (for example, select the service model in the server and develop the required computer program code by themselves) and view schematic diagrams without installing and using special development tools on the terminal.
  • the convenience can be improved and the use cost can be reduced.
  • the embodiment of the present application also provides a non-volatile readable storage medium, and one or more modules (programs) are stored in the storage medium.
  • the device can execute Instructions for each method step in the embodiments of the present application.
  • the embodiments of the present application provide one or more machine-readable media, on which instructions are stored, and when executed by one or more processors, the electronic device executes the method described in one or more of the above embodiments.
  • the electronic device includes a server, a gateway, a sub-device, etc., and the sub-device is an Internet of Things device or the like.
  • Embodiments of the present disclosure can be implemented as an apparatus using any appropriate hardware, firmware, software, or any combination thereof to perform desired configurations, and the apparatus may include servers (clusters), terminal devices such as IoT devices and other electronic devices.
  • servers clusters
  • terminal devices such as IoT devices and other electronic devices.
  • FIG. 7 schematically illustrates an exemplary apparatus 1300 that may be used to implement various embodiments described in this application.
  • FIG. 7 illustrates an exemplary apparatus 1300 having one or more processors 1302, a control module (chipset) 1304 coupled to at least one of the processor(s) 1302 , memory 1306 coupled to control module 1304, non-volatile memory (NVM)/storage device 1308 coupled to control module 1304, one or more input/output devices 1310 coupled to control module 1304, and Coupled to the network interface 1312 of the control module 1304 .
  • processors 1302 a control module (chipset) 1304 coupled to at least one of the processor(s) 1302 , memory 1306 coupled to control module 1304, non-volatile memory (NVM)/storage device 1308 coupled to control module 1304, one or more input/output devices 1310 coupled to control module 1304, and Coupled to the network interface 1312 of the control module 1304 .
  • NVM non-volatile memory
  • the processor 1302 may include one or more single-core or multi-core processors, and the processor 1302 may include any combination of general-purpose processors or special-purpose processors (such as graphics processors, application processors, baseband processors, etc.).
  • the apparatus 1300 can serve as a server device such as a gateway in the embodiments of this application.
  • apparatus 1300 may include one or more computer-readable media (e.g., memory 1306 or NVM/storage 1308) having instructions 1314 and in combination with the one or more computer-readable media configured to The one or more processors 1302 execute instructions 1314 to implement modules to perform the actions described in this disclosure.
  • computer-readable media e.g., memory 1306 or NVM/storage 1308
  • the one or more processors 1302 execute instructions 1314 to implement modules to perform the actions described in this disclosure.
  • control module 1304 may include any suitable interface controller to provide any suitable Interface.
  • the control module 1304 may include a memory controller module to provide an interface to the memory 1306 .
  • a memory controller module may be a hardware module, a software module and/or a firmware module.
  • Memory 1306 may be used, for example, to load and store data and/or instructions 1314 for apparatus 1300 .
  • memory 1306 may comprise any suitable volatile memory, such as suitable DRAM.
  • memory 1306 may include Double Data Rate Quad Synchronous Dynamic Random Access Memory (DDR4 SDRAM).
  • DDR4 SDRAM Double Data Rate Quad Synchronous Dynamic Random Access Memory
  • control module 1304 may include one or more input/output controllers to provide interfaces to NVM/storage device(s) 1308 and input/output device(s) 1310 .
  • NVM/storage 1308 may be used to store data and/or instructions 1314 .
  • NVM/storage 1308 may include any suitable non-volatile memory (e.g., flash memory) and/or may include any suitable non-volatile storage device(s) (e.g., one or more hard drives (HDD), one or more compact disc (CD) drives, and/or one or more digital versatile disc (DVD) drives).
  • suitable non-volatile memory e.g., flash memory
  • suitable non-volatile storage device(s) e.g., one or more hard drives (HDD), one or more compact disc (CD) drives, and/or one or more digital versatile disc (DVD) drives.
  • HDD hard drives
  • CD compact disc
  • DVD digital versatile disc
  • NVM/storage 1308 may include storage resources that are physically part of the device on which apparatus 1300 is installed, or may not necessarily be part of the device that are accessible by the device. For example, NVM/storage 1308 may be accessed over a network via input/output device(s) 1310 .
  • the input/output device(s) 1310 may provide an interface for the apparatus 1300 to communicate with any other suitable device, and the input/output device 1310 may include a communication component, a pinyin component, a sensor component, and the like.
  • Network interface 1312 may provide an interface for device 1300 to communicate over one or more networks, and device 1300 may communicate with one or more wireless networks according to any of one or more wireless network standards and/or protocols.
  • Components communicate wirelessly, such as accessing wireless networks based on communication standards, such as WiFi, 2G, 3G, 4G, 5G, etc., or a combination of them for wireless communication.
  • At least one of the processor(s) 1302 may be packaged with the logic of one or more controllers of the control module 1304 (eg, a memory controller module). For one embodiment, at least one of the processor(s) 1302 may be packaged with the logic of one or more controllers of the control module 1304 to form a system-in-package (SiP). For one embodiment, at least one of the processor(s) 1302 may be integrated on the same die as the logic of the one or more controllers of the control module 1304 . For one embodiment, at least one of the processor(s) 1302 may be integrated on the same die with the logic of the one or more controllers of the control module 1304 to form a system on chip (SoC).
  • SoC system on chip
  • the apparatus 1300 may be, but not limited to, a terminal device such as a server, a desktop computing device, or a mobile computing device (eg, a laptop computing device, a handheld computing device, a tablet computer, a netbook, etc.).
  • device 1300 may have more or fewer components and/or a different architecture.
  • device 1300 includes one or more cameras, a keyboard, a liquid crystal display (LCD) screen (including a touchscreen display), a non-volatile memory port, multiple antennas, a graphics chip, an application-specific integrated circuit ( ASIC) and speakers.
  • LCD liquid crystal display
  • ASIC application-specific integrated circuit
  • An embodiment of the present application provides an electronic device, including: one or more processors; and one or more machine-readable media having instructions stored thereon, when executed by the one or more processors, The electronic device is caused to perform one or more of the methods described in this application.
  • the description is relatively simple, and for related parts, please refer to the part of the description of the method embodiment.
  • Embodiments of the present application are described with reference to flowcharts and/or block diagrams of methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions can be provided to a general-purpose computer, special purpose computer, embedded processor or processor of other programmable information processing terminal equipment to produce a machine, so that the instructions executed by the computer or other programmable information processing terminal equipment Produce means for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
  • These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable information processing terminal to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the The instruction means implements the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

Abstract

A data processing method and apparatus. The method comprises: if a first service model in a server is changed, searching the server for a second service model in at least some of a plurality of applications, which second service model depends on the first service model; and performing semantic verification on the second service model, so as to obtain a semantic verification result of the second service model, and when the semantic verification result of the second service model is used for indicating that the second service model has a semantic problem, outputting the semantic verification result of the second service model to optimize the second service model in a timely manner, so as to eliminate the semantic problem of the second service model. Therefore, an application that comprises a second service model can quickly recover to provide a service for a client, and the duration of an interruption of service provision for the client by the application that comprises the second service model is reduced, thereby improving the customer experience and the tenant experience. In addition, the verification process can be implemented without participation of people, such that the labor cost can be reduced.

Description

一种数据处理方法及装置A data processing method and device
本申请要求于2021年12月8日提交中国专利局、申请号为202111493127.8、发明名称为“一种数据处理方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202111493127.8 and the title of the invention "a data processing method and device" filed with the China Patent Office on December 8, 2021, the entire contents of which are incorporated by reference in this application .
技术领域technical field
本申请涉及新一代信息技术领域,特别是涉及一种数据处理方法及装置。The present application relates to the field of new generation information technology, in particular to a data processing method and device.
背景技术Background technique
随着技术的飞速发展,服务端得到了快速发展,开发人员可以在服务端中部署大量的服务模型,以供租户租用,并根据租用的服务模型以及租户自行开发的代码生成应用,然后可以基于应用对外提供服务。With the rapid development of technology, the server has developed rapidly. Developers can deploy a large number of service models in the server for tenants to rent, and generate applications based on the rented service model and the code developed by the tenant, and then based on The application provides external services.
例如,在租户需要为广大客户提供服务时,可以确定客户的线上数据所涉及的应用中的服务模型,然后在服务端中调用服务模型处理客户的线上数据,以实现为客户提供服务。For example, when a tenant needs to provide services to a large number of customers, it can determine the service model in the application involved in the customer's online data, and then call the service model in the server to process the customer's online data, so as to provide services for customers.
发明内容Contents of the invention
本申请示出了一种数据处理方法及装置。This application shows a data processing method and device.
第一方面,本申请示出了一种数据处理方法,应用于服务端,所述服务端中具有用于对外提供服务的多个应用,各个应用分别是至少借助所述服务端中的多个服务模型在所述服务端中开发的,应用中包括的至少部分服务模型之间具有依赖关系;所述方法包括:在所述服务端中的第一服务模型被变更的情况下,在所述服务端中查找在所述多个应用中的至少部分应用中的依赖所述第一服务模型的至少一个第二服务模型;对于查找到的每一个第二服务模型,对所述第二服务模型进行语义校验,得到所述第二服务模型的语义校验结果,在所述第二服务模型的语义校验结果用于指示所述第二服务模型存在语义问题的情况下,输出所述第二服务模型的语义校验结果。In the first aspect, the present application shows a data processing method, which is applied to a server. The server has multiple applications for providing external services, and each application uses at least one of the multiple applications in the server. The service model is developed in the server, and at least part of the service models included in the application have dependencies; the method includes: when the first service model in the server is changed, in the Find at least one second service model that depends on the first service model in at least some of the multiple applications in the server; for each found second service model, the second service model Perform semantic verification to obtain a semantic verification result of the second service model, and output the first Semantic verification results of the two-service model.
第二方面,本申请示出了一种数据处理方法,应用于终端,所述方法包括:接收服务端发送的示意图;所述示意图用于指示依赖关系且标记第二服务模型存在语义问题,所述依赖关系包括所述第二服务模型以及第一服务模型之间的依赖关系;所述依赖关系是所述服务端在对所述第二服务模型进行语义校验,并得到用于指示所述第二服务模型存在语义问题的语义校验结果的情况下获取的,所述第二服务模型包括在所述服务端中的第一服务模型被变更的情况下,在所述服务端中的多个应用中的至少部分应用中查找的依赖所述第一服务模型的至少一个服务模型;各个应用分别是至少借助所述服务端中的多个服务模型在所述服务端中开发的;应用中包括的至少部分服务模型之间具有依赖关系;渲染所述示意图。In a second aspect, the present application shows a data processing method, which is applied to a terminal, and the method includes: receiving a schematic diagram sent by a server; the schematic diagram is used to indicate a dependency relationship and mark a semantic problem in the second service model, so The dependency relationship includes the dependency relationship between the second service model and the first service model; the dependency relationship is that the server performs semantic verification on the second service model and obtains the Acquired when the semantic verification result of the second service model has a semantic problem, and the second service model includes when the first service model in the server is changed, multiple At least one service model that depends on the first service model found in at least some of the applications; each application is developed in the server by at least using multiple service models in the server; in the application At least some of the included service models have dependencies among them; and the schematic diagram is rendered.
第三方面,本申请示出了一种数据处理装置,应用于服务端,所述服务端中具有用于对外提供服务的多个应用,各个应用分别是至少借助所述服务端中的多个服务模型在所述服务端中开发的,应用中包括的至少部分服务模型之间具有依赖关系;所述装置包括:查找模块,用于在所述服务端中的第一服务模型被变更的情况下,在所述服务端中查找在所述多个应用中的至少部分应用中的依赖所述第一服务模型的至少一个第二服务模型;第一 校验模块,用于对于查找到的每一个第二服务模型,对所述第二服务模型进行语义校验,得到所述第二服务模型的语义校验结果,输出模块,用于在所述第二服务模型的语义校验结果用于指示所述第二服务模型存在语义问题的情况下,输出所述第二服务模型的语义校验结果。In a third aspect, the present application shows a data processing device, which is applied to a server, and the server has multiple applications for providing external services, and each application uses at least one of the multiple applications in the server. The service model is developed in the server, and at least part of the service models included in the application have dependencies; the device includes: a search module, used for the case where the first service model in the server is changed Next, search for at least one second service model that depends on the first service model in at least some of the applications in the plurality of applications in the server; the first checking module is configured to, for each found A second service model, performing semantic verification on the second service model to obtain the semantic verification result of the second service model, and an output module for using the semantic verification result of the second service model in In a case where it is indicated that there is a semantic problem in the second service model, a semantic verification result of the second service model is output.
第四方面,本申请示出了一种数据处理装置,应用于终端,所述装置包括:第二接收模块,用于接收服务端发送的示意图;所述示意图用于指示依赖关系且标记第二服务模型存在语义问题,所述依赖关系包括所述第二服务模型以及第一服务模型之间的依赖关系;所述依赖关系是所述服务端在对所述第二服务模型进行语义校验,并得到用于指示所述第二服务模型存在语义问题的语义校验结果的情况下获取的,所述第二服务模型包括在所述服务端中的第一服务模型被变更的情况下,在所述服务端中的多个应用中的至少部分应用中查找的依赖所述第一服务模型的至少一个服务模型;各个应用分别是至少借助所述服务端中的多个服务模型在所述服务端中开发的;应用中包括的至少部分服务模型之间具有依赖关系;渲染模块,用于渲染所述示意图。In a fourth aspect, the present application shows a data processing device, which is applied to a terminal, and the device includes: a second receiving module, configured to receive a schematic diagram sent by the server; the schematic diagram is used to indicate dependencies and mark the second There is a semantic problem in the service model, and the dependency relationship includes the dependency relationship between the second service model and the first service model; the dependency relationship is that the server is performing semantic verification on the second service model, and obtained when the semantic verification result indicating that there is a semantic problem in the second service model is obtained, when the first service model included in the second service model in the server is changed, in At least one service model that depends on the first service model found in at least some of the multiple applications in the server; Developed in the terminal; at least some service models included in the application have dependencies; a rendering module is used for rendering the schematic diagram.
第五方面,本申请示出了一种电子设备,所述电子设备包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为执行如前述的任一方面所示的方法。In a fifth aspect, the present application shows an electronic device, the electronic device comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to perform any of the foregoing aspects method shown.
第六方面,本申请示出了一种非临时性计算机可读存储介质,当所述存储介质中的指令由电子设备的处理器执行时,使得电子设备能够执行如前述的任一方面所示的方法。In the sixth aspect, the present application shows a non-transitory computer-readable storage medium. When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device can execute the Methods.
第七方面,本申请示出了一种计算机程序产品,当所述计算机程序产品中的指令由电子设备的处理器执行时,使得电子设备能够执行如前述的任一方面所示的方法。In a seventh aspect, the present application shows a computer program product. When the instructions in the computer program product are executed by the processor of the electronic device, the electronic device can execute the method as shown in any one of the foregoing aspects.
与相关技术相比,本申请包括以下优点:Compared with related technologies, the present application includes the following advantages:
其中,在租户的应用已经发布之后,在服务端的开发人员根据实际需求对服务端中已开发的第一服务模型更改的情况下,若由于第一服务模型被更改而引发第二服务模型存在语义问题,则很可能导致第二服务模型无法正常处理线上数据,进而导致目标应用无法正常处理线上数据,进而无法正常为客户提供服务。Among them, after the tenant's application has been released, if the developer of the server changes the first service model developed in the server according to actual needs, if the second service model has semantics due to the change of the first service model If there is a problem, it is likely to cause the second service model to be unable to process online data normally, which in turn will cause the target application to be unable to process online data normally, and thus cannot provide services to customers normally.
往往需要经过较长时间,租户或者服务端的开发人员才能得到目标应用无法正常为客户提供服务的现状,这样,之后才会人工校验导致目标应用无法正常为客户提供服务的原因,之后才可能知道是第二服务模型存在语义问题,然后才可能知道是由于第一服务模型被变更而引发第二服务模型存在语义问题,从而推导出由于第二服务模型存在语义问题而导致第二服务模型无法正常处理线上数据,进而导致目标应用无法正常处理线上数据,进而无法正常为客户提供服务,然后开发人员才会对第二服务模型优化,解决目标应用无法正常处理线上数据的问题。It often takes a long time for tenants or server developers to get the status quo that the target application cannot provide services to customers normally. In this way, the reason why the target application cannot provide services to customers will be manually verified later, and then it may be known. It is the second service model that has a semantic problem, and then it is possible to know that the second service model has a semantic problem due to the change of the first service model, so it is deduced that the second service model cannot work normally due to the semantic problem of the second service model Processing online data, which leads to the inability of the target application to process online data normally, and thus cannot provide services to customers normally, and then developers will optimize the second service model to solve the problem that the target application cannot process online data normally.
但是,上述情况中,实时性差,耗费时长较长,且人工成本较高,导致目标应用中断对客户提供服务的时长较长,客户体验差且租户体验也差。However, in the above situation, the real-time performance is poor, it takes a long time, and the labor cost is high, resulting in a long time for the target application to be interrupted to provide services to customers, resulting in poor customer experience and poor tenant experience.
而在本申请中,在服务端中的第一服务模型被变更的情况下,在服务端中查找在多个应用中的至少部分应用中的依赖第一服务模型的至少一个第二服务模型。对于查找到的任意一个第二服务模型,对该第二服务模型进行语义校验,得到该第二服务模型的语义校验结果,在该第二服务模型的语义校验结果用于指示该第二服务模型存在语义问题的情况下,输出该第二服务模型的语义校验结果。However, in this application, when the first service model in the server is changed, at least one second service model dependent on the first service model in at least some of the multiple applications is searched in the server. For any second service model found, perform semantic verification on the second service model to obtain the semantic verification result of the second service model, where the semantic verification result of the second service model is used to indicate the second service model If there is a semantic problem in the second service model, output the semantic verification result of the second service model.
通过本申请的方案可以迅速获知多个应用中的至少部分应用中的依赖第一服务模型 的至少一个第二服务模型,并对各个第二服务模型进行语义校验,可以尽快得到各个第二服务模型是否存在语义问题的语义校验结果,在某一个第二服务模型存在语义问题时可以及时对该第二服务模型优化,以消除该第二服务模型的语义问题,从而使得该第二服务模型能够快速恢复具有正常处理线上数据的能力,使得包括该第二服务模型的应用可以更快恢复出能够正常处理客户的线上数据的能力,进而使得包括该第二服务模型的应用能够快速恢复为客户提供服务,减少了包括该第二服务模型的应用中断对客户提供服务的时长,提高了实时性,也即,减少了包括该第二服务模型的应用被耽误正常处理线上数据的时长,提高了客户体验以及租户体验。另外,校验过程中可以没有人的参与,从而可以降低人工成本。Through the solution of the present application, at least one second service model that depends on the first service model in at least some of the multiple applications can be quickly learned, and semantic verification of each second service model can be performed, so that each second service can be obtained as soon as possible The semantic verification result of whether the model has semantic problems, when a certain second service model has semantic problems, the second service model can be optimized in time to eliminate the semantic problems of the second service model, so that the second service model The ability to quickly restore the ability to process online data normally, so that applications including the second service model can quickly recover the ability to normally process online data of customers, so that applications including the second service model can quickly recover Provide services to customers, reducing the duration of application interruptions including the second service model to provide services to customers, and improving real-time performance, that is, reducing the length of time that applications including the second service model are delayed in normal processing of online data , improving customer experience as well as tenant experience. In addition, there may be no human participation in the verification process, thereby reducing labor costs.
其次,租户借助服务端中的服务模型开发应用的过程中,只要服务端中的第一服务模型被变更,则也可以执行本方案的流程,以通过本方案校验出包括第一服务模型中的应用是否包括存在语义问题的其他服务模型,并在包括其他服务模型的情况下可以提示开发人员对其他服务模型优化,以消除其他服务模型的语义问题,避免之后出现“租户借助其他服务模型生成应用的场景下由于其他服务模型存在语义问题而导致生成的应用无法正常为客户提供服务”的情况发生,进而可以避免降低客户体验以及租户体验。Secondly, in the process of developing applications by means of the service model in the server, as long as the first service model in the server is changed, the tenant can also execute the process of this solution to verify that the first service model includes Whether the application includes other service models with semantic problems, and if other service models are included, developers can be prompted to optimize other service models, so as to eliminate the semantic problems of other service models, and avoid the occurrence of "tenant generated by other service models In the application scenario, due to semantic problems in other service models, the generated application cannot provide services to customers normally, which can avoid reducing customer experience and tenant experience.
另一方面,在开发人员在服务端中开发出一个服务模型之后,服务端就可以对服务模型进行语义校验,在该一个服务模型存在语义问题的情况下,就可以提示开发人员对该一个服务模型优化,以消除该一个服务模型的语义问题,避免之后在租户根据该一个服务模型开发应用的场景下才发现该语义问题并在届时优化该一个服务模型,进而可以避免届时的优化过程耽误租户开发应用的进程。On the other hand, after the developer develops a service model in the server, the server can check the semantics of the service model, and if there is a semantic problem in the service model, the developer can be prompted Service model optimization, to eliminate the semantic problem of the service model, avoiding the semantic problem in the scenario where the tenant develops the application based on the service model and optimize the service model at that time, so as to avoid the delay of the optimization process at that time The process by which tenants develop applications.
又一方面,在本申请中,服务端的开发人员可以在终端上使用浏览器接收示意图并查看示意图,以及,可以在终端上使用浏览器对服务端中的服务模型优化,不需要在终端上安装并使用专门的开发工具,从而可以提高便利性以及降低使用成本。On the other hand, in this application, the developer of the server can use the browser on the terminal to receive and view the schematic diagram, and can use the browser on the terminal to optimize the service model in the server without installing the And use specialized development tools, which can improve convenience and reduce the cost of use.
另外,租户也可以在终端上使用浏览器开发应用(例如,选择服务端中的服务模型以及自行开发需要的计算机程序代码)以及查看示意图,不需要在终端上安装并使用专门的开发工具,从而可以提高便利性以及降低使用成本。In addition, tenants can also use a browser to develop applications on the terminal (for example, select the service model in the server and develop the required computer program code by themselves) and view schematic diagrams without installing and using special development tools on the terminal. The convenience can be improved and the use cost can be reduced.
附图说明Description of drawings
图1是本申请的一种数据处理方法的步骤流程图。FIG. 1 is a flow chart of the steps of a data processing method of the present application.
图2是本申请的另一种数据处理方法的步骤流程图。Fig. 2 is a flowchart of steps of another data processing method of the present application.
图3是本申请的再一种数据处理方法的步骤流程图。FIG. 3 is a flow chart of steps in yet another data processing method of the present application.
图4是本申请的一种示意图。Fig. 4 is a schematic diagram of the present application.
图5是本申请的一种数据处理装置的结构框图。Fig. 5 is a structural block diagram of a data processing device of the present application.
图6是本申请的另一种数据处理装置的结构框图。Fig. 6 is a structural block diagram of another data processing device of the present application.
图7是本申请的一种装置的结构框图。Fig. 7 is a structural block diagram of a device of the present application.
具体实施方式Detailed ways
为使本申请的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本申请作进一步详细的说明。In order to make the above objects, features and advantages of the present application more obvious and comprehensible, the present application will be further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
在本申请中,服务端中具有用于对外提供服务的多个应用,各个应用分别是至少借助服务端中的多个服务模型在服务端中开发的,应用中的至少部分服务模型之间具有依赖关系。In this application, the server has multiple applications for providing external services, and each application is developed on the server at least by means of multiple service models in the server, and at least some of the service models in the applications have dependencies.
例如,服务端的开发人员在服务端中开发了大量的服务模型。不同的服务模型的功能不同。For example, developers of the server side develop a large number of service models in the server side. Different service models function differently.
租户可以借助服务端中的服务模型来开发应用,并基于应用对广大客户提供服务,其中,应用中的这些服务模型之间可以具有依赖关系。不同的租户均可以借助服务端中的服务模型生成各自的应用,并基于各自的应用对广大客户提供服务。Tenants can develop applications by means of service models in the server, and provide services to customers based on the applications, wherein the service models in the applications may have dependencies. Different tenants can use the service model in the server to generate their own applications, and provide services to customers based on their respective applications.
例如,租户可以根据自己的实际需求在服务端中挑选一些服务模型,其次还可以根据自己的实际情况开发一些自己需要的计算机程序代码,开发的计算机程序代码也可以作为服务模型,例如,租户需要自己的应用中具有一些自己需要的功能,但是服务端中提供的服务模型无法实现这些功能,则租户就可以自行开发计算机程序代码,以通过自行开发的计算机程序代码实现这些功能,其中,实现一个功能的计算机程序代码也可以看作一个服务模型。For example, tenants can choose some service models in the server according to their actual needs, and secondly, they can develop some computer program codes they need according to their actual conditions. The developed computer program codes can also be used as service models. For example, tenants need There are some functions that they need in their own applications, but the service model provided by the server cannot realize these functions, then the tenant can develop computer program codes by themselves to realize these functions through the self-developed computer program codes, among which, a Functional computer program code can also be viewed as a service model.
如此,对于租户而言,就具有了在服务端中挑选的服务模型以及自行开发的服务模型。然后根据在服务端中挑选的服务模型以及自行开发的服务模型可以生成应用。应用中的包括的服务模型中,至少部分服务模型之间具有依赖关系,或者,全部的服务模型之间具有依赖关系。In this way, for tenants, there are service models selected in the server and self-developed service models. Then the application can be generated according to the service model selected in the server and the self-developed service model. Among the service models included in the application, at least some of the service models have a dependency relationship, or all the service models have a dependency relationship.
在一个例子中,应用中的服务模型之间具有多层的依赖关系。In one example, there are multiple layers of dependencies between service models in an application.
在租户需要处理客户的线上数据的情况下,可以根据应用中的服务模型之间的依赖关系,在服务端中依次调用应用中的服务模型,并基于调用的服务模型处理线上处理,以实现对客户提供服务。When the tenant needs to process the customer's online data, the service model in the application can be invoked sequentially on the server according to the dependencies between the service models in the application, and the online processing can be processed based on the invoked service model, so as to Achieve service to customers.
其中,有时候,服务端的开发人员根据实际需求可能需要对在服务端中已开发的某一服务模型变更,例如,在该服务模型中改变了某一个符号或者删除了某一个符号。Wherein, sometimes, the developer of the server may need to change a certain service model developed in the server according to actual needs, for example, a certain symbol is changed or deleted in the service model.
然而,在租户开发的一些应用中可能具有该服务模型以及依赖具有该某一个符号的该服务模型的另一个服务模型。However, in some applications developed by tenants there may be this service model and another service model that depends on this service model with that certain notation.
这样,应用中的依赖具有该某一个符号的该服务模型的另一个服务模型可能会出现语义问题。In this way, another service model in the application that depends on the service model with the certain symbol may have semantic problems.
如果应用中的依赖具有该某一个符号的该服务模型的另一个服务模型出现语义问题,则可能会导致应用无法正常处理客户的线上数据,导致应用无法正常对广大客户提供服务,这样会降低客户体验以及租户的体验。If there is a semantic problem in another service model that relies on the service model with the certain symbol in the application, it may cause the application to fail to process the customer's online data normally, resulting in the application not being able to provide services to the majority of customers normally, which will reduce the Customer experience as well as tenant experience.
为了避免上述情况发生,在一个方式中,在应用无法正常处理客户的线上数据的情况下,应用会报错,用于指示应用出错,开发人员在感知到应用的报错之后,才会着手解决报错的问题,但是,由于事先并未记录关于更改的服务模型的相关日志,因此,开发人员仅仅根据应用的报错无法确定出“应用无法正常处理客户的线上数据”的真实原因,在无法得到真实原因的情况下,就无法解决“应用无法正常处理客户的线上数据”的问题。In order to avoid the above situation, in one way, when the application cannot process the customer's online data normally, the application will report an error to indicate the application error, and the developer will start to solve the error report after sensing the application error report However, since no relevant logs about the changed service model were recorded in advance, the developers could not determine the real cause of "the application cannot process the customer's online data normally" based on the application's error report. If there is no reason, the problem of "the application cannot process the customer's online data normally" cannot be solved.
因此,开发人员需要人工分析应用中包括哪些服务模型以及服务模型之间的依赖关系,然后人工校验应用中的各个服务模型的源代码,并根据服务模型之间的依赖关系以及各个服务模型的源代码人工分析“应用无法正常处理客户的线上数据”的真实原因,然后 再根据真实原因对应用手动优化,以解决“应用无法正常处理客户的线上数据”的问题。Therefore, developers need to manually analyze which service models are included in the application and the dependencies between the service models, and then manually verify the source code of each service model in the application, and according to the dependencies between the service models and the dependencies of each service model The source code manually analyzes the real reason of "the application cannot process the customer's online data normally", and then manually optimizes the application according to the real reason to solve the problem of "the application cannot process the customer's online data normally".
但是,在上述方式中,需要人工参与,人工成本高。However, in the above method, manual participation is required, and the labor cost is high.
其次,上述方式中的逻辑链路包括:一个服务模型被更改-应用无法正常处理客户的线上数据-应用报错-开发人员感知报错-人工分析真实原因-手动优化应用,由于逻辑链路较长,使得一个服务模型被更改而导致应用无法正常处理客户的线上数据之后,需要耗费较长时间才能解决应用无法正常处理客户的线上数据的问题,解决效率低。导致应用中断对客户提供服务的时长较长,客户体验差且租户体验也差。Secondly, the logical link in the above method includes: a service model is changed - the application cannot process the customer's online data normally - the application reports an error - the developer perceives the error - manually analyzes the real reason - manually optimizes the application, due to the long logical link , After a service model is changed and the application cannot process the customer's online data normally, it will take a long time to solve the problem that the application cannot process the customer's online data normally, and the solution efficiency is low. As a result, application interruptions take a long time to provide services to customers, resulting in poor customer experience and poor tenant experience.
因此,提出了“降低人工成本,提高一个服务模型被更改而导致应用无法正常处理客户的线上数据之后,解决应用无法正常处理客户的线上数据的问题的效率,降低应用中断对客户提供服务的时长,提高客户体验且租户体验”的需求。Therefore, it is proposed to "reduce labor costs, improve the efficiency of solving the problem that the application cannot normally process the customer's online data after a service model is changed and the application cannot process the customer's online data normally, and reduce application interruption to provide services to customers." The length of time, improve customer experience and tenant experience" demand.
为了满足上述需求,发明人对上述方式分析之后,得出一个结论:上述方式是在一个服务模型被更改而导致应用无法正常处理客户的线上数据(也即出问题之后)才开始人工校验。In order to meet the above requirements, after analyzing the above method, the inventor came to a conclusion: the above method starts manual verification only after a service model is changed so that the application cannot process the customer's online data normally (that is, after a problem occurs). .
发明人在分析后得到至少一个方案:摒弃上述方式的思路,可以在一个服务模型被更改之后,不等待应用是否能够正常处理客户的线上数据,就可以即刻开始对被更改的服务模型相关的服务模型进行校验,且可以是自动化地校验,在校验出存在语义问题的服务模型的情况下立刻提示开发人员优化存在语义问题的语义模型,从而可以降低人工成本,且提高解决问题的效率。After the analysis, the inventor obtained at least one solution: abandoning the idea of the above-mentioned method, after a service model is changed, it is possible to immediately start the service model related to the change without waiting for whether the application can process the customer's online data normally. The service model can be verified, and it can be automatically verified. When the service model with semantic problems is verified, the developer is immediately prompted to optimize the semantic model with semantic problems, which can reduce labor costs and improve the problem-solving efficiency. efficiency.
具体地,参照图1,示出了本申请的一种数据处理方法的流程示意图。该方法应用于服务端,服务端中具有用于对外提供服务的多个应用,各个应用分别是至少借助服务端中的多个服务模型在服务端中开发的,应用中包括的至少部分服务模型之间具有依赖关系,其中,该方法可以包括如下流程:Specifically, referring to FIG. 1 , it shows a schematic flowchart of a data processing method of the present application. The method is applied to the server. The server has multiple applications for providing external services. Each application is developed on the server by at least using multiple service models in the server. The application includes at least part of the service models. There is a dependency relationship between them, where the method can include the following processes:
在步骤S101中,在服务端中的第一服务模型被变更的情况下,在服务端中查找在多个应用中的至少部分应用中的依赖第一服务模型的至少一个第二服务模型。In step S101, when the first service model in the server is changed, at least one second service model dependent on the first service model in at least some of the multiple applications is searched in the server.
第二服务模型可以为一个,也可以为多个。There can be one second service model, or there can be multiple ones.
在第二服务模型为多个的情况下,第二服务模型可以均分别直接依赖第一服务模型。或者,也可以一部分第二服务模型直接依赖第一服务模型,另一部分服务模型直接依赖该一部分第二服务模型,例如,第二服务模型1依赖第一服务模型,第二服务模型2依赖第二服务模型1,进一步地,第二服务模型3还可以依赖第二服务模型2等。In a case where there are multiple second service models, the second service models may all directly depend on the first service model. Alternatively, a part of the second service model may directly depend on the first service model, and another part of the service model may directly depend on the part of the second service model. For example, the second service model 1 depends on the first service model, and the second service model 2 depends on the second service model. Service model 1, further, the second service model 3 may also depend on the second service model 2 and so on.
在本申请一个实施例中,本步骤可以通过如下流程实现,包括:In an embodiment of the present application, this step can be implemented through the following process, including:
11)、在服务端中查找使用第一服务模型的至少一个目标应用。11). Find at least one target application using the first service model in the server.
在本申请中,对于服务端而言,可以定期或者实时检测服务端的开发人员在服务端中已开发的服务模型是否被变更。In this application, for the server, it can be detected regularly or in real time whether the service model developed by the developer of the server has been changed.
在服务端中的第一服务模型被变更的情况下,在服务端中查找使用第一服务模型的目标应用。When the first service model in the server is changed, search for a target application using the first service model in the server.
其中,第一服务模型为服务端的开发人员在服务端中已开发的多个服务模型一个或两个以上的被变更的服务模型。Wherein, the first service model is a changed service model of one or more than two service models developed in the server by the developer of the server.
另外,各个租户在服务端中开发的各个应用中均包括服务端中的至少部分服务模型,且各个应用中包括的服务端中的服务模型不尽相同。In addition, each application developed by each tenant on the server includes at least part of the service models on the server, and the service models on the server included in each application are different.
有些应用中使用了第一服务模型,有些应用中未使用第一服务模型。Some applications use the first service model, and some applications do not use the first service model.
第一服务模型被变更会导致使用第一服务模型的应用可能无法正常运行,而往往不会导致未使用第一服务模型的应用无法正常运行。The change of the first service model may cause the applications using the first service model to be unable to run normally, but usually will not cause the applications not using the first service model to be unable to run normally.
因此,在本申请中,在第一服务模型被变更的情况下,需要关心的对象往往是使用第一服务模型的应用,而可以不关心未使用第一服务模型的应用。Therefore, in this application, when the first service model is changed, the objects that need to be cared about are often the applications that use the first service model, and the applications that do not use the first service model may not be concerned.
所以,在本申请中,在服务端中的第一服务模型被变更的情况下,可以在服务端中查找使用第一服务模型的至少一个目标应用,然后执行步骤12)。Therefore, in this application, when the first service model in the server is changed, at least one target application using the first service model can be searched in the server, and then step 12) is performed.
12)、对于查找到的每一个目标应用,在目标应用中包括的多个服务模型中,确定依赖第一服务模型的第二服务模型。12) For each found target application, among multiple service models included in the target application, determine a second service model that depends on the first service model.
在本申请中,目标应用中包括第一服务模型,其次,在目标应用中包括的除第一服务模型以外的其他服务模型中,往往存在依赖第一服务模型的至少一个服务模型。In this application, the target application includes the first service model, and secondly, among service models other than the first service model included in the target application, there often exists at least one service model that depends on the first service model.
也即,在目标应用中包括的服务模型中,至少一个服务模型依赖(包括直接依赖以及间接依赖等)了第一服务模型,由于第一服务模型被变更,则依赖第一服务模型的至少一个服务模型可能存在语义问题,导致依赖第一服务模型的至少一个服务模型可能无法正常运行,进而导致应用可能无法正常运行。That is, among the service models included in the target application, at least one service model depends (including direct dependence and indirect dependence, etc.) on the first service model, and since the first service model is changed, it depends on at least one of the first service models There may be a semantic problem in the service model, so that at least one service model that depends on the first service model may not run normally, and thus the application may not run normally.
因此,需要在目标应用中包括的多个服务模型中,确定依赖第一服务模型的第二服务模型,然后执行步骤S102。Therefore, among multiple service models included in the target application, it is necessary to determine the second service model that depends on the first service model, and then perform step S102.
在本申请一个实施例中,在本申请一个实施例中,本步骤可以通过如下流程实现,包括:In one embodiment of the present application, in one embodiment of the present application, this step can be implemented through the following process, including:
21)、在事先配置的主动依赖的服务模型的模型标识与被依赖的服务模型的服务标识之间的对应关系中,以第一服务模型的服务标识作为被依赖的服务模型的服务标识,查找对应的主动依赖的服务模型的模型标识。21) In the pre-configured correspondence between the model identifier of the actively dependent service model and the service identifier of the dependent service model, use the service identifier of the first service model as the service identifier of the dependent service model, and search for The model ID of the corresponding actively dependent service model.
其中,对应关系中的任意一个对应表项,对应表项中的主动依赖的服务模型的模型标识以及被依赖的服务模型的服务标识,是在所述服务端中开发一个应用且在开发的应用中部署了主动依赖的服务模型依赖被依赖的服务模型的依赖关系之后,在该对应关系存储的。Wherein, any corresponding entry in the corresponding relationship, the model identifier of the actively dependent service model and the service identifier of the dependent service model in the corresponding entry are an application developed in the server and the application being developed After the actively dependent service model is deployed in the dependency relationship of the dependent service model, the corresponding relationship is stored.
22)、根据查找到的服务标识确定至少一个第二服务模型。22). Determine at least one second service model according to the found service identifier.
例如,可以将查找到的各个服务标识分别对应的服务模型均确定为第二服务模型。For example, the service models corresponding to the found service identifiers may be determined as the second service model.
通过本方式,在查找在多个应用中的至少部分应用中的依赖第一服务模型的至少一个第二服务模型时,可以不引入应用,而是服务端根据记录的服务模型之间的依赖关系直接查找在多个应用中的至少部分应用中的依赖第一服务模型的至少一个第二服务模型,不依赖应用来查找,可以提高查找效率。Through this method, when searching for at least one second service model that depends on the first service model in at least some of the multiple applications, the application may not be introduced, but the server may use the recorded dependency relationship between the service models Directly searching for at least one second service model that depends on the first service model in at least some of the multiple applications does not rely on the application to search, which can improve the search efficiency.
在步骤S102中,对于查找到的任意一个第二服务模型,对该第二服务模型进行语义校验,得到该第二服务模型的语义校验结果,在该第二服务模型的语义校验结果用于指示该第二服务模型存在语义问题的情况下,输出该第二服务模型的语义校验结果。In step S102, for any second service model found, semantic verification is performed on the second service model to obtain the semantic verification result of the second service model. In the semantic verification result of the second service model It is used to output the semantic verification result of the second service model when it indicates that there is a semantic problem in the second service model.
对于查找到的其他每一个的第二服务模型,同样如此。The same is true for every other second service model found.
例如,在第二服务模型的语义校验结果用于指示第二服务模型存在语义问题的情况下,可以向第二服务模型的开发人员使用的终端发送第二服务模型的语义校验结果,以使第二服务模型的开发人员得到第二服务模型的语义校验结果,并根据第二服务模型的语义 校验结果获知第二服务模型存在语义问题,并对第二服务模型优化,以消除第二服务模型的语义问题。For example, when the semantic verification result of the second service model is used to indicate that there is a semantic problem in the second service model, the semantic verification result of the second service model may be sent to the terminal used by the developer of the second service model to Make the developer of the second service model obtain the semantic verification result of the second service model, and learn that there is a semantic problem in the second service model according to the semantic verification result of the second service model, and optimize the second service model to eliminate the second service model. Semantic issues of the second service model.
其中,在租户的应用已经发布之后,在服务端的开发人员根据实际需求对服务端中已开发的第一服务模型更改的情况下,若由于第一服务模型被更改而引发第二服务模型存在语义问题,则很可能导致第二服务模型无法正常处理线上数据,进而导致目标应用无法正常处理线上数据,进而无法正常为客户提供服务。Among them, after the tenant's application has been released, if the developer of the server changes the first service model developed in the server according to actual needs, if the second service model has semantics due to the change of the first service model If there is a problem, it is likely to cause the second service model to be unable to process online data normally, which in turn will cause the target application to be unable to process online data normally, and thus cannot provide services to customers normally.
往往需要经过较长时间,租户或者服务端的开发人员才能得到目标应用无法正常为客户提供服务的现状,这样,之后才会人工校验导致目标应用无法正常为客户提供服务的原因,之后才可能知道是第二服务模型存在语义问题,然后才可能知道是由于第一服务模型被变更而引发第二服务模型存在语义问题,从而推导出由于第二服务模型存在语义问题而导致第二服务模型无法正常处理线上数据,进而导致目标应用无法正常处理线上数据,进而无法正常为客户提供服务,然后开发人员才会对第二服务模型优化,解决目标应用无法正常处理线上数据的问题。It often takes a long time for tenants or server developers to get the status quo that the target application cannot provide services to customers normally. In this way, the reason why the target application cannot provide services to customers will be manually verified later, and then it may be known. It is the second service model that has a semantic problem, and then it is possible to know that the second service model has a semantic problem due to the change of the first service model, so it is deduced that the second service model cannot work normally due to the semantic problem of the second service model Processing online data, which leads to the inability of the target application to process online data normally, and thus cannot provide services to customers normally, and then developers will optimize the second service model to solve the problem that the target application cannot process online data normally.
但是,上述情况中,实时性差,耗费时长较长,且人工成本较高,导致目标应用中断对客户提供服务的时长较长,客户体验差且租户体验也差。However, in the above situation, the real-time performance is poor, it takes a long time, and the labor cost is high, resulting in a long time for the target application to be interrupted to provide services to customers, resulting in poor customer experience and poor tenant experience.
而在本申请中,在服务端中的第一服务模型被变更的情况下,在服务端中查找在多个应用中的至少部分应用中的依赖第一服务模型的至少一个第二服务模型。对于查找到的任意一个第二服务模型,对该第二服务模型进行语义校验,得到该第二服务模型的语义校验结果,在该第二服务模型的语义校验结果用于指示该第二服务模型存在语义问题的情况下,输出该第二服务模型的语义校验结果。However, in this application, when the first service model in the server is changed, at least one second service model dependent on the first service model in at least some of the multiple applications is searched in the server. For any second service model found, perform semantic verification on the second service model to obtain the semantic verification result of the second service model, where the semantic verification result of the second service model is used to indicate the second service model If there is a semantic problem in the second service model, output the semantic verification result of the second service model.
通过本申请的方案可以迅速获知多个应用中的至少部分应用中的依赖第一服务模型的至少一个第二服务模型,并对各个第二服务模型进行语义校验,可以尽快得到各个第二服务模型是否存在语义问题的语义校验结果,在某一个第二服务模型存在语义问题时可以及时对该第二服务模型优化,以消除该第二服务模型的语义问题,从而使得该第二服务模型能够快速恢复具有正常处理线上数据的能力,使得包括该第二服务模型的应用可以更快恢复出能够正常处理客户的线上数据的能力,进而使得包括该第二服务模型的应用能够快速恢复为客户提供服务,减少了包括该第二服务模型的应用中断对客户提供服务的时长,提高了实时性,也即,减少了包括该第二服务模型的应用被耽误正常处理线上数据的时长,提高了客户体验以及租户体验。另外,校验过程中可以没有人的参与,从而可以降低人工成本。Through the solution of the present application, at least one second service model that depends on the first service model in at least some of the multiple applications can be quickly learned, and semantic verification of each second service model can be performed, so that each second service can be obtained as soon as possible The semantic verification result of whether the model has semantic problems, when a certain second service model has semantic problems, the second service model can be optimized in time to eliminate the semantic problems of the second service model, so that the second service model The ability to quickly restore the ability to process online data normally, so that applications including the second service model can quickly recover the ability to normally process online data of customers, so that applications including the second service model can quickly recover Provide services to customers, reducing the duration of application interruptions including the second service model to provide services to customers, and improving real-time performance, that is, reducing the length of time that applications including the second service model are delayed in normal processing of online data , improving customer experience as well as tenant experience. In addition, there may be no human participation in the verification process, thereby reducing labor costs.
其次,租户借助服务端中的服务模型开发应用的过程中,只要服务端中的第一服务模型被变更,则也可以执行本方案的流程,以通过本方案校验出包括第一服务模型中的应用是否包括存在语义问题的其他服务模型,并在包括其他服务模型的情况下可以提示开发人员对其他服务模型优化,以消除其他服务模型的语义问题,避免之后出现“租户借助其他服务模型生成应用的场景下由于其他服务模型存在语义问题而导致生成的应用无法正常为客户提供服务”的情况发生,进而可以避免降低客户体验以及租户体验。Secondly, in the process of developing applications by means of the service model in the server, as long as the first service model in the server is changed, the tenant can also execute the process of this solution to verify that the first service model includes Whether the application includes other service models with semantic problems, and if other service models are included, developers can be prompted to optimize other service models, so as to eliminate the semantic problems of other service models, and avoid the occurrence of "tenant generated by other service models In the application scenario, due to semantic problems in other service models, the generated application cannot provide services to customers normally, which can avoid reducing customer experience and tenant experience.
另一方面,在开发人员在服务端中开发出一个服务模型之后,服务端就可以对服务模型进行语义校验,在该一个服务模型存在语义问题的情况下,就可以提示开发人员对该一个服务模型优化,以消除该一个服务模型的语义问题,避免之后在租户根据该一个服务模 型开发应用的场景下才发现该语义问题并在届时优化该一个服务模型,进而可以避免届时的优化过程耽误租户开发应用的进程。On the other hand, after the developer develops a service model in the server, the server can check the semantics of the service model, and if there is a semantic problem in the service model, the developer can be prompted Service model optimization, to eliminate the semantic problem of the service model, avoiding the semantic problem in the scenario where the tenant develops the application based on the service model and optimize the service model at that time, so as to avoid the delay of the optimization process at that time The process by which tenants develop applications.
又一方面,在本申请中,服务端的开发人员可以在终端上使用浏览器接收示意图并查看示意图,以及,可以在终端上使用浏览器对服务端中的服务模型优化,不需要在终端上安装并使用专门的开发工具,从而可以提高便利性以及降低使用成本。On the other hand, in this application, the developer of the server can use the browser on the terminal to receive and view the schematic diagram, and can use the browser on the terminal to optimize the service model in the server without installing the And use specialized development tools, which can improve convenience and reduce the cost of use.
另外,租户也可以在终端上使用浏览器开发应用(例如,选择服务端中的服务模型以及自行开发需要的计算机程序代码)以及查看示意图,不需要在终端上安装并使用专门的开发工具,从而可以提高便利性以及降低使用成本。In addition, tenants can also use a browser to develop applications on the terminal (for example, select the service model in the server and develop the required computer program code by themselves) and view schematic diagrams without installing and using special development tools on the terminal. The convenience can be improved and the use cost can be reduced.
在本申请一个实施例中,在第二服务模型的语义校验结果用于指示第二服务模型存在语义问题的情况下,则往往说明第二服务模型存在语义问题,如此,由于第一服务模型的变更很可能导致第二服务模型无法正常运行(例如无法对客户的线上数据正常处理等),进而导致目标应用无法正常运行(例如无法对客户的线上数据正常处理等),进而导致无法正常为客户提供服务。In one embodiment of the present application, if the semantic verification result of the second service model is used to indicate that there is a semantic problem in the second service model, it often indicates that there is a semantic problem in the second service model. Thus, since the first service model The change of the service model is likely to lead to the failure of the second service model (for example, the inability to process the customer's online data normally), which will lead to the failure of the target application (for example, the inability to process the customer's online data normally), resulting in the inability to Serve customers normally.
因此,为了避免这种情况发生,在第二服务模型的语义校验结果用于指示第二服务模型存在语义问题的情况下,可以提示第二服务模型的开发人员第二服务模型存在语义问题,以供第二服务模型的开发人员根据提示优化第二服务模型,以消除第二服务模型的语义问题。Therefore, in order to avoid this situation, when the semantic verification result of the second service model indicates that there is a semantic problem in the second service model, the developer of the second service model can be prompted that there is a semantic problem in the second service model, The developer of the second service model optimizes the second service model according to the prompt, so as to eliminate the semantic problem of the second service model.
在一个例子中,获取第二服务模型以及第一服务模型之间的依赖关系,然后生成用于指示该依赖关系的、且标记第二服务模型存在语义问题的示意图。In an example, the dependency relationship between the second service model and the first service model is obtained, and then a schematic diagram for indicating the dependency relationship and marking a semantic problem in the second service model is generated.
例如,在一个实施例中,在生成用于指示该依赖关系的、且标记第二服务模型存在语义问题的示意图时,可以获取第一服务模型中的被变更的符号,以及,在第二服务模型中确定依赖第一服务模型中的被变更的符号的目标符号等,目标符号包括由被变更的符号引发语义问题的符号等,然后可以生成用于指示第二服务模型中的目标符号依赖第一服务模型中的被变更的符号、且标记第二服务模型中的目标符号存在语义问题的示意图。For example, in one embodiment, when generating a diagram indicating the dependency and marking a semantic problem in the second service model, the changed symbol in the first service model can be obtained, and the changed symbol in the second service model can be obtained. Determine the target symbols in the model that depend on the changed symbols in the first service model. The target symbols include symbols that cause semantic problems caused by the changed symbols, and then generate a Schematic diagram of a changed symbol in one service model that marks a target symbol in a second service model with semantic problems.
其中,在示意图中,可以体现第一服务模型中的被变更的符号与第二服务模型中的目标符号之间的依赖关系,且在第二服务模型中的目标符号为多个的情况下,也可以体现第二服务模型中的各个目标符号之间的依赖关系等。Wherein, in the schematic diagram, the dependency relationship between the changed symbol in the first service model and the target symbol in the second service model can be reflected, and when there are multiple target symbols in the second service model, It may also reflect the dependency relationship among the target symbols in the second service model, and the like.
之后向第二服务模型的开发人员使用的终端发送示意图,例如,向第二服务模型的开发人员使用的终端发送该示意图,以使第二服务模型的开发人员使用终端可以显示该示意图,这样,第二服务模型的开发人员在其使用的终端上就可以看到该示意图,并根据该示意图可以快速获知第二服务模型存在语义问题并且宏观性地感知该依赖关系,以及可以根据感知到的该依赖关系快速确定出是由第一服务模型的变更导致的第二服务模型存在语义问题,然后根据第一服务模型的变更来辅助开发人员优化第二服务模型,以消除第二服务模型的语义问题。Then send the schematic diagram to the terminal used by the developer of the second service model, for example, send the schematic diagram to the terminal used by the developer of the second service model, so that the terminal used by the developer of the second service model can display the schematic diagram, thus, The developer of the second service model can see the schematic diagram on the terminal he uses, and according to the schematic diagram, he can quickly know that there is a semantic problem in the second service model and perceive the dependency relationship macroscopically, and can The dependency relationship quickly determines that there is a semantic problem in the second service model caused by the change of the first service model, and then assists developers to optimize the second service model according to the change of the first service model to eliminate the semantic problem of the second service model .
其中,通过可视化的示意图使得第二服务模型的开发人员可以快速确定出关于第一服务模型以及第二服务模型的依赖链路,从而可以提高消除第二服务模型的语义问题的效率。Among them, the developer of the second service model can quickly determine the dependency link about the first service model and the second service model through the visualized schematic diagram, thereby improving the efficiency of eliminating semantic problems of the second service model.
进一步地,服务模型出现的有些语义问题包括可预见的问题等。Furthermore, some semantic problems in the service model include foreseeable problems and so on.
可预见的问题是服务端的开发人员事先通过经验可以分析出的、服务模型可能会出现的语义问题,例如,缺乏开始节点、缺乏结束节点以及定义的符号未被使用等,服务端的开发人员事先也可以制定出用于解决可预见的语义问题的解决方案等。The foreseeable problems are the semantic problems that may appear in the service model that the server developers can analyze in advance through experience, for example, the lack of start nodes, the lack of end nodes, and the defined symbols are not used. Solutions to predictable semantic problems can be worked out, etc.
其中,在本申请中,在第二服务模型的语义校验结果用于指示第二服务模型存在语义问题的情况下,可以获取用于解决第二服务模型的语义问题的至少一个解决方案,然后可以向第二服务模型的开发人员推荐解决方案,以供第二服务模型的开发人员根据该解决方案可以尽快解决消除第二服务模型的语义问题等。例如,避免开发人员手动搜寻、归纳以及总结用于解决第二服务模型的语义问题的解决方案,可以直接快速得到服务端提供的用于解决第二服务模型的语义问题的解决方案,从而可以节省开发人员手动搜寻、归纳以及总结用于解决第二服务模型的语义问题的解决方案的过程所需耗费的时间,进而可以提高解决第二服务模型的语义问题的效率,以及降低人工成本。Wherein, in this application, if the semantic verification result of the second service model is used to indicate that there is a semantic problem in the second service model, at least one solution for solving the semantic problem of the second service model may be obtained, and then A solution can be recommended to the developer of the second service model, so that the developer of the second service model can solve the semantic problem of eliminating the second service model as soon as possible according to the solution. For example, developers can avoid manually searching, summarizing and summarizing the solutions for solving the semantic problems of the second service model, and can directly and quickly obtain the solutions for solving the semantic problems of the second service model provided by the server, thereby saving The time spent by developers manually searching, summarizing and summarizing the solutions for solving the semantic problems of the second service model can improve the efficiency of solving the semantic problems of the second service model and reduce labor costs.
其中,该解决方案可以包括解决第二服务模型的语义问题的至少一个可行的建议等,解决方案可以是一个文档,或者是一段包括用于讲解解决第二服务模型的语义问题的多个步骤的讲解视频等。Wherein, the solution may include at least one feasible suggestion for solving the semantic problem of the second service model, etc., and the solution may be a document, or a paragraph including multiple steps for explaining the semantic problem of the second service model. Explainer videos etc.
其中,本申请对第二服务模型进行语义校验的方式包括多种,如下是对第二服务模型进行语义校验的方式的举例说明,应当理解的是,如下的几种方式仅仅是对部分校验的方式的说明,还存在对第二服务模型进行语义校验的其他方式,本申请对此不一一例举,如下的方式并不对本申请的校验方式带来限定。Among them, the present application includes many ways to perform semantic verification on the second service model. The following is an example of the way to perform semantic verification on the second service model. It should be understood that the following methods are only partial For the description of the verification method, there are other methods for semantic verification of the second service model, which are not listed in this application, and the following methods do not limit the verification method of this application.
其中,在本申请一个实施例中,可以检测第二服务模型中引用的符号的类型在目标应用中是否被定义。Wherein, in one embodiment of the present application, it may be detected whether the type of the symbol referenced in the second service model is defined in the target application.
例如,假设第一服务模型中的一个符号的类型被更改,而第二服务模型中引用了该符号,但是,由于该符号的类型已经在第一服务模型中被更改了,且目标应用中不存在更改后的符号的类型,也即,更改后的符号的类型在目标应用中未定义,此时,这就导致第二服务模型中引用的符号的类型在目标应用中未被定义,则导致第二服务模型中引用更改后的符号无效,如此,第二服务模型中存在语义问题。For example, suppose the type of a symbol in the first service model is changed, and the symbol is referenced in the second service model, but since the type of the symbol has been changed in the first service model, and the target application does not There is a type of the changed symbol, that is, the type of the changed symbol is undefined in the target application. At this time, this causes the type of the symbol referenced in the second service model to be undefined in the target application, resulting in The changed symbol referenced in the second service model is invalid, so there is a semantic problem in the second service model.
在本申请另一个实施例中,检测第二服务模型中引用的符号在目标应用中是否被定义。In another embodiment of the present application, it is detected whether the symbols referenced in the second service model are defined in the target application.
例如,假设第一服务模型中的定义一个符号被删除了,这就导致目标应用中不再存在该符号,而第二服务模型中引用了该符号,但是,由于该符号已经在第一服务模型中被删除了,此时,该符号目标应用中未被定义,则导致第二服务模型中引用该符号无效,如此,第二服务模型中存在语义问题。For example, suppose a symbol defined in the first service model is deleted, which causes the symbol to no longer exist in the target application, and the symbol is referenced in the second service model, but since the symbol is already in the first service model is deleted, at this time, the symbol is not defined in the target application, which will result in invalid reference to the symbol in the second service model, so there is a semantic problem in the second service model.
在本申请另一个实施例中,检测第二服务模型中的期望引用的符号的类型以及实际引用的符号的类型是否匹配。In another embodiment of the present application, it is detected whether the type of the symbol expected to be referenced matches the type of the symbol actually referenced in the second service model.
例如,假设第一服务模型中的一个符号的类型被更改,而第二服务模型中引用了该符号且引用的是该符号变更前的类型,但是,由于该符号的类型已经在第一服务模型中被更改了,此时,这就导致第二服务模型中期望引用的该符号的类型与实际引用的第一服务模型中的该符号的类型不匹配,则导致第二服务模型中引用该符号无效,如此,第二服务模 型中存在语义问题。For example, assume that the type of a symbol in the first service model is changed, and the symbol is referenced in the second service model and refers to the type of the symbol before the change. However, since the type of the symbol is already in the first service model is changed, at this time, this causes the type of the symbol expected to be referenced in the second service model to not match the type of the symbol actually referenced in the first service model, which causes the symbol to be referenced in the second service model Invalid, as such, there is a semantic problem in the second service model.
在本申请另一个实施例中,检测第二服务模型中定义的符号在第二服务模型中是否被引用。In another embodiment of the present application, it is detected whether the symbol defined in the second service model is referenced in the second service model.
若第二服务模型中定义了某一符号,但是该符号并未在第二服务模型中被引用,往往是如下情况:一种情况,该符号本身并不应当在第二服务模型中定义,第二服务模型中并不需要使用该符号,该符号在第二服务模型中是多余的,是冗余的,可以看作第二服务模型存在语义问题。另一种情况,第二服务模型中需要使用该符号,该符号也在第二服务模型中被定义了,但是服务端的开发人员在开发第二服务模型的过程中,由于失误并未在第二服务模型中引用该符号,导致第二服务模型无法使用到该符号,进而可能影响第二服务模型正常运行或者影响第二服务模型正常处理数据,可以看作第二服务模型存在语义问题。If a certain symbol is defined in the second service model, but the symbol is not referenced in the second service model, it is often the following situation: In one case, the symbol itself should not be defined in the second service model, This symbol does not need to be used in the second service model, and the symbol is redundant and redundant in the second service model, which can be regarded as a semantic problem in the second service model. In another case, the symbol needs to be used in the second service model, and the symbol is also defined in the second service model, but the developer of the server did not include it in the second service model due to a mistake in the process of developing the second service model. This symbol is referenced in the service model, so that the second service model cannot use the symbol, which may affect the normal operation of the second service model or affect the normal processing of data by the second service model, which can be regarded as a semantic problem in the second service model.
在本申请另一个实施例中,检测第二服务模型中的流程分支是否具有被执行的触发条件。In another embodiment of the present application, it is detected whether the process branch in the second service model has a trigger condition to be executed.
在本申请中,第二服务模型中具有两个以上的流程分支,例如,包括流程分支1以及流程分支2等,在满足条件1的情况下,执行流程分支1,在满足条件2的情况下,执行流程分支2等。In this application, there are more than two process branches in the second service model, for example, including process branch 1 and process branch 2, etc., when condition 1 is met, process branch 1 is executed, and when condition 2 is met , execute process branch 2 and so on.
例如,假设第一服务模型中的一个符号被变更,而在第二服务模型中确定是否满足条件1时引用了该符号,在该符号的符号内容被变更的情况下,虽然不存在符号的定义以及符号的类型的变化,但是会导致在第二服务模型中确定是否满足条件1时,根据引用的变更后的该符号无法得到满足条件1的情况,进而导致流程分支1无法被执行,也即,流程分支1没有被执行的触发条件。导致第二服务模型中的流程分支1无效,如此,第二服务模型中存在语义问题。For example, assume that a symbol in the first service model is changed, and the symbol is referenced in the second service model to determine whether condition 1 is satisfied, in the case where the symbol content of the symbol is changed, although there is no definition of the symbol And the change of the type of the symbol, but it will lead to the fact that when determining whether condition 1 is satisfied in the second service model, the changed symbol according to the reference cannot meet the condition 1, and then the process branch 1 cannot be executed, that is , there is no trigger condition for process branch 1 to be executed. As a result, the process branch 1 in the second service model is invalid, so there is a semantic problem in the second service model.
在本申请另一个实施例中,检测第二服务模型中的期望输出的数据的类型与实际输出的数据的类型是否匹配。In another embodiment of the present application, it is detected whether the expected output data type in the second service model matches the actual output data type.
例如,假设第一服务模型中的一个符号的类型被更改,而第二服务模型中引用了该符号且支持引用该符号变更后的类型,但是,由于该符号的类型已经在第一服务模型中被更改了,此时,很可能导致:第二服务模型引用的类型被更改的该符号之后,输出的数据类型变更,而不是第二服务模型需要输出的类型,这就导致第二服务模型中的需要输出的数据的类型与实际输出的数据的类型不匹配,如此,第二服务模型中存在语义问题。For example, suppose the type of a symbol in the first service model is changed, but the symbol is referenced in the second service model and supports the reference to the changed type of the symbol. However, since the type of the symbol is already in the first service model is changed, at this time, it is likely to cause: after the symbol referenced by the second service model is changed, the output data type changes instead of the type that the second service model needs to output, which leads to the second service model The type of data that needs to be output does not match the type of data that is actually output. In this way, there is a semantic problem in the second service model.
在本申请另一个实施例中,检测第二服务模型中是否存在起始节点以及结束节点。In another embodiment of the present application, it is detected whether a start node and an end node exist in the second service model.
在本申请另一个实施例中,检测第二服务模型中的表达式中的成员的类型与表达式支持的成员的类型是否匹配。In another embodiment of the present application, it is detected whether the type of the member in the expression in the second service model matches the type of the member supported by the expression.
例如,假设第一服务模型中的一个符号的类型被更改,而第二服务模型中的一个表达式中的一个成员引用了该符号,且需要引用该符号的类型是该符号变更前的类型,但是,由于该符号的类型已经在第一服务模型中被更改了,此时,这就导致第二服务模型中的表达式中的该成员需要引用的该符号的类型与实际引用的第一服务模型中的该符号的类型不匹配,则导致第二服务模型中的表达式的成员引用该符号无效,如此,第二服务模型中存在语义问题。For example, suppose the type of a symbol in the first service model is changed, and a member in an expression in the second service model refers to the symbol, and the type that needs to refer to the symbol is the type of the symbol before the change, However, since the type of the symbol has been changed in the first service model, at this time, this causes the type of the symbol that the member needs to refer to in the expression in the second service model to be different from the actual referenced first service If the type of the symbol in the model does not match, the symbol referenced by the member of the expression in the second service model is invalid, so there is a semantic problem in the second service model.
在本申请一个实施例中,目标应用中包括有多个服务模型,且目标应用中涉及多个作用域,每一个作用域中涉及一部分服务模型,不同的作用域中涉及的服务模型可以不同。In an embodiment of the present application, the target application includes multiple service models, and the target application involves multiple scopes, each scope involves a part of the service models, and the service models involved in different scopes may be different.
如此,在对第二服务模型进行语义校验时,可以借助第二服务模型所涉及的目标作用域涉及的符号表,来对第二服务模型进行符号的类型相关的语义校验。具体可以通过如下流程实现,参见图2,该流程包括:In this way, when performing semantic verification on the second service model, the symbol table related to the target scope involved in the second service model can be used to perform symbol type-related semantic verification on the second service model. Specifically, it can be realized through the following process, see Figure 2, which includes:
在步骤S201中,在目标应用涉及的作用域中,确定第二服务模型所涉及的目标作用域。In step S201, among the scopes involved in the target application, determine the target scope involved in the second service model.
第二服务模型所涉及的目标作用域包括:第二服务模型所在的作用域,以及,包括:第二服务模型所在的作用域相关的作用域等。The target scope involved in the second service model includes: the scope where the second service model is located, and includes: a scope related to the scope where the second service model is located.
作用域之间的相关的关系可以是服务端的开发人员事先设置的,例如,事先分析开发的各个服务模型所属的作用域,然后对各个作用域的实际场景分析,确定出各个作用域之间的相关的关系,并在服务端中设置各个作用域之间的相关的关系等。The relationship between the scopes can be set in advance by the developer of the server. For example, the scopes of each developed service model are analyzed in advance, and then the actual scenarios of each scope are analyzed to determine the relationship between each scope. Related relationship, and set the related relationship between each scope in the server.
例如,作用域包括订单域、用户域(关于用户的账户的相关服务)、支付域、收藏域、购物车域以及即时通讯域。For example, scopes include an order domain, a user domain (related services about a user's account), a payment domain, a collection domain, a shopping cart domain, and an instant messaging domain.
其中,在关于客户在线上购买商品的场景中,往往至少涉及到订单域、用户域以及支付域等,如此,订单域、用户域以及支付域之间存在相关的关系。Among them, in the scene about customers purchasing goods online, it often involves at least an order domain, a user domain, and a payment domain. In this way, there is a related relationship among the order domain, user domain, and payment domain.
在步骤S202中,获取目标作用域涉及的符号表,符号表中至少包括:目标作用域涉及的符号以及目标作用域涉及的符号的类型。In step S202, the symbol table involved in the target scope is acquired, and the symbol table at least includes: symbols involved in the target scope and types of symbols involved in the target scope.
在本申请一个实施例中,可以分别获取目标作用域涉及的各个服务模型的AST(Abstract Syntax Tree,抽象语法树),然后根据各个服务模型的AST分别生成各个服务模型的符号表。例如,对于目标作用域涉及的任意一个服务模型,可以实时生成该服务模型的AST,例如,根据该服务模型对应的源代码生成该服务模型的AST,然后从该服务模型的AST中提取出该服务模型中的符号以及符号的类型,然后根据该服务模型中的符号以及符号的类型生成该服务模型的符号表对于目标作用域涉及的其他每一个服务模型,同样如此,然后根据生成的各个服务模型的符号表生成目标作用域涉及的符号表,例如,将生成的各个服务模型的符号表组合为目标作用域涉及的符号表。In one embodiment of the present application, the AST (Abstract Syntax Tree, Abstract Syntax Tree) of each service model involved in the target scope can be obtained respectively, and then the symbol table of each service model is generated respectively according to the AST of each service model. For example, for any service model involved in the target scope, the AST of the service model can be generated in real time, for example, the AST of the service model is generated according to the source code corresponding to the service model, and then the AST of the service model is extracted from the AST of the service model The symbol and symbol type in the service model, and then generate the symbol table of the service model according to the symbol and symbol type in the service model. The same is true for each other service model involved in the target scope, and then according to the generated The symbol table of the model generates a symbol table involved in the target scope, for example, combining the generated symbol tables of each service model into a symbol table involved in the target scope.
然而,在上述方式中,实时生成AST的过程以及实时生成符号表的过程耗费时间较长,进而导致降低了对第二服务模型进行语义校验的效率。However, in the above manner, the process of generating the AST in real time and the process of generating the symbol table in real time takes a long time, which reduces the efficiency of semantic verification of the second service model.
因此,为了提高对第二服务模型进行语义校验的效率,在本申请另一实施例中,每当服务端的开发人员在服务端中开发一个服务模型之后,服务端就可以自动生成该服务模型的AST,并根据该服务模型的AST生成该服务模型的符号表,然后可以在服务端中存储该服务模型的符号表,以供之后在服务端需要获取该服务模型的符号表时可以直接在服务端中获取存储的该服务模型的符号表,而可以不用实时生成该服务模型的符号表,从而可以节省时间。Therefore, in order to improve the efficiency of semantic verification of the second service model, in another embodiment of the present application, whenever the developer of the server develops a service model in the server, the server can automatically generate the service model AST, and generate the symbol table of the service model according to the AST of the service model, and then store the symbol table of the service model in the server, so that when the server needs to obtain the symbol table of the service model, it can be directly in The symbol table of the service model stored in the server is obtained, instead of generating the symbol table of the service model in real time, thereby saving time.
其中,由于第一服务模型被更改了,因此,更改后的第一服务模型的符号表与更改前的第一服务模型的符号表不同,即使服务端中事先存储有第一服务模型的符号表,存储的是也更改前的第一服务模型的符号表,而在本申请中,目标作用域往往也会涉及第一服务模型,因此,在获取第一服务模型的符号表时,需要获取的是更改后的第一服务模型的符号表。Wherein, since the first service model has been changed, the symbol table of the first service model after modification is different from the symbol table of the first service model before modification, even if the symbol table of the first service model is stored in the server in advance , stores the symbol table of the first service model before modification, and in this application, the target scope often also involves the first service model, so when obtaining the symbol table of the first service model, the is the symbol table for the changed first service model.
例如,对于目标作用域涉及的第一服务模型,可以获取第一服务模型的AST,然后根据第一服务模型的AST生成第一服务模型的符号表。For example, for the first service model involved in the target scope, the AST of the first service model may be obtained, and then the symbol table of the first service model may be generated according to the AST of the first service model.
另外,对于目标作用域涉及的除第一服务模型以外的其他服务模型,由于目标作用域涉及的除第一服务模型以外的其他服务模型未被更改,因此,在服务端事先存储有目标作用域涉及的除第一服务模型以外的其他服务模型的符号表的情况下,可以直接获取已存储的其他服务模型的符号表,以节省时间,提高获取其他服务模型的符号表的效率。In addition, for service models other than the first service model involved in the target scope, since the service models involved in the target scope other than the first service model have not been changed, the target scope is stored in advance on the server. In the case of involving symbol tables of other service models than the first service model, the stored symbol tables of other service models may be directly obtained, so as to save time and improve the efficiency of obtaining symbol tables of other service models.
具体的,对于目标作用域涉及的除第一服务模型以外的任意一个服务模型,可以获取事先缓存的该服务模型的符号表,事先缓存的该服务模型的符号表是在服务端开发出该服务模型的情况下生成并缓存的。对于目标作用域涉及的除第一服务模型以外的其他每一个服务模型,同样如此。Specifically, for any service model involved in the target scope except the first service model, the symbol table of the service model cached in advance can be obtained, and the symbol table of the service model cached in advance is developed on the server side. model is generated and cached. The same is true for every other service model involved in the target scope except the first service model.
进一步地,由于第一服务模型被变更,因此,变更后的第一服务模型的符号表与变更前的第一服务模型的符号表不同,为了使得之后在需要获取变更后的第一服务模型的符号表时,可以节省时间以及提高获取效率,在本申请另一实施例中,在根据第一服务模型的AST生成第一服务模型的符号表之后,在服务端中缓存有变更前的第一服务模型的符号表的情况下,使用生成的第一服务模型的符号表替换已缓存的变更前的第一服务模型的符号表。或者,在服务端中未缓存有变更前的第一服务模型的符号表的情况下,在服务端中缓存生成的第一服务模型的符号表。Further, since the first service model is changed, the symbol table of the first service model after change is different from the symbol table of the first service model before change, in order to obtain the symbol table of the first service model after change The symbol table can save time and improve acquisition efficiency. In another embodiment of the present application, after the symbol table of the first service model is generated according to the AST of the first service model, the first service model before the change is cached in the server. In the case of the symbol table of the service model, the generated symbol table of the first service model is used to replace the cached symbol table of the first service model before the change. Alternatively, if the symbol table of the first service model before change is not cached in the server, the generated symbol table of the first service model is cached in the server.
在步骤S203中,至少根据目标作用域涉及的符号表,对第二服务模型进行符号的类型相关的语义校验。In step S203, at least according to the symbol table involved in the target scope, perform symbol type-related semantic verification on the second service model.
在本申请中,获取第二服务模型的AST,其中,可以实时生成第二服务模型的AST,例如,根据第二服务模型对应的源代码生成第二服务模型的AST,或者,若事先在服务端中缓存有第二服务模型的AST(服务端的开发人员事先开发出第二服务模型的情况下,服务端就会生成第二服务模型的AST并在服务端中缓存第二服务模型的AST),则服务端可以获取事先缓存的第二服务模型的AST,可以节省时间,然后对照着第二服务模型的AST以及目标作用域涉及的符号表,对第二服务模型进行符号的类型相关的语义校验,得到第二服务模型的语义校验结果。In this application, the AST of the second service model is obtained, wherein the AST of the second service model can be generated in real time, for example, the AST of the second service model is generated according to the source code corresponding to the second service model, or if the AST of the second service model is generated in advance The AST of the second service model is cached in the server (if the developer of the server develops the second service model in advance, the server will generate the AST of the second service model and cache the AST of the second service model in the server) , then the server can obtain the pre-cached AST of the second service model, which can save time, and then compare the AST of the second service model and the symbol table involved in the target scope to perform symbol type-related semantics on the second service model Verify to obtain the semantic verification result of the second service model.
其中,在对照着第二服务模型的AST以及目标作用域涉及的符号表,对第二服务模型进行符号的类型相关的语义校验时,对于在第二服务模型的AST查找到的、第二服务模型引用的任意一个符号,可以在目标作用域涉及的符号表中确定该符号的类型。在根据目标作用域涉及的符号表确定出该符号的类型的情况下,根据该符号的类型对该符号进行类型相关的语义校验。Wherein, when performing symbol type-related semantic check on the second service model against the AST of the second service model and the symbol table involved in the target scope, the second service model found in the AST of the second service model, the second For any symbol referenced by the service model, the type of the symbol can be determined in the symbol table involved in the target scope. When the type of the symbol is determined according to the symbol table involved in the target scope, a type-related semantic check is performed on the symbol according to the type of the symbol.
或者,在根据目标作用域涉及的符号表未确定出该符号的类型的情况下,可以根据该符号的形式确定该符号的类型,再根据该符号的类型对该符号进行类型相关的语义校验。Or, if the type of the symbol is not determined according to the symbol table involved in the target scope, the type of the symbol can be determined according to the form of the symbol, and then type-related semantic checks are performed on the symbol according to the type of the symbol .
其中,在根据该符号的形式确定该符号的类型时,在该符号对一个结构体的成员引用的情况下,获取被引用的结构体的成员的类型,根据被引用的结构体的成员的类型确定该符号的类型,例如,将被引用的结构体成员的类型确定为该符号的类型。Among them, when the type of the symbol is determined according to the form of the symbol, in the case that the symbol refers to a member of a structure, the type of the member of the referenced structure is obtained, and according to the type of the member of the referenced structure Determines the type of the symbol, for example, types the referenced structure member as the type of the symbol.
或者,在该符号为表达式的情况下,获取表达式中的操作符,根据表达式中的操作符确定该符号的类型。其中,在表达式中的操作符确定的情况下,表达式输出的内容的类型即可确定,因此,可以根据表达式中的操作符确定该符号的类型。Or, if the symbol is an expression, the operator in the expression is obtained, and the type of the symbol is determined according to the operator in the expression. Wherein, when the operator in the expression is determined, the type of the content output by the expression can be determined, therefore, the type of the symbol can be determined according to the operator in the expression.
或者,在该符号调用了函数的情况下,获取函数的返回值的类型,根据函数的返回值的类型确定该符号的类型,例如,将函数的返回值的类型确定为该符号的类型等。Or, when the symbol calls a function, the type of the return value of the function is obtained, and the type of the symbol is determined according to the type of the return value of the function, for example, the type of the return value of the function is determined as the type of the symbol.
相应地,参照图3,示出了本申请的再一种数据处理方法的流程示意图。该方法应用于终端,其中,该方法可以包括如下流程:Correspondingly, referring to FIG. 3 , it shows a schematic flowchart of another data processing method of the present application. The method is applied to a terminal, where the method may include the following procedures:
在步骤S301中,接收服务端发送的示意图;示意图用于指示依赖关系且标记第二服务模型存在语义问题,依赖关系包括第二服务模型以及第一服务模型之间的依赖关系;依赖关系是服务端在对第二服务模型进行语义校验,并得到用于指示第二服务模型存在语义问题的语义校验结果的情况下获取的,第二服务模型包括在服务端中的第一服务模型被变更的情况下,在服务端中的多个应用中的至少部分应用中查找的依赖第一服务模型的至少一个服务模型;各个应用分别是至少借助服务端中的多个服务模型在服务端中开发的,应用中包括的至少部分服务模型之间具有依赖关系。In step S301, the schematic diagram sent by the server is received; the schematic diagram is used to indicate the dependency relationship and mark the semantic problem of the second service model, and the dependency relationship includes the dependency relationship between the second service model and the first service model; the dependency relationship is a service It is obtained when the end performs semantic verification on the second service model and obtains a semantic verification result indicating that there is a semantic problem in the second service model, and the second service model is included in the first service model in the server. In the case of a change, at least one service model that depends on the first service model is found in at least some of the multiple applications in the server; The developed, at least part of the service models included in the application have dependencies among them.
关于示意图的描述可以参见前述实施例,在此不做详述。For the description of the schematic diagram, reference may be made to the foregoing embodiments, and no detailed description is given here.
在步骤S302中,渲染示意图。In step S302, the schematic diagram is rendered.
例如,在一个例子中,第一服务模型包括服务模型A,第二服务模型包括服务模型B、服务模型C、服务模型D、服务模型E以及服务模型F。For example, in one example, the first service model includes service model A, and the second service model includes service model B, service model C, service model D, service model E, and service model F.
其中,服务模型B、服务模型C以及服务模型D直接依赖服务模型A,服务模型E以及服务模型F直接依赖服务模型D(相当于服务模型E以及服务模型F间接依赖服务模型A)。示意图可以如图4所示。Among them, service model B, service model C and service model D directly depend on service model A, and service model E and service model F directly depend on service model D (equivalent to service model E and service model F indirectly relying on service model A). A schematic diagram can be shown in FIG. 4 .
第二服务模型的开发人员在终端上可以看到该示意图,并根据该示意图可以快速获知第二服务模型存在语义问题并且宏观性地感知该依赖关系,以及可以根据感知到的该依赖关系快速确定出是由第一服务模型的变更导致的第二服务模型存在语义问题,然后根据第一服务模型的变更来辅助开发人员优化第二服务模型,以消除第二服务模型的语义问题。The developer of the second service model can see the schematic diagram on the terminal, and according to the schematic diagram, can quickly know that there is a semantic problem in the second service model and perceive the dependency relationship macroscopically, and can quickly determine based on the perceived dependency relationship Find out that there is a semantic problem in the second service model caused by the change of the first service model, and then assist developers to optimize the second service model according to the change of the first service model, so as to eliminate the semantic problem of the second service model.
其中,通过可视化的示意图使得第二服务模型的开发人员可以快速确定出关于第一服务模型以及第二服务模型的依赖链路,从而可以提高消除第二服务模型的语义问题的效率。Among them, the developer of the second service model can quickly determine the dependency link about the first service model and the second service model through the visualized schematic diagram, thereby improving the efficiency of eliminating semantic problems of the second service model.
对于任意一个第二服务模型,开发人员在终端上可以对该第二服务模型优化,例如,在终端上输入对该第二服务模型的优化操作等,在终端接收到对该第二服务模型的优化操作的情况下,可以根据优化操作对该第二服务模型优化,得到优化后的第二服务模型,然后向服务端提交优化后的第二服务模型。For any second service model, the developer can optimize the second service model on the terminal, for example, input the optimization operation of the second service model on the terminal, and receive the In the case of an optimization operation, the second service model may be optimized according to the optimization operation to obtain an optimized second service model, and then the optimized second service model may be submitted to the server.
然后服务端接收终端提交的优化后的第二服务模型;对优化后的第二服务模型进行语义校验,得到优化后的第二服务模型的语义校验结果;具体校验方式可以参见前述实施例的描述,在此不做详述。在优化后的第二服务模型的语义校验结果用于指示优化后的第二服务模型不存在语义问题的情况下,向终端发送优化后的第二服务模型不存在语义问题的语义校验结果。Then the server receives the optimized second service model submitted by the terminal; performs semantic verification on the optimized second service model, and obtains the semantic verification result of the optimized second service model; the specific verification method can refer to the aforementioned implementation The description of the example will not be described in detail here. When the semantic verification result of the optimized second service model is used to indicate that there is no semantic problem in the optimized second service model, sending to the terminal the semantic verification result that the optimized second service model has no semantic problem .
在终端接收到服务端反馈的、优化后的第二服务模型不存在语义问题的语义校验结果的情况下,可以在示意图中取消标记优化后的第二服务模型存在语义问题。以使开发人员可以感知到第二服务模型的语义问题已经消除。In the case that the terminal receives the semantic verification result fed back by the server and that the optimized second service model has no semantic problem, it may cancel the mark in the schematic diagram that the optimized second service model has a semantic problem. The semantic problem of making the developer aware of the second service model has been eliminated.
在一个实施例中,开发人员在看到示意图之后,根据示意图就可以获知第二服务模型 出现语义问题,如果开发人员需要对其中一个第二服务模型优化,则可以输入对示意图中的该其中一个第二服务模型的触控操作,在终端接收到对示意图中的该其中一个第二服务模型的触控操作的情况下,就可以获知开发人员需要对该其中一个第二服务模型优化,如此可以根据该触控操作获取该其中一个第二服务模型的源代码文件;例如,通过与服务端的交互获取该其中一个第二服务模型的源代码文件,并显示该其中一个第二服务模型的源代码文件中的源代码,以供开发人员可以直接对该其中一个第二服务模型的源代码修改,以实现对该其中一个第二服务模型优化。In one embodiment, after seeing the schematic diagram, the developer can know that there is a semantic problem in the second service model according to the schematic diagram. If the developer needs to optimize one of the second service models, he can input the value of one of the second service models in the schematic diagram. For the touch operation of the second service model, when the terminal receives the touch operation of one of the second service models in the schematic diagram, it can know that the developer needs to optimize one of the second service models, so that Obtain the source code file of one of the second service models according to the touch operation; for example, obtain the source code file of one of the second service models through interaction with the server, and display the source code of one of the second service models The source code in the file, so that developers can directly modify the source code of one of the second service models, so as to realize the optimization of one of the second service models.
其中,显示源代码文件中的源代码时,可以在该其中一个第二服务模型中确定由第一服务模型中的被变更的符号引发语义问题的目标符号;然后可以在该其中一个第二服务模型的源代码文件中确定目标符号的源代码;再显示目标符号的源代码。从而使得开发人员可以直接得到目标符号的源代码并直接对目标符号的源代码修改,避免开发人员在源代码文件中实时人工搜寻目标符号的源代码,从而可以提高效率以及简化开发人员的操作等。Wherein, when displaying the source code in the source code file, the target symbol that causes a semantic problem caused by the changed symbol in the first service model can be determined in one of the second service models; and then can be used in one of the second service models The source code for the target symbol is identified in the model's source code file; the source code for the target symbol is then displayed. In this way, the developer can directly obtain the source code of the target symbol and directly modify the source code of the target symbol, avoiding the developer from manually searching for the source code of the target symbol in the source code file in real time, thereby improving efficiency and simplifying the operation of the developer, etc. .
需要说明的是,对于方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于可选实施例,所涉及的动作并不一定是本申请所必须的。It should be noted that, for the method embodiment, for the sake of simple description, it is expressed as a series of action combinations, but those skilled in the art should know that the application is not limited by the described action sequence, because according to this application, certain steps may be performed in another order or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all optional embodiments, and the actions involved are not necessarily required by this application.
参照图5,示出了本申请的一种数据处理装置的结构框图,应用于服务端,所述服务端中具有用于对外提供服务的多个应用,各个应用分别是至少借助所述服务端中的多个服务模型在所述服务端中开发的,应用中包括的至少部分服务模型之间具有依赖关系;所述装置包括:Referring to FIG. 5 , it shows a structural block diagram of a data processing device of the present application, which is applied to a server, and the server has a plurality of applications for providing external services, and each application is at least by means of the server. Multiple service models in the application are developed in the server, and at least some of the service models included in the application have dependencies; the device includes:
查找模块11,用于在所述服务端中的第一服务模型被变更的情况下,在所述服务端中查找在所述多个应用中的至少部分应用中的依赖所述第一服务模型的至少一个第二服务模型;第一校验模块12,用于对于查找到的每一个第二服务模型,对所述第二服务模型进行语义校验,得到所述第二服务模型的语义校验结果,输出模块13,用于在所述第二服务模型的语义校验结果用于指示所述第二服务模型存在语义问题的情况下,输出所述第二服务模型的语义校验结果。A search module 11, configured to find, in the server, dependencies on the first service model in at least some of the applications in the plurality of applications when the first service model in the server is changed at least one second service model; the first verification module 12 is configured to perform semantic verification on the second service model for each found second service model, and obtain the semantic verification of the second service model The verification result, an output module 13, configured to output the semantic verification result of the second service model when the semantic verification result of the second service model indicates that there is a semantic problem in the second service model.
在一个可选的实现方式中,所述查找模块包括:第一查找单元,用于在所述服务端中查找使用所述第一服务模型的至少一个目标应用;第一确定单元,用于对于查找到的每一个目标应用,在所述目标应用中包括的多个服务模型中,确定依赖所述第一服务模型的第二服务模型。In an optional implementation manner, the search module includes: a first search unit, configured to search the server for at least one target application that uses the first service model; a first determination unit, configured to For each found target application, among multiple service models included in the target application, determine a second service model that depends on the first service model.
在一个可选的实现方式中,所述查找模块包括:第二查找单元,用于在事先配置的主动依赖的服务模型的模型标识与被依赖的服务模型的服务标识之间的对应关系中,以所述第一服务模型的服务标识作为被依赖的服务模型的服务标识,查找对应的主动依赖的服务模型的模型标识;第二确定单元,用于根据查找到的服务标识确定所述至少一个第二服务模型;其中,所述对应关系中的任意一个对应表项,所述对应表项中的主动依赖的服务模型的模型标识以及被依赖的服务模型的服务标识,是在所述服务端中开发一个应用且在开发的应用中部署了主动依赖的服务模型依赖被依赖的服务模型的依赖关系之后,在所述对 应关系存储的。In an optional implementation manner, the search module includes: a second search unit, configured to, in the pre-configured correspondence between the model identifier of the actively dependent service model and the service identifier of the dependent service model, Using the service identifier of the first service model as the service identifier of the dependent service model, searching for the model identifier of the corresponding actively dependent service model; the second determination unit is configured to determine the at least one The second service model; wherein, any one of the corresponding entries in the corresponding relationship, the model identifier of the actively dependent service model and the service identifier of the dependent service model in the corresponding entry are at the server After an application is developed in the developed application and the actively dependent service model is deployed in the developed application, the dependent relationship of the dependent service model is stored in the corresponding relationship.
在一个可选的实现方式中,所述装置还包括:第一获取模块,用于在所述第二服务模型的语义校验结果用于指示所述第二服务模型存在语义问题的情况下,获取所述第二服务模型以及所述第一服务模型之间的依赖关系;生成模块,用于生成用于指示所述依赖关系的、且标记所述第二服务模型存在语义问题的示意图;第一发送模块,用于向所述第二服务模型的开发人员使用的终端发送所述示意图。In an optional implementation manner, the device further includes: a first acquiring module, configured to, when the semantic verification result of the second service model indicates that there is a semantic problem in the second service model, Obtaining a dependency relationship between the second service model and the first service model; a generating module, configured to generate a schematic diagram indicating the dependency relationship and marking semantic problems in the second service model; the first A sending module, configured to send the schematic diagram to a terminal used by a developer of the second service model.
在一个可选的实现方式中,所述生成模块包括:第一获取单元,用于获取所述第一服务模型中的被变更的符号,以及,在所述第二服务模型中确定由所述被变更的符号引发语义问题的目标符号;生成单元,用于生成用于指示所述第二服务模型中的所述目标符号依赖所述第一服务模型中的所述被变更的符号、且标记所述第二服务模型中的所述目标符号存在语义问题的示意图。In an optional implementation manner, the generating module includes: a first obtaining unit, configured to obtain the changed symbol in the first service model, and determine in the second service model that the The changed symbol causes a target symbol of a semantic problem; a generating unit configured to generate a symbol used to indicate that the target symbol in the second service model depends on the changed symbol in the first service model, and mark A schematic diagram of a semantic problem in the target symbol in the second service model.
在一个可选的实现方式中,所述装置还包括:第二获取模块,用于在所述第二服务模型的语义校验结果用于指示所述第二服务模型存在语义问题的情况下,获取用于解决所述第二服务模型的语义问题的至少一个解决方案;第二发送模块,用于向所述第二服务模型的开发人员使用的终端发送所述解决方案。In an optional implementation manner, the device further includes: a second acquiring module, configured to, when the semantic verification result of the second service model indicates that there is a semantic problem in the second service model, Obtaining at least one solution for solving the semantic problem of the second service model; a second sending module, configured to send the solution to a terminal used by a developer of the second service model.
在一个可选的实现方式中,所述装置还包括:第一接收模块,用于接收终端提交的优化后的第二服务模型;优化后的第二服务模型是开发人员使用所述终端对存在语义问题的第二服务模型优化后得到的;第二校验模块,用于对优化后的第二服务模型进行语义校验,得到优化后的第二服务模型的语义校验结果;第三发送模块,用于在优化后的第二服务模型的语义校验结果用于指示优化后的第二服务模型不存在语义问题的情况下,向所述终端发送优化后的第二服务模型不存在语义问题的语义校验结果。In an optional implementation manner, the device further includes: a first receiving module, configured to receive an optimized second service model submitted by a terminal; Obtained after optimizing the second service model of the semantic problem; the second verification module is used to perform semantic verification on the optimized second service model, and obtain the semantic verification result of the optimized second service model; the third sending A module, configured to send the optimized second service model no semantic problem to the terminal when the semantic verification result of the optimized second service model is used to indicate that the optimized second service model has no semantic problem Semantic verification results for the question.
在一个可选的实现方式中,所述第一校验模块包括:第三确定单元,用于在所述目标应用涉及的作用域中,确定所述第二服务模型所涉及的目标作用域;第二获取单元,用于获取所述目标作用域涉及的符号表,所述符号表中至少包括:所述目标作用域涉及的符号以及所述目标作用域涉及的符号的类型;校验单元,用于至少根据所述目标作用域涉及的符号表,对所述第二服务模型进行符号的类型相关的语义校验。In an optional implementation manner, the first checking module includes: a third determining unit, configured to determine, among the scopes involved in the target application, the target scope involved in the second service model; The second acquiring unit is configured to acquire a symbol table involved in the target scope, the symbol table at least includes: symbols involved in the target scope and types of symbols involved in the target scope; a verification unit, It is used for performing symbol type-related semantic check on the second service model according to at least the symbol table involved in the target scope.
在一个可选的实现方式中,所述校验单元包括:第一校验子单元,用于对于所述第二服务模型引用的任意一个符号,在所述符号对一个结构体的成员引用的情况下,获取被引用的所述结构体的成员的类型,根据被引用的所述结构体的成员的类型确定所述符号的类型,根据所述符号的类型对所述符号进行类型相关的语义校验;或者,第二校验子单元,用于对于所述第二服务模型引用的任意一个符号,在所述符号为表达式的情况下,获取所述表达式中的操作符,根据所述表达式中的操作符确定所述符号的类型,根据所述符号的类型对所述符号进行类型相关的语义校验;或者,第三校验子单元,用于对于所述第二服务模型引用的任意一个符号,在所述符号调用了函数的情况下,获取所述函数的返回值的类型,根据所述函数的返回值的类型确定所述符号的类型,根据所述符号的类型对所述符号进行类型相关的语义校验。In an optional implementation manner, the verification unit includes: a first verification subunit, configured for any symbol referenced by the second service model, where the symbol refers to a member of a structure In this case, obtain the type of the member of the structure being referenced, determine the type of the symbol according to the type of the member of the structure being referenced, and perform type-related semantics on the symbol according to the type of the symbol verification; or, the second verification subunit is configured to, for any symbol referenced by the second service model, if the symbol is an expression, obtain the operator in the expression, according to the The operator in the above expression determines the type of the symbol, and performs a type-related semantic check on the symbol according to the type of the symbol; or, the third checking subunit is used for the second service model For any symbol referenced, if the symbol calls a function, obtain the type of the return value of the function, determine the type of the symbol according to the type of the return value of the function, and determine the type of the symbol according to the type of the symbol The symbols perform type-related semantic checks.
在一个可选的实现方式中,所述第一校验模块具体用于:检测所述第二服务模型中引用的符号的类型在所述目标应用中是否被定义;和/或,检测所述第二服务模型中引用的符号在所述目标应用中是否被定义;和/或,检测所述第二服务模型中的期望引用的符号的类 型以及实际引用的符号的类型是否匹配;和/或,检测所述第二服务模型中定义的符号在所述第二服务模型中是否被引用;和/或,检测所述第二服务模型中的流程分支是否具有被执行的触发条件;和/或,检测所述第二服务模型中的期望输出的数据的类型与实际输出的数据的类型是否匹配;和/或,检测所述第二服务模型中是否存在起始节点以及结束节点;和/或,检测所述第二服务模型中的表达式中的成员的类型与表达式支持的成员的类型是否匹配。In an optional implementation manner, the first verification module is specifically configured to: detect whether the type of the symbol referenced in the second service model is defined in the target application; and/or, detect the Whether the symbol referenced in the second service model is defined in the target application; and/or, detecting whether the type of the symbol expected to be referenced in the second service model matches the type of the symbol actually referenced; and/or Detecting whether a symbol defined in the second service model is referenced in the second service model; and/or detecting whether a process branch in the second service model has a trigger condition to be executed; and/or Detecting whether the expected output data type in the second service model matches the actual output data type; and/or detecting whether there is a start node and an end node in the second service model; and/or , detecting whether the type of the member in the expression in the second service model matches the type of the member supported by the expression.
其中,在租户的应用已经发布之后,在服务端的开发人员根据实际需求对服务端中已开发的第一服务模型更改的情况下,若由于第一服务模型被更改而引发第二服务模型存在语义问题,则很可能导致第二服务模型无法正常处理线上数据,进而导致目标应用无法正常处理线上数据,进而无法正常为客户提供服务。Among them, after the tenant's application has been released, if the developer of the server changes the first service model developed in the server according to actual needs, if the second service model has semantics due to the change of the first service model If there is a problem, it is likely to cause the second service model to be unable to process online data normally, which in turn will cause the target application to be unable to process online data normally, and thus cannot provide services to customers normally.
往往需要经过较长时间,租户或者服务端的开发人员才能得到目标应用无法正常为客户提供服务的现状,这样,之后才会人工校验导致目标应用无法正常为客户提供服务的原因,之后才可能知道是第二服务模型存在语义问题,然后才可能知道是由于第一服务模型被变更而引发第二服务模型存在语义问题,从而推导出由于第二服务模型存在语义问题而导致第二服务模型无法正常处理线上数据,进而导致目标应用无法正常处理线上数据,进而无法正常为客户提供服务,然后开发人员才会对第二服务模型优化,解决目标应用无法正常处理线上数据的问题。It often takes a long time for tenants or server developers to get the status quo that the target application cannot provide services to customers normally. In this way, the reason why the target application cannot provide services to customers will be manually verified later, and then it may be known. It is the second service model that has a semantic problem, and then it is possible to know that the second service model has a semantic problem due to the change of the first service model, so it is deduced that the second service model cannot work normally due to the semantic problem of the second service model Processing online data, which leads to the inability of the target application to process online data normally, and thus cannot provide services to customers normally, and then developers will optimize the second service model to solve the problem that the target application cannot process online data normally.
但是,上述情况中,实时性差,耗费时长较长,且人工成本较高,导致目标应用中断对客户提供服务的时长较长,客户体验差且租户体验也差。However, in the above situation, the real-time performance is poor, it takes a long time, and the labor cost is high, resulting in a long time for the target application to be interrupted to provide services to customers, resulting in poor customer experience and poor tenant experience.
而在本申请中,在服务端中的第一服务模型被变更的情况下,在服务端中查找在多个应用中的至少部分应用中的依赖第一服务模型的至少一个第二服务模型。对于查找到的任意一个第二服务模型,对该第二服务模型进行语义校验,得到该第二服务模型的语义校验结果,在该第二服务模型的语义校验结果用于指示该第二服务模型存在语义问题的情况下,输出该第二服务模型的语义校验结果。However, in this application, when the first service model in the server is changed, at least one second service model dependent on the first service model in at least some of the multiple applications is searched in the server. For any second service model found, perform semantic verification on the second service model to obtain the semantic verification result of the second service model, where the semantic verification result of the second service model is used to indicate the second service model If there is a semantic problem in the second service model, output the semantic verification result of the second service model.
通过本申请的方案可以迅速获知多个应用中的至少部分应用中的依赖第一服务模型的至少一个第二服务模型,并对各个第二服务模型进行语义校验,可以尽快得到各个第二服务模型是否存在语义问题的语义校验结果,在某一个第二服务模型存在语义问题时可以及时对该第二服务模型优化,以消除该第二服务模型的语义问题,从而使得该第二服务模型能够快速恢复具有正常处理线上数据的能力,使得包括该第二服务模型的应用可以更快恢复出能够正常处理客户的线上数据的能力,进而使得包括该第二服务模型的应用能够快速恢复为客户提供服务,减少了包括该第二服务模型的应用中断对客户提供服务的时长,提高了实时性,也即,减少了包括该第二服务模型的应用被耽误正常处理线上数据的时长,提高了客户体验以及租户体验。另外,校验过程中可以没有人的参与,从而可以降低人工成本。Through the solution of the present application, at least one second service model that depends on the first service model in at least some of the multiple applications can be quickly learned, and semantic verification of each second service model can be performed, so that each second service can be obtained as soon as possible The semantic verification result of whether the model has semantic problems, when a certain second service model has semantic problems, the second service model can be optimized in time to eliminate the semantic problems of the second service model, so that the second service model The ability to quickly restore the ability to process online data normally, so that applications including the second service model can quickly recover the ability to normally process online data of customers, so that applications including the second service model can quickly recover Provide services to customers, reducing the duration of application interruptions including the second service model to provide services to customers, and improving real-time performance, that is, reducing the length of time that applications including the second service model are delayed in normal processing of online data , improving customer experience as well as tenant experience. In addition, there may be no human participation in the verification process, thereby reducing labor costs.
其次,租户借助服务端中的服务模型开发应用的过程中,只要服务端中的第一服务模型被变更,则也可以执行本方案的流程,以通过本方案校验出包括第一服务模型中的应用是否包括存在语义问题的其他服务模型,并在包括其他服务模型的情况下可以提示开发人员对其他服务模型优化,以消除其他服务模型的语义问题,避免之后出现“租户借助其他服务模型生成应用的场景下由于其他服务模型存在语义问题而导致生成的应用无法正常 为客户提供服务”的情况发生,进而可以避免降低客户体验以及租户体验。Secondly, in the process of developing applications by means of the service model in the server, as long as the first service model in the server is changed, the tenant can also execute the process of this solution to verify that the first service model includes Whether the application includes other service models with semantic problems, and if other service models are included, developers can be prompted to optimize other service models, so as to eliminate the semantic problems of other service models, and avoid the occurrence of "tenant generated by other service models In the application scenario, due to semantic problems in other service models, the generated application cannot provide services to customers normally, which can avoid reducing customer experience and tenant experience.
另一方面,在开发人员在服务端中开发出一个服务模型之后,服务端就可以对服务模型进行语义校验,在该一个服务模型存在语义问题的情况下,就可以提示开发人员对该一个服务模型优化,以消除该一个服务模型的语义问题,避免之后在租户根据该一个服务模型开发应用的场景下才发现该语义问题并在届时优化该一个服务模型,进而可以避免届时的优化过程耽误租户开发应用的进程。On the other hand, after the developer develops a service model in the server, the server can check the semantics of the service model, and if there is a semantic problem in the service model, the developer can be prompted Service model optimization, to eliminate the semantic problem of the service model, avoiding the semantic problem in the scenario where the tenant develops the application based on the service model and optimize the service model at that time, so as to avoid the delay of the optimization process at that time The process by which tenants develop applications.
又一方面,在本申请中,服务端的开发人员可以在终端上使用浏览器接收示意图并查看示意图,以及,可以在终端上使用浏览器对服务端中的服务模型优化,不需要在终端上安装并使用专门的开发工具,从而可以提高便利性以及降低使用成本。On the other hand, in this application, the developer of the server can use the browser on the terminal to receive and view the schematic diagram, and can use the browser on the terminal to optimize the service model in the server without installing the And use specialized development tools, which can improve convenience and reduce the cost of use.
另外,租户也可以在终端上使用浏览器开发应用(例如,选择服务端中的服务模型以及自行开发需要的计算机程序代码)以及查看示意图,不需要在终端上安装并使用专门的开发工具,从而可以提高便利性以及降低使用成本。In addition, tenants can also use a browser to develop applications on the terminal (for example, select the service model in the server and develop the required computer program code by themselves) and view schematic diagrams without installing and using special development tools on the terminal. The convenience can be improved and the use cost can be reduced.
参照图6,示出了本申请的一种数据处理装置的结构框图,应用于终端,所述装置包括:Referring to FIG. 6, it shows a structural block diagram of a data processing device of the present application, which is applied to a terminal, and the device includes:
第二接收模块21,用于接收服务端发送的示意图;所述示意图用于指示依赖关系且标记第二服务模型存在语义问题,所述依赖关系包括所述第二服务模型以及第一服务模型之间的依赖关系;所述依赖关系是所述服务端在对所述第二服务模型进行语义校验,并得到用于指示所述第二服务模型存在语义问题的语义校验结果的情况下获取的,所述第二服务模型包括在所述服务端中的第一服务模型被变更的情况下,在所述服务端中的多个应用中的至少部分应用中查找的依赖所述第一服务模型的至少一个服务模型;各个应用分别是至少借助所述服务端中的多个服务模型在所述服务端中开发的;应用中包括的至少部分服务模型之间具有依赖关系;渲染模块22,用于渲染所述示意图。The second receiving module 21 is configured to receive a schematic diagram sent by the server; the schematic diagram is used to indicate a dependency relationship and mark a semantic problem in the second service model, and the dependency relationship includes a relationship between the second service model and the first service model The dependency relationship among them; the dependency relationship is obtained when the server performs semantic verification on the second service model and obtains a semantic verification result indicating that there is a semantic problem in the second service model Yes, the second service model includes when the first service model in the server is changed, look up in at least some of the applications in the server that depend on the first service At least one service model of the model; each application is developed in the server at least by means of multiple service models in the server; at least some of the service models included in the application have dependencies; the rendering module 22, Used to render the schematic.
在一个可选的实现方式中,所述装置还包括:第三获取模块,用于在接收到对所述示意图中的其中一个第二服务模型的触控操作的情况下,根据所述触控操作获取所述其中一个第二服务模型的源代码文件;显示模块,用于显示所述其中一个第二服务模型的源代码文件中的源代码。In an optional implementation manner, the device further includes: a third acquisition module, configured to, in the case of receiving a touch operation on one of the second service models in the schematic diagram, according to the touch The operation is to obtain the source code file of the one of the second service models; the display module is configured to display the source code in the source code file of the one of the second service models.
在一个可选的实现方式中,所述显示模块包括:第四确定单元,用于在所述其中一个第二服务模型中确定由所述第一服务模型中的被变更的符号引发语义问题的目标符号;第五确定单元,用于在所述其中一个第二服务模型的源代码文件中确定所述目标符号的源代码;显示单元,用于显示所述目标符号的源代码。In an optional implementation manner, the display module includes: a fourth determination unit, configured to determine, in the one of the second service models, the semantic problem caused by the changed symbol in the first service model A target symbol; a fifth determining unit, configured to determine the source code of the target symbol in the source code file of the one of the second service models; a display unit, configured to display the source code of the target symbol.
在一个可选的实现方式中,所述装置还包括:优化模块,用于对于每一个第二服务模型,在接收到对所述第二服务模型的优化操作的情况下,根据所述优化操作对所述第二服务模型优化,得到优化后的第二服务模型;提交模块,用于向服务端提交优化后的第二服务模型;取消标记模块,用于在接收到服务端反馈的、优化后的第二服务模型不存在语义问题的语义校验结果的情况下,在所述示意图中取消标记优化后的第二服务模型存在语义问题。In an optional implementation manner, the device further includes: an optimization module, configured to, for each second service model, upon receiving an optimization operation for the second service model, according to the optimization operation Optimizing the second service model to obtain an optimized second service model; submitting a module for submitting the optimized second service model to the server; unmarking module for receiving feedback from the server, optimizing In the case of the semantic verification result that the second service model after optimization does not have a semantic problem, cancel the mark in the schematic diagram that the second service model after optimization has a semantic problem.
其中,在租户的应用已经发布之后,在服务端的开发人员根据实际需求对服务端中已开发的第一服务模型更改的情况下,若由于第一服务模型被更改而引发第二服务模型存在 语义问题,则很可能导致第二服务模型无法正常处理线上数据,进而导致目标应用无法正常处理线上数据,进而无法正常为客户提供服务。Among them, after the tenant's application has been released, if the developer of the server changes the first service model developed in the server according to actual needs, if the second service model has semantics due to the change of the first service model If there is a problem, it is likely to cause the second service model to be unable to process online data normally, which in turn will cause the target application to be unable to process online data normally, and thus cannot provide services to customers normally.
往往需要经过较长时间,租户或者服务端的开发人员才能得到目标应用无法正常为客户提供服务的现状,这样,之后才会人工校验导致目标应用无法正常为客户提供服务的原因,之后才可能知道是第二服务模型存在语义问题,然后才可能知道是由于第一服务模型被变更而引发第二服务模型存在语义问题,从而推导出由于第二服务模型存在语义问题而导致第二服务模型无法正常处理线上数据,进而导致目标应用无法正常处理线上数据,进而无法正常为客户提供服务,然后开发人员才会对第二服务模型优化,解决目标应用无法正常处理线上数据的问题。It often takes a long time for tenants or server developers to get the status quo that the target application cannot provide services to customers normally. In this way, the reason why the target application cannot provide services to customers will be manually verified later, and then it may be known. It is the second service model that has a semantic problem, and then it is possible to know that the second service model has a semantic problem due to the change of the first service model, so it is deduced that the second service model cannot work normally due to the semantic problem of the second service model Processing online data, which leads to the inability of the target application to process online data normally, and thus cannot provide services to customers normally, and then developers will optimize the second service model to solve the problem that the target application cannot process online data normally.
但是,上述情况中,实时性差,耗费时长较长,且人工成本较高,导致目标应用中断对客户提供服务的时长较长,客户体验差且租户体验也差。However, in the above situation, the real-time performance is poor, it takes a long time, and the labor cost is high, resulting in a long time for the target application to be interrupted to provide services to customers, resulting in poor customer experience and poor tenant experience.
而在本申请中,在服务端中的第一服务模型被变更的情况下,在服务端中查找在多个应用中的至少部分应用中的依赖第一服务模型的至少一个第二服务模型。对于查找到的任意一个第二服务模型,对该第二服务模型进行语义校验,得到该第二服务模型的语义校验结果,在该第二服务模型的语义校验结果用于指示该第二服务模型存在语义问题的情况下,输出该第二服务模型的语义校验结果。However, in this application, when the first service model in the server is changed, at least one second service model dependent on the first service model in at least some of the multiple applications is searched in the server. For any second service model found, perform semantic verification on the second service model to obtain the semantic verification result of the second service model, where the semantic verification result of the second service model is used to indicate the second service model If there is a semantic problem in the second service model, output the semantic verification result of the second service model.
通过本申请的方案可以迅速获知多个应用中的至少部分应用中的依赖第一服务模型的至少一个第二服务模型,并对各个第二服务模型进行语义校验,可以尽快得到各个第二服务模型是否存在语义问题的语义校验结果,在某一个第二服务模型存在语义问题时可以及时对该第二服务模型优化,以消除该第二服务模型的语义问题,从而使得该第二服务模型能够快速恢复具有正常处理线上数据的能力,使得包括该第二服务模型的应用可以更快恢复出能够正常处理客户的线上数据的能力,进而使得包括该第二服务模型的应用能够快速恢复为客户提供服务,减少了包括该第二服务模型的应用中断对客户提供服务的时长,提高了实时性,也即,减少了包括该第二服务模型的应用被耽误正常处理线上数据的时长,提高了客户体验以及租户体验。另外,校验过程中可以没有人的参与,从而可以降低人工成本。Through the solution of the present application, at least one second service model that depends on the first service model in at least some of the multiple applications can be quickly learned, and semantic verification of each second service model can be performed, so that each second service can be obtained as soon as possible The semantic verification result of whether the model has semantic problems, when a certain second service model has semantic problems, the second service model can be optimized in time to eliminate the semantic problems of the second service model, so that the second service model The ability to quickly restore the ability to process online data normally, so that applications including the second service model can quickly recover the ability to normally process online data of customers, so that applications including the second service model can quickly recover Provide services to customers, reducing the duration of application interruptions including the second service model to provide services to customers, and improving real-time performance, that is, reducing the length of time that applications including the second service model are delayed in normal processing of online data , improving customer experience as well as tenant experience. In addition, there may be no human participation in the verification process, thereby reducing labor costs.
其次,租户借助服务端中的服务模型开发应用的过程中,只要服务端中的第一服务模型被变更,则也可以执行本方案的流程,以通过本方案校验出包括第一服务模型中的应用是否包括存在语义问题的其他服务模型,并在包括其他服务模型的情况下可以提示开发人员对其他服务模型优化,以消除其他服务模型的语义问题,避免之后出现“租户借助其他服务模型生成应用的场景下由于其他服务模型存在语义问题而导致生成的应用无法正常为客户提供服务”的情况发生,进而可以避免降低客户体验以及租户体验。Secondly, in the process of developing applications by means of the service model in the server, as long as the first service model in the server is changed, the tenant can also execute the process of this solution to verify that the first service model includes Whether the application includes other service models with semantic problems, and if other service models are included, developers can be prompted to optimize other service models, so as to eliminate the semantic problems of other service models, and avoid the occurrence of "tenant generated by other service models In the application scenario, due to semantic problems in other service models, the generated application cannot provide services to customers normally, which can avoid reducing customer experience and tenant experience.
另一方面,在开发人员在服务端中开发出一个服务模型之后,服务端就可以对服务模型进行语义校验,在该一个服务模型存在语义问题的情况下,就可以提示开发人员对该一个服务模型优化,以消除该一个服务模型的语义问题,避免之后在租户根据该一个服务模型开发应用的场景下才发现该语义问题并在届时优化该一个服务模型,进而可以避免届时的优化过程耽误租户开发应用的进程。On the other hand, after the developer develops a service model in the server, the server can check the semantics of the service model, and if there is a semantic problem in the service model, the developer can be prompted Service model optimization, to eliminate the semantic problem of the service model, avoiding the semantic problem in the scenario where the tenant develops the application based on the service model and optimize the service model at that time, so as to avoid the delay of the optimization process at that time The process by which tenants develop applications.
又一方面,在本申请中,服务端的开发人员可以在终端上使用浏览器接收示意图并查看示意图,以及,可以在终端上使用浏览器对服务端中的服务模型优化,不需要在终端上 安装并使用专门的开发工具,从而可以提高便利性以及降低使用成本。On the other hand, in this application, the developer of the server can use the browser on the terminal to receive and view the schematic diagram, and can use the browser on the terminal to optimize the service model in the server without installing the And use specialized development tools, which can improve convenience and reduce the cost of use.
另外,租户也可以在终端上使用浏览器开发应用(例如,选择服务端中的服务模型以及自行开发需要的计算机程序代码)以及查看示意图,不需要在终端上安装并使用专门的开发工具,从而可以提高便利性以及降低使用成本。In addition, tenants can also use a browser to develop applications on the terminal (for example, select the service model in the server and develop the required computer program code by themselves) and view schematic diagrams without installing and using special development tools on the terminal. The convenience can be improved and the use cost can be reduced.
本申请实施例还提供了一种非易失性可读存储介质,该存储介质中存储有一个或多个模块(programs),该一个或多个模块被应用在设备时,可以使得该设备执行本申请实施例中各方法步骤的指令(instructions)。The embodiment of the present application also provides a non-volatile readable storage medium, and one or more modules (programs) are stored in the storage medium. When the one or more modules are applied to the device, the device can execute Instructions for each method step in the embodiments of the present application.
本申请实施例提供了一个或多个机器可读介质,其上存储有指令,当由一个或多个处理器执行时,使得电子设备执行如上述实施例中一个或多个所述的方法。本申请实施例中,所述电子设备包括服务器、网关、子设备等,子设备为物联网设备等设备。The embodiments of the present application provide one or more machine-readable media, on which instructions are stored, and when executed by one or more processors, the electronic device executes the method described in one or more of the above embodiments. In the embodiment of the present application, the electronic device includes a server, a gateway, a sub-device, etc., and the sub-device is an Internet of Things device or the like.
本公开的实施例可被实现为使用任意适当的硬件,固件,软件,或及其任意组合进行想要的配置的装置,该装置可包括服务器(集群)、终端设备如IoT设备等电子设备。Embodiments of the present disclosure can be implemented as an apparatus using any appropriate hardware, firmware, software, or any combination thereof to perform desired configurations, and the apparatus may include servers (clusters), terminal devices such as IoT devices and other electronic devices.
图7示意性地示出了可被用于实现本申请中所述的各个实施例的示例性装置1300。FIG. 7 schematically illustrates an exemplary apparatus 1300 that may be used to implement various embodiments described in this application.
对于一个实施例,图7示出了示例性装置1300,该装置具有一个或多个处理器1302、被耦合到(一个或多个)处理器1302中的至少一个的控制模块(芯片组)1304、被耦合到控制模块1304的存储器1306、被耦合到控制模块1304的非易失性存储器(NVM)/存储设备1308、被耦合到控制模块1304的一个或多个输入/输出设备1310,和被耦合到控制模块1304的网络接口1312。For one embodiment, FIG. 7 illustrates an exemplary apparatus 1300 having one or more processors 1302, a control module (chipset) 1304 coupled to at least one of the processor(s) 1302 , memory 1306 coupled to control module 1304, non-volatile memory (NVM)/storage device 1308 coupled to control module 1304, one or more input/output devices 1310 coupled to control module 1304, and Coupled to the network interface 1312 of the control module 1304 .
处理器1302可包括一个或多个单核或多核处理器,处理器1302可包括通用处理器或专用处理器(例如图形处理器、应用处理器、基频处理器等)的任意组合。在一些实施例中,装置1300能够作为本申请实施例中所述网关等服务器设备。The processor 1302 may include one or more single-core or multi-core processors, and the processor 1302 may include any combination of general-purpose processors or special-purpose processors (such as graphics processors, application processors, baseband processors, etc.). In some embodiments, the apparatus 1300 can serve as a server device such as a gateway in the embodiments of this application.
在一些实施例中,装置1300可包括具有指令1314的一个或多个计算机可读介质(例如,存储器1306或NVM/存储设备1308)和与该一个或多个计算机可读介质相合并被配置为执行指令1314以实现模块从而执行本公开中所述的动作的一个或多个处理器1302。In some embodiments, apparatus 1300 may include one or more computer-readable media (e.g., memory 1306 or NVM/storage 1308) having instructions 1314 and in combination with the one or more computer-readable media configured to The one or more processors 1302 execute instructions 1314 to implement modules to perform the actions described in this disclosure.
对于一个实施例,控制模块1304可包括任意适当的接口控制器,以向(一个或多个)处理器1302中的至少一个和/或与控制模块1304通信的任意适当的设备或组件提供任意适当的接口。For one embodiment, the control module 1304 may include any suitable interface controller to provide any suitable Interface.
控制模块1304可包括存储器控制器模块,以向存储器1306提供接口。存储器控制器模块可以是硬件模块、软件模块和/或固件模块。The control module 1304 may include a memory controller module to provide an interface to the memory 1306 . A memory controller module may be a hardware module, a software module and/or a firmware module.
存储器1306可被用于例如为装置1300加载和存储数据和/或指令1314。对于一个实施例,存储器1306可包括任意适当的易失性存储器,例如,适当的DRAM。在一些实施例中,存储器1306可包括双倍数据速率四同步动态随机存取存储器(DDR4SDRAM)。Memory 1306 may be used, for example, to load and store data and/or instructions 1314 for apparatus 1300 . For one embodiment, memory 1306 may comprise any suitable volatile memory, such as suitable DRAM. In some embodiments, memory 1306 may include Double Data Rate Quad Synchronous Dynamic Random Access Memory (DDR4 SDRAM).
对于一个实施例,控制模块1304可包括一个或多个输入/输出控制器,以向NVM/存储设备1308及(一个或多个)输入/输出设备1310提供接口。For one embodiment, control module 1304 may include one or more input/output controllers to provide interfaces to NVM/storage device(s) 1308 and input/output device(s) 1310 .
例如,NVM/存储设备1308可被用于存储数据和/或指令1314。NVM/存储设备1308可包括任意适当的非易失性存储器(例如,闪存)和/或可包括任意适当的(一个或多个)非易失性存储设备(例如,一个或多个硬盘驱动器(HDD)、一个或多个光盘(CD)驱动器和/或一个或多个数字通用光盘(DVD)驱动器)。For example, NVM/storage 1308 may be used to store data and/or instructions 1314 . NVM/storage 1308 may include any suitable non-volatile memory (e.g., flash memory) and/or may include any suitable non-volatile storage device(s) (e.g., one or more hard drives ( HDD), one or more compact disc (CD) drives, and/or one or more digital versatile disc (DVD) drives).
NVM/存储设备1308可包括在物理上作为装置1300被安装在其上的设备的一部分的存储资源,或者其可被该设备访问可不必作为该设备的一部分。例如,NVM/存储设备1308可通过网络经由(一个或多个)输入/输出设备1310进行访问。NVM/storage 1308 may include storage resources that are physically part of the device on which apparatus 1300 is installed, or may not necessarily be part of the device that are accessible by the device. For example, NVM/storage 1308 may be accessed over a network via input/output device(s) 1310 .
(一个或多个)输入/输出设备1310可为装置1300提供接口以与任意其他适当的设备通信,输入/输出设备1310可以包括通信组件、拼音组件、传感器组件等。网络接口1312可为装置1300提供接口以通过一个或多个网络通信,装置1300可根据一个或多个无线网络标准和/或协议中的任意标准和/或协议来与无线网络的一个或多个组件进行无线通信,例如接入基于通信标准的无线网络,如WiFi、2G、3G、4G、5G等,或它们的组合进行无线通信。The input/output device(s) 1310 may provide an interface for the apparatus 1300 to communicate with any other suitable device, and the input/output device 1310 may include a communication component, a pinyin component, a sensor component, and the like. Network interface 1312 may provide an interface for device 1300 to communicate over one or more networks, and device 1300 may communicate with one or more wireless networks according to any of one or more wireless network standards and/or protocols. Components communicate wirelessly, such as accessing wireless networks based on communication standards, such as WiFi, 2G, 3G, 4G, 5G, etc., or a combination of them for wireless communication.
对于一个实施例,(一个或多个)处理器1302中的至少一个可与控制模块1304的一个或多个控制器(例如,存储器控制器模块)的逻辑封装在一起。对于一个实施例,(一个或多个)处理器1302中的至少一个可与控制模块1304的一个或多个控制器的逻辑封装在一起以形成系统级封装(SiP)。对于一个实施例,(一个或多个)处理器1302中的至少一个可与控制模块1304的一个或多个控制器的逻辑集成在同一模具上。对于一个实施例,(一个或多个)处理器1302中的至少一个可与控制模块1304的一个或多个控制器的逻辑集成在同一模具上以形成片上系统(SoC)。For one embodiment, at least one of the processor(s) 1302 may be packaged with the logic of one or more controllers of the control module 1304 (eg, a memory controller module). For one embodiment, at least one of the processor(s) 1302 may be packaged with the logic of one or more controllers of the control module 1304 to form a system-in-package (SiP). For one embodiment, at least one of the processor(s) 1302 may be integrated on the same die as the logic of the one or more controllers of the control module 1304 . For one embodiment, at least one of the processor(s) 1302 may be integrated on the same die with the logic of the one or more controllers of the control module 1304 to form a system on chip (SoC).
在各个实施例中,装置1300可以但不限于是:服务器、台式计算设备或移动计算设备(例如,膝上型计算设备、手持计算设备、平板电脑、上网本等)等终端设备。在各个实施例中,装置1300可具有更多或更少的组件和/或不同的架构。例如,在一些实施例中,装置1300包括一个或多个摄像机、键盘、液晶显示器(LCD)屏幕(包括触屏显示器)、非易失性存储器端口、多个天线、图形芯片、专用集成电路(ASIC)和扬声器。In various embodiments, the apparatus 1300 may be, but not limited to, a terminal device such as a server, a desktop computing device, or a mobile computing device (eg, a laptop computing device, a handheld computing device, a tablet computer, a netbook, etc.). In various embodiments, device 1300 may have more or fewer components and/or a different architecture. For example, in some embodiments, device 1300 includes one or more cameras, a keyboard, a liquid crystal display (LCD) screen (including a touchscreen display), a non-volatile memory port, multiple antennas, a graphics chip, an application-specific integrated circuit ( ASIC) and speakers.
本申请实施例提供了一种电子设备,包括:一个或多个处理器;和,其上存储有指令的一个或多个机器可读介质,当由所述一个或多个处理器执行时,使得所述电子设备执行如本申请中一个或多个所述的方法。An embodiment of the present application provides an electronic device, including: one or more processors; and one or more machine-readable media having instructions stored thereon, when executed by the one or more processors, The electronic device is caused to perform one or more of the methods described in this application.
对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for related parts, please refer to the part of the description of the method embodiment.
本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。Each embodiment in this specification is described in a progressive manner, each embodiment focuses on the difference from other embodiments, and the same and similar parts of each embodiment can be referred to each other.
本申请实施例是参照根据本申请实施例的方法、终端设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、和流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程信息处理终端设备的处理器以产生一个机器,使得通过计算机或其他可编程信息处理终端设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。Embodiments of the present application are described with reference to flowcharts and/or block diagrams of methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions can be provided to a general-purpose computer, special purpose computer, embedded processor or processor of other programmable information processing terminal equipment to produce a machine, so that the instructions executed by the computer or other programmable information processing terminal equipment Produce means for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程信息处理终端设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable information processing terminal to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the The instruction means implements the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程信息处理终端设备上,使得在计算机或其他可编程终端设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程终端设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded into a computer or other programmable information processing terminal equipment, so that a series of operation steps are executed on the computer or other programmable terminal equipment to produce computer-implemented processing, so that the computer or other programmable terminal equipment The instructions executed above provide steps for implementing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
尽管已描述了本申请实施例的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例和落入本申请实施例范围的所有变更和修改。While the preferred embodiments of the embodiments of the present application have been described, additional changes and modifications can be made to these embodiments by those skilled in the art once the basic inventive concept is understood. Therefore, the appended claims are intended to be interpreted to cover the preferred embodiment and all changes and modifications that fall within the scope of the embodiments of the application.
最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者终端设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者终端设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者终端设备中还存在另外的相同要素。Finally, it should also be noted that in this text, relational terms such as first and second etc. are only used to distinguish one entity or operation from another, and do not necessarily require or imply that these entities or operations, any such actual relationship or order exists. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or terminal equipment comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements identified, or also include elements inherent in such a process, method, article, or terminal equipment. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or terminal device comprising said element.
以上对本申请所提供的数据处理方法及装置,进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。The data processing method and device provided by the application have been introduced in detail above. The principles and implementation methods of the application have been explained by using specific examples in this paper. The descriptions of the above embodiments are only used to help understand the methods and methods of the application. Its core idea; at the same time, for those of ordinary skill in the art, according to the idea of this application, there will be changes in the specific implementation and application scope. limit.

Claims (16)

  1. 一种数据处理方法,应用于服务端,所述服务端中具有用于对外提供服务的多个应用,各个应用分别是至少借助所述服务端中的多个服务模型在所述服务端中开发的,应用中包括的至少部分服务模型之间具有依赖关系,所述方法包括:A data processing method, applied to a server, where the server has multiple applications for providing external services, and each application is developed in the server at least by means of multiple service models in the server Yes, at least some of the service models included in the application have dependencies, and the method includes:
    在所述服务端中的第一服务模型被变更的情况下,在所述服务端中查找在所述多个应用中的至少部分应用中的依赖所述第一服务模型的至少一个第二服务模型;In the case that the first service model in the server is changed, at least one second service that depends on the first service model in at least some of the applications in the plurality of applications is searched in the server Model;
    对于查找到的每一个第二服务模型,对所述第二服务模型进行语义校验,得到所述第二服务模型的语义校验结果,在所述第二服务模型的语义校验结果用于指示所述第二服务模型存在语义问题的情况下,输出所述第二服务模型的语义校验结果。For each second service model found, perform semantic verification on the second service model to obtain a semantic verification result of the second service model, and use the semantic verification result of the second service model for In a case where it is indicated that there is a semantic problem in the second service model, a semantic verification result of the second service model is output.
  2. 根据权利要求1所述的方法,其中,所述在所述服务端中查找在所述多个应用中的至少部分应用中的依赖所述第一服务模型的至少一个第二服务模型,包括:The method according to claim 1, wherein the searching in the server for at least one second service model that depends on the first service model in at least some of the applications includes:
    在所述服务端中查找使用所述第一服务模型的至少一个目标应用;Find at least one target application using the first service model in the server;
    对于查找到的每一个目标应用,在所述目标应用中包括的多个服务模型中,确定依赖所述第一服务模型的第二服务模型。For each found target application, among multiple service models included in the target application, a second service model dependent on the first service model is determined.
  3. 根据权利要求1所述的方法,其中,所述在所述服务端中查找在所述多个应用中的至少部分应用中的依赖所述第一服务模型的至少一个第二服务模型,包括:The method according to claim 1, wherein the searching in the server for at least one second service model that depends on the first service model in at least some of the applications includes:
    在事先配置的主动依赖的服务模型的模型标识与被依赖的服务模型的服务标识之间的对应关系中,以所述第一服务模型的服务标识作为被依赖的服务模型的服务标识,查找对应的主动依赖的服务模型的模型标识;In the pre-configured correspondence between the model identifier of the actively dependent service model and the service identifier of the dependent service model, use the service identifier of the first service model as the service identifier of the dependent service model to find the corresponding The model identifier of the service model that is actively dependent on;
    根据查找到的服务标识确定所述至少一个第二服务模型;determining the at least one second service model according to the found service identifier;
    其中,所述对应关系中的任意一个对应表项,所述对应表项中的主动依赖的服务模型的模型标识以及被依赖的服务模型的服务标识,是在所述服务端中开发一个应用且在开发的应用中部署了主动依赖的服务模型依赖被依赖的服务模型的依赖关系之后,在所述对应关系存储的。Wherein, for any one of the corresponding entries in the corresponding relationship, the model identifier of the actively dependent service model and the service identifier of the dependent service model in the corresponding entry are an application developed in the server and After the actively dependent service model is deployed in the developed application, the dependent relationship of the dependent service model is stored in the corresponding relationship.
  4. 根据权利要求1所述的方法,其中,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    在所述第二服务模型的语义校验结果用于指示所述第二服务模型存在语义问题的情况下,获取所述第二服务模型以及所述第一服务模型之间的依赖关系;In the case where the semantic verification result of the second service model is used to indicate that there is a semantic problem in the second service model, acquiring a dependency relationship between the second service model and the first service model;
    生成用于指示所述依赖关系的、且标记所述第二服务模型存在语义问题的示意图;generating a schematic diagram for indicating the dependency relationship and marking a semantic problem in the second service model;
    向所述第二服务模型的开发人员使用的终端发送所述示意图。Sending the schematic diagram to a terminal used by a developer of the second service model.
  5. 根据权利要求4所述的方法,其中,所述生成用于指示所述依赖关系的、且标记所述第二服务模型存在语义问题的示意图,包括:The method according to claim 4, wherein the generating the schematic diagram for indicating the dependency relationship and marking semantic problems in the second service model comprises:
    获取所述第一服务模型中的被变更的符号,以及,在所述第二服务模型中确定由所述被变更的符号引发语义问题的目标符号;obtaining a changed symbol in the first service model, and determining, in the second service model, a target symbol that causes a semantic problem caused by the changed symbol;
    生成用于指示所述第二服务模型中的所述目标符号依赖所述第一服务模型中的所述被变更的符号、且标记所述第二服务模型中的所述目标符号存在语义问题的示意图。generating a message indicating that the target symbol in the second service model depends on the changed symbol in the first service model, and flags that the target symbol in the second service model has a semantic problem schematic diagram.
  6. 根据权利要求1、4或5所述的方法,其中,所述方法还包括:The method according to claim 1, 4 or 5, wherein said method further comprises:
    在所述第二服务模型的语义校验结果用于指示所述第二服务模型存在语义问题的情况下,获取用于解决所述第二服务模型的语义问题的至少一个解决方案;If the semantic verification result of the second service model is used to indicate that there is a semantic problem in the second service model, acquiring at least one solution for solving the semantic problem of the second service model;
    向所述第二服务模型的开发人员使用的终端发送所述解决方案。The solution is sent to a terminal used by a developer of the second service model.
  7. 根据权利要求1所述的方法,其中,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    接收终端提交的优化后的第二服务模型;优化后的第二服务模型是开发人员使用所述终端对存在语义问题的第二服务模型优化后得到的;receiving the optimized second service model submitted by the terminal; the optimized second service model is obtained by the developer using the terminal to optimize the second service model with semantic problems;
    对优化后的第二服务模型进行语义校验,得到优化后的第二服务模型的语义校验结果;Performing semantic verification on the optimized second service model to obtain a semantic verification result of the optimized second service model;
    在优化后的第二服务模型的语义校验结果用于指示优化后的第二服务模型不存在语义问题的情况下,向所述终端发送优化后的第二服务模型不存在语义问题的语义校验结果。When the semantic verification result of the optimized second service model is used to indicate that there is no semantic problem in the optimized second service model, send the semantic verification that the optimized second service model does not have semantic problems to the terminal. test results.
  8. 根据权利要求2所述的方法,其中,所述对所述第二服务模型进行语义校验,包括:The method according to claim 2, wherein said performing semantic verification on the second service model comprises:
    在所述目标应用涉及的作用域中,确定所述第二服务模型所涉及的目标作用域;In the scope involved in the target application, determine the target scope involved in the second service model;
    获取所述目标作用域涉及的符号表,所述符号表中至少包括:所述目标作用域涉及的符号以及所述目标作用域涉及的符号的类型;Obtaining a symbol table involved in the target scope, where the symbol table at least includes: symbols involved in the target scope and types of symbols involved in the target scope;
    至少根据所述目标作用域涉及的符号表,对所述第二服务模型进行符号的类型相关的语义校验。At least according to the symbol table involved in the target scope, perform symbol type-related semantic check on the second service model.
  9. 根据权利要求8所述的方法,其中,所述至少根据所述目标作用域涉及的符号表,对所述第二服务模型进行符号的类型相关的语义校验,包括:The method according to claim 8, wherein, at least according to the symbol table involved in the target scope, performing symbol type-related semantic verification on the second service model includes:
    对于所述第二服务模型引用的任意一个符号,在所述符号对一个结构体的成员引用的情况下,获取被引用的所述结构体的成员的类型,根据被引用的所述结构体的成员的类型确定所述符号的类型,根据所述符号的类型对所述符号进行类型相关的语义校验;For any symbol referenced by the second service model, if the symbol refers to a member of a structure, obtain the type of the member of the structure that is referenced, according to the member of the structure that is referenced The type of the member determines the type of the symbol, and performs type-related semantic check on the symbol according to the type of the symbol;
    或者,or,
    对于所述第二服务模型引用的任意一个符号,在所述符号为表达式的情况下,获取所述表达式中的操作符,根据所述表达式中的操作符确定所述符号的类型,根据所述符号的类型对所述符号进行类型相关的语义校验;For any symbol referenced by the second service model, if the symbol is an expression, obtain an operator in the expression, and determine the type of the symbol according to the operator in the expression, performing a type-related semantic check on the symbol according to the type of the symbol;
    或者,or,
    对于所述第二服务模型引用的任意一个符号,在所述符号调用了函数的情况下,获取所述函数的返回值的类型,根据所述函数的返回值的类型确定所述符号的类型,根据所述符号的类型对所述符号进行类型相关的语义校验。For any symbol referenced by the second service model, if the symbol calls a function, obtain the type of the return value of the function, and determine the type of the symbol according to the type of the return value of the function, A type-related semantic check is performed on the symbol according to the type of the symbol.
  10. 根据权利要求2所述的方法,其中,所述对所述第二服务模型进行语义校验,包括:The method according to claim 2, wherein said performing semantic verification on the second service model comprises:
    检测所述第二服务模型中引用的符号的类型在所述目标应用中是否被定义;和/或,detecting whether a type of a symbol referenced in the second service model is defined in the target application; and/or,
    检测所述第二服务模型中引用的符号在所述目标应用中是否被定义;和/或,detecting whether a symbol referenced in the second service model is defined in the target application; and/or,
    检测所述第二服务模型中的期望引用的符号的类型以及实际引用的符号的类型是否 匹配;和/或,Detecting whether the type of the expected referenced symbol in the second service model matches the type of the actually referenced symbol; and/or,
    检测所述第二服务模型中定义的符号在所述第二服务模型中是否被引用;和/或,detecting whether a symbol defined in the second service model is referenced in the second service model; and/or,
    检测所述第二服务模型中的流程分支是否具有被执行的触发条件;和/或,Detecting whether a process branch in the second service model has a trigger condition to be executed; and/or,
    检测所述第二服务模型中的期望输出的数据的类型与实际输出的数据的类型是否匹配;和/或,Detecting whether the expected output data type in the second service model matches the actual output data type; and/or,
    检测所述第二服务模型中是否存在起始节点以及结束节点;和/或,Detecting whether a start node and an end node exist in the second service model; and/or,
    检测所述第二服务模型中的表达式中的成员的类型与表达式支持的成员的类型是否匹配。Detecting whether the type of the member in the expression in the second service model matches the type of the member supported by the expression.
  11. 一种数据处理方法,应用于终端,所述方法包括:A data processing method applied to a terminal, the method comprising:
    接收服务端发送的示意图;所述示意图用于指示依赖关系且标记第二服务模型存在语义问题,所述依赖关系包括所述第二服务模型以及第一服务模型之间的依赖关系;所述依赖关系是所述服务端在对所述第二服务模型进行语义校验,并得到用于指示所述第二服务模型存在语义问题的语义校验结果的情况下获取的,所述第二服务模型包括在所述服务端中的第一服务模型被变更的情况下,在所述服务端中的多个应用中的至少部分应用中查找的依赖所述第一服务模型的至少一个服务模型;各个应用分别是至少借助所述服务端中的多个服务模型在所述服务端中开发的;应用中包括的至少部分服务模型之间具有依赖关系;receiving a schematic diagram sent by the server; the schematic diagram is used to indicate a dependency relationship and mark a semantic problem in the second service model, and the dependency relationship includes a dependency relationship between the second service model and the first service model; the dependency The relationship is obtained when the server performs semantic verification on the second service model and obtains a semantic verification result indicating that there is a semantic problem in the second service model, and the second service model When the first service model in the server is changed, at least one service model that depends on the first service model is searched in at least some of the multiple applications in the server; each The applications are developed in the server at least by means of multiple service models in the server; at least some of the service models included in the application have dependencies;
    渲染所述示意图。Render the schematic.
  12. 根据权利要求11所述的方法,其中,所述方法还包括:The method according to claim 11, wherein the method further comprises:
    在接收到对所述示意图中的其中一个第二服务模型的触控操作的情况下,根据所述触控操作获取所述其中一个第二服务模型的源代码文件;In the case of receiving a touch operation on one of the second service models in the schematic diagram, acquiring a source code file of the one of the second service models according to the touch operation;
    显示所述其中一个第二服务模型的源代码文件中的源代码。The source code in the source code file of the one of the second service models is displayed.
  13. 根据权利要求12所述的方法,其中,所述显示所述其中一个第二服务模型的源代码文件中的源代码,包括:The method according to claim 12, wherein the displaying the source code in the source code file of the one of the second service models comprises:
    在所述其中一个第二服务模型中确定由所述第一服务模型中的被变更的符号引发语义问题的目标符号;determining target symbols in said one of the second service models that cause semantic problems caused by the altered symbols in said first service model;
    在所述其中一个第二服务模型的源代码文件中确定所述目标符号的源代码;determining the source code of the target symbol in the source code file of the one of the second service models;
    显示所述目标符号的源代码。Display the source code for the target symbol.
  14. 根据权利要求11所述的方法,其中,所述方法还包括:The method according to claim 11, wherein the method further comprises:
    对于每一个第二服务模型,在接收到对所述第二服务模型的优化操作的情况下,根据所述优化操作对所述第二服务模型优化,得到优化后的第二服务模型;For each second service model, when an optimization operation on the second service model is received, optimize the second service model according to the optimization operation to obtain an optimized second service model;
    向服务端提交优化后的第二服务模型;Submit the optimized second service model to the server;
    在接收到服务端反馈的、优化后的第二服务模型不存在语义问题的语义校验结果的情况下,在所述示意图中取消标记优化后的第二服务模型存在语义问题。In the case of receiving the semantic verification result fed back by the server that the optimized second service model has no semantic problem, cancel the mark in the schematic diagram that the optimized second service model has a semantic problem.
  15. 一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计 算机程序,其特征在于,所述处理器执行所述程序时实现如权利要求1至14中任一项所述的方法的步骤。An electronic device, comprising a memory, a processor, and a computer program stored on the memory and operable on the processor, wherein the processor implements any one of claims 1 to 14 when executing the program. The steps of the method.
  16. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至14中任一项所述的方法的步骤。A computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the method according to any one of claims 1 to 14 is implemented. step.
PCT/CN2022/135115 2021-12-08 2022-11-29 Data processing method and apparatus WO2023103844A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111493127.8 2021-12-08
CN202111493127.8A CN113900663B (en) 2021-12-08 2021-12-08 Data processing method and device

Publications (1)

Publication Number Publication Date
WO2023103844A1 true WO2023103844A1 (en) 2023-06-15

Family

ID=79025795

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/135115 WO2023103844A1 (en) 2021-12-08 2022-11-29 Data processing method and apparatus

Country Status (2)

Country Link
CN (1) CN113900663B (en)
WO (1) WO2023103844A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113900663B (en) * 2021-12-08 2022-05-10 阿里云计算有限公司 Data processing method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101866286A (en) * 2010-04-26 2010-10-20 中国科学院深圳先进技术研究院 PaaS collaboration system based on semantic relatedness and method thereof
CN106991015A (en) * 2017-03-17 2017-07-28 浙江大学 A kind of integration medical information system monitoring method marked based on message semantics
US20170286077A1 (en) * 2016-03-31 2017-10-05 Ca, Inc. Interface definition language compiler with version reconciliation
US20180067980A1 (en) * 2016-09-02 2018-03-08 Accenture Global Solutions Limited Identification of code object dependencies
CN113900663A (en) * 2021-12-08 2022-01-07 阿里云计算有限公司 Data processing method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112286567A (en) * 2020-09-24 2021-01-29 上海航天化工应用研究所 Micro-service generation method and system based on semantic matching
CN112882763A (en) * 2020-12-17 2021-06-01 济南浪潮数据技术有限公司 Access control method, device, equipment and readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101866286A (en) * 2010-04-26 2010-10-20 中国科学院深圳先进技术研究院 PaaS collaboration system based on semantic relatedness and method thereof
US20170286077A1 (en) * 2016-03-31 2017-10-05 Ca, Inc. Interface definition language compiler with version reconciliation
US20180067980A1 (en) * 2016-09-02 2018-03-08 Accenture Global Solutions Limited Identification of code object dependencies
CN106991015A (en) * 2017-03-17 2017-07-28 浙江大学 A kind of integration medical information system monitoring method marked based on message semantics
CN113900663A (en) * 2021-12-08 2022-01-07 阿里云计算有限公司 Data processing method and device

Also Published As

Publication number Publication date
CN113900663B (en) 2022-05-10
CN113900663A (en) 2022-01-07

Similar Documents

Publication Publication Date Title
WO2019085073A1 (en) Interface test method and apparatus, computer device, and storage medium
CN110516971B (en) Anomaly detection method, device, medium and computing equipment
US8863129B2 (en) Automated caching and mirroring of immutable data in distributed virtual machines via native interface components
US8626802B2 (en) Dynamic media content previews
US10175954B2 (en) Method of processing big data, including arranging icons in a workflow GUI by a user, checking process availability and syntax, converting the workflow into execution code, monitoring the workflow, and displaying associated information
US9892019B2 (en) Use case driven stepping component automation framework
WO2016150324A1 (en) Page module rendering method, apparatus and display device
CN110990411B (en) Data structure generation method and device, and calling method and device
US10621388B2 (en) Automatic delta query support for backend databases
WO2020192141A1 (en) Method and device for simulating interface, computer apparatus, and storage medium
WO2023103844A1 (en) Data processing method and apparatus
US9026612B2 (en) Generating a custom parameter rule based on a comparison of a run-time value to a request URL
US11797271B2 (en) Dynamic web-based integrated development environment
US9892202B2 (en) Web page load time reduction by optimized authentication
CN111144804A (en) Order processing method, device and system
US11023426B1 (en) Method and system for detection of open source web application version
US9280361B2 (en) Methods and systems for a real time transformation of declarative model and layout into interactive, digital, multi device forms
WO2021120913A1 (en) Application loading method, device, user terminal and server
CN114003497A (en) Method, device and equipment for testing service system and storage medium
US9497253B2 (en) Authorization review system
CN114490266A (en) Data acquisition method, device, equipment and storage medium
US20120174078A1 (en) Smart cache for a server test environment in an application development tool
US20170161359A1 (en) Pattern-driven data generator
US10402785B2 (en) Terminal apparatus
CN111367898A (en) Data processing method, device, system, electronic equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22903266

Country of ref document: EP

Kind code of ref document: A1