[go: up one dir, main page]

CN119045884B - AI independent button multi-platform compatibility and data sharing method and system in all-in-one machine - Google Patents

AI independent button multi-platform compatibility and data sharing method and system in all-in-one machine Download PDF

Info

Publication number
CN119045884B
CN119045884B CN202411522730.8A CN202411522730A CN119045884B CN 119045884 B CN119045884 B CN 119045884B CN 202411522730 A CN202411522730 A CN 202411522730A CN 119045884 B CN119045884 B CN 119045884B
Authority
CN
China
Prior art keywords
code
function
target
statement
parameter
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202411522730.8A
Other languages
Chinese (zh)
Other versions
CN119045884A (en
Inventor
盛小木
李宁
付维龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Jiangyuan Zhizao Technology Co ltd
Original Assignee
Shenzhen Jiangyuan Zhizao Technology Co ltd
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 Shenzhen Jiangyuan Zhizao Technology Co ltd filed Critical Shenzhen Jiangyuan Zhizao Technology Co ltd
Priority to CN202411522730.8A priority Critical patent/CN119045884B/en
Publication of CN119045884A publication Critical patent/CN119045884A/en
Application granted granted Critical
Publication of CN119045884B publication Critical patent/CN119045884B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/76Adapting program code to run in a different environment; Porting
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/75Structural analysis for program understanding

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本发明涉及数据共享技术领域,揭露一种一体机中AI独立按键多平台兼容与数据共享方法及系统,方法包括:通过产品测试工具测试AI独立按键在可执行代码上的代码测试结果;分析原始代码组件的原始代码功能,并分析失败代码组件的失败代码功能,判断失败代码功能是否可以替换为原始代码功能;查询原始代码功能对应的原始代码框架与失败代码功能对应的待运行内容,将待运行内容插入至原始代码框架中;生成目标用户的用户指纹,记录历史时段中目标用户在共享平台上的调度信息;根据用户指纹,将调度信息共享至目标平台中,以完成一体机产品中的AI独立按键在目标平台上的数据共享,得到数据共享结果。本发明可以进行高效产品兼容与数据共享。

The present invention relates to the technical field of data sharing, and discloses a method and system for multi-platform compatibility and data sharing of AI independent buttons in an all-in-one machine, the method comprising: testing the code test results of AI independent buttons on executable codes by a product testing tool; analyzing the original code function of the original code component, and analyzing the failed code function of the failed code component, and judging whether the failed code function can be replaced by the original code function; querying the original code framework corresponding to the original code function and the to-be-run content corresponding to the failed code function, and inserting the to-be-run content into the original code framework; generating the user fingerprint of the target user, and recording the scheduling information of the target user on the shared platform in the historical period; sharing the scheduling information to the target platform according to the user fingerprint, so as to complete the data sharing of the AI independent buttons in the all-in-one machine product on the target platform, and obtain the data sharing result. The present invention can perform efficient product compatibility and data sharing.

Description

AI independent key multi-platform compatibility and data sharing method and system in all-in-one machine
Technical Field
The invention relates to the technical field of data sharing, in particular to a method and a system for multi-platform compatibility and data sharing of an AI independent key in an all-in-one machine.
Background
The all-in-one machine is a software product with an AI function, the AI independent key is a key capable of scheduling the AI function in the all-in-one machine, the AI independent key multi-platform compatibility is that the operation process of the AI independent key scheduling all-in-one machine in AI function can be compatible with multiple platforms, such as a software platform, a terminal platform, a server and the like, and the data sharing is that the data required in the current platform where the operation process of the AI function in the AI independent key scheduling all-in-one machine is located can be shared from other platforms.
At present, the solutions of the compatibility problem of products on platforms are various, firstly, before an integrated machine is designed, code components which cannot be compatible on the platform are detected in advance, the detected codes are modified, so that the integrated machine with the modified codes is put into use, a large amount of platform code data needs to be analyzed, the integrated machine is modified into products which can be suitable for multiple platform codes, the defects are that the workload is high, secondly, the product which can be suitable for all the platform codes cannot be constructed, when a certain user uses the integrated machine on an A platform, the left use data on a B platform needs to be used, when the user uses the integrated machine on the B platform, the left use data on the A platform needs to be deleted, and when the user needs to use the integrated machine on the B platform, the user cannot call the use data on the A platform. There is therefore a need for a solution that allows for efficient product compatibility and data sharing.
Disclosure of Invention
In order to solve the problems, the invention provides a method and a system for multi-platform compatibility and data sharing of AI independent keys in an integrated machine, which can be used for carrying out high-efficiency product compatibility and data sharing.
In a first aspect, the present invention provides a method for multi-platform compatibility and data sharing of AI independent keys in an integrated machine, including:
Installing an all-in-one product on a target platform, constructing a product testing tool of the all-in-one product on the target platform, inquiring an executable code in the target platform, and calling the executable code to an AI independent key of the all-in-one product by using the product testing tool so as to test a code testing result of the AI independent key on the executable code by using the product testing tool;
when the code test result is that the code test fails, acquiring a failure code component corresponding to the original code component of the AI independent key and the code test result, analyzing the original code function of the original code component, analyzing the failure code function of the failure code component, and judging whether the failure code function can be replaced by the original code function;
When the failure code function can be replaced by the original code function, inquiring the original code frame corresponding to the original code function and the content to be operated corresponding to the failure code function, and inserting the content to be operated into the original code frame to finish product compatibility of AI independent keys in the integrated machine product on the target platform, so as to obtain a product compatibility result;
Acquiring target information of a target user of an AI independent key on the target platform, generating a user fingerprint of the target user based on the target information, acquiring a sharing platform of the target platform, and recording scheduling information of the target user on the sharing platform in a history period;
And sending the user fingerprint from the target platform to the sharing platform, wherein in the sharing platform, the scheduling information is shared to the target platform according to the user fingerprint so as to complete data sharing of the AI independent keys in the integrated machine product on the target platform and obtain a data sharing result.
In a possible implementation manner of the first aspect, the testing, by the product testing tool, a code test result of the AI independent key on the executable code includes:
acquiring a first code statement of the AI independent key on the integrated machine product;
The first code statement comprises a first assignment statement, a first function call statement, a first return statement and a first control statement;
analyzing the first dependency relationship in the first code statement by using the following rules:
;
;
;
;
wherein, Representing a first assignment statementIs used in the first dependency relationship of (a),Representing a first function call statementIs used in the first dependency relationship of (a),Representing a first return statementIs used in the first dependency relationship of (a),Representing a first control statementIs used in the first dependency relationship of (a),Representing the input parameters of the first code statement,Comprising a pair ofIn the form of operations and variants of (c),Representing the output parameters of the first code statement,The name of the function to be called is represented,The call-up relationship is represented by a relation,A return operation is indicated and a return operation is indicated,Representing the caller of the return operation,The control function is represented by a function of the control,Representing an output result under the constraint of satisfying the control function;
acquiring a second code statement in the executable code;
The second code statement comprises a second assignment statement, a second function call statement, a second return statement and a second control statement;
Analyzing a second dependency relationship in the second code statement;
Identifying a third dependency between the first dependency and the second dependency;
Generating a test parameter of the third dependency relationship;
Performing random negation operation on the test parameters to obtain negation parameters;
Generating a test case of the AI independent key on the executable code by utilizing the third dependency relationship and the inverting parameter;
And according to the test case, testing a code test result of the AI independent key on the executable code by using the product test tool.
In a possible implementation manner of the first aspect, the analyzing the original code function of the original code component includes:
acquiring a first code statement in the original code component;
querying a first dependency relationship of the first code statement;
querying a fourth dependency relationship between the first code statement of the original code component and the first code statements of other original code components of the original code component;
Replacing the input parameters and the output parameters in the fourth dependency relationship with the original code component and the other original code components to obtain a fifth dependency relationship;
And taking the first dependency relationship and the fifth dependency relationship as original code functions.
In a possible implementation manner of the first aspect, the analyzing the failure code function of the failure code component includes:
acquiring a third dependency relationship in the failure code component;
Querying a target dependency relationship in the executable code in the third dependency relationship;
and taking the target dependency relationship as a failure code function.
In a possible implementation manner of the first aspect, the determining whether the failure code function may be replaced by the original code function includes:
acquiring a relation between a first parameter and a first parameter in the original code function;
Acquiring a relation between a second parameter and a second parameter in the failure code function;
Calculating the parameter similarity between the parameter format of the first parameter and the parameter format of the second parameter by using the following formula:
;
wherein, The degree of similarity of the parameters is indicated,The first parameter is represented in the parameter formatThe true value of the individual character is,The second parameter is represented in the parameter formatThe true value of the individual character is,A sequence number of any character in the parameter format representing the first parameter,The number of characters in the parameter format representing the first parameter,A sequence number of any character in the parameter format representing the second parameter;
when the parameter similarity is larger than a preset similarity, obtaining a convertible format of the second parameter;
Calculating the format similarity between the parameter format of the first parameter and the convertible format;
when the parameter similarity and the format similarity are not greater than the preset similarity, calculating the relationship similarity between the characters in the first parameter relationship and the characters in the second parameter relationship by using the following formula:
;
wherein, The degree of similarity of the relationships is indicated,Representing the first parameter relationshipFirst parameter relation ofThe function of the device is that,Representing the first parameter in the second parameter relationSecond parameter relation ofThe function of the device is that,Representing the first parameter relationshipThe number of functions of the first parameter relationship;
when the character similarity is not greater than a preset similarity, judging whether the execution condition of the original code function accords with the execution condition on the target platform;
when the execution conditions of the original code function meet the execution conditions on the target platform, judging that the failure code function can be replaced by the original code function;
When the execution conditions of the original code function do not accord with the execution conditions on the target platform, judging that the failed code function can not be replaced by the original code function;
And when the character similarity is larger than a preset similarity, judging that the failure code function cannot be replaced by the original code function.
In one possible implementation manner of the first aspect, the querying the content to be executed corresponding to the failure code function and the original code frame corresponding to the original code function includes:
obtaining the functional similarity between the original code function and the failure code function;
Selecting the usable relation of the failure code function from the original code functions by utilizing the function similarity;
Taking the usable relation as an original code frame;
identifying an unusable relationship from the fail code function using the functional similarity;
Extracting remaining parameters other than the unusable relationship from the fail code function;
And taking the residual parameters as contents to be operated.
In a possible implementation manner of the first aspect, the inserting the content to be executed into the original code frame includes:
acquiring an unusable relation corresponding to the failure code function;
removing unusable content corresponding to the unusable relation from the content to be operated to obtain usable content;
matching the dependency relationship of the usable content in the failure code function with the dependency relationship corresponding to the original code frame to obtain a dependency matching result;
Based on the dependency matching result, the useable content is inserted into the original code frame.
In a possible implementation manner of the first aspect, the generating, based on the target information, a user fingerprint of the target user includes:
Identifying a target address, target time and a target account of the target user from the target information;
according to the target time and the target account, calculating the address frequency of the target address by using the following formula:
;
wherein, Indicating the frequency of the addresses and,Indicating the occurrence of the firstTarget time and the firstThe total number of destination addresses present on the premise of the individual destination accounts,Indicating the occurrence of the firstTarget time and the firstOccurrences of occurrences under the premise of the individual target accountsThe total number of individual target addresses;
calculating the time frequency of the target time according to the target address and the target account;
Calculating the account frequency of the target account according to the target address and the target time;
the target address, the target time and the target account, the address frequency, the time frequency and the account frequency are taken as the user fingerprint.
In a possible implementation manner of the first aspect, in the sharing platform, sharing the scheduling information to the target platform according to the user fingerprint includes:
Acquiring fingerprint information and storage information in the scheduling information in a sharing platform;
after the new information in the stored information is reserved in a sharing platform, calculating the fingerprint similarity between the user fingerprint and the fingerprint information;
When the fingerprint similarity is larger than a similarity threshold, acquiring shared information belonging to the fingerprint information in the new information;
And returning the sharing information from the sharing platform to the target platform so as to complete the process of sharing the scheduling information to the target platform.
In a second aspect, the present invention provides an AI independent key multi-platform compatible and data sharing system in an all-in-one machine, the system comprising:
The code testing module is used for installing an integrated machine product on a target platform, constructing a product testing tool of the integrated machine product on the target platform, inquiring an executable code in the target platform, and calling the executable code to an AI independent key of the integrated machine product by using the product testing tool so as to test a code testing result of the AI independent key on the executable code by using the product testing tool;
The function replacement module is used for acquiring an original code component of the AI independent key and a failure code component corresponding to the code test result when the code test result is that the code test fails, analyzing the original code function of the original code component, analyzing the failure code function of the failure code component and judging whether the failure code function can be replaced by the original code function;
The product compatibility module is used for inquiring the content to be operated of an original code frame corresponding to the original code function and the content to be operated corresponding to the failure code function when the failure code function can be replaced by the original code function, and inserting the content to be operated into the original code frame so as to finish product compatibility of the AI independent keys in the integrated machine product on the target platform and obtain a product compatibility result;
The information recording module is used for collecting target information of a target user on the target platform by the AI independent key, generating a user fingerprint of the target user based on the target information, acquiring a sharing platform of the target platform, and recording scheduling information of the target user on the sharing platform in a history period;
And the data sharing module is used for sending the user fingerprint from the target platform to the sharing platform, and sharing the scheduling information to the target platform according to the user fingerprint in the sharing platform so as to finish data sharing of the AI independent keys in the integrated machine product on the target platform and obtain a data sharing result.
Compared with the prior art, the technical principle and beneficial effect of this scheme lie in:
The embodiment of the invention tests the code test result of the AI independent key on the executable code by the product test tool for the code test when the AI function in the AI independent key scheduling all-in-one machine is carried out on the executable code, is mainly used for testing whether the scheduling error occurs when the AI function in the AI independent key scheduling all-in-one machine schedules the executable code on a target platform, further, the embodiment of the invention analyzes the original code function of the original code component to analyze the calling relation in code sentences and the calling relation among components, thereby enlarging the range of the calling relation, being convenient for searching the calling relation for replacement in the follow-up, according to the embodiment of the invention, the content to be operated is inserted into the original code frame so as to be used for modifying executable codes on a target platform, so that the compatibility between an integrated product and the platform is improved in advance without modifying the compatibility of the integrated product, and the inefficiency of the integrated product in continuously modifying own codes for continuously being compatible with various platforms is reduced. Therefore, the method and the system for multi-platform compatibility and data sharing of the AI independent keys in the integrated machine can be used for high-efficiency product compatibility and data sharing.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the invention or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, and it will be obvious to a person skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic flow chart of a method for AI independent key multi-platform compatibility and data sharing in an integrated machine according to an embodiment of the invention;
Fig. 2 is a schematic block diagram of an AI independent key multi-platform compatible and data sharing system in an integrated machine according to an embodiment of the present invention.
Detailed Description
It should be understood that the detailed description is presented by way of example only and is not intended to limit the invention.
The embodiment of the invention provides an AI independent key multi-platform compatible and data sharing method in an all-in-one machine, wherein an execution main body of the AI independent key multi-platform compatible and data sharing method in the all-in-one machine comprises, but is not limited to, at least one of a server, a terminal and the like which can be configured to execute the method provided by the embodiment of the invention. In other words, the method for the compatibility and data sharing of the AI independent key multi-platform in the all-in-one machine can be implemented by software or hardware installed in a terminal device or a server device, wherein the software can be a blockchain platform. The server side comprises, but is not limited to, a single server, a server cluster, a cloud server or a cloud server cluster and the like. The server may be an independent server, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms.
Referring to fig. 1, a flow chart of a method for AI independent key multi-platform compatibility and data sharing in an integrated machine according to an embodiment of the invention is shown. The method for multi-platform compatibility and data sharing of the AI independent key in the all-in-one machine described in FIG. 1 comprises the following steps:
s1, installing an integrated machine product on a target platform, constructing a product testing tool of the integrated machine product on the target platform, inquiring an executable code in the target platform, and calling the executable code to an AI independent key of the integrated machine product by using the product testing tool so as to test a code testing result of the AI independent key on the executable code by using the product testing tool.
In the embodiment of the invention, the target platform, such as a software platform, a terminal platform, a server and the like, is mainly used for generating the input code data, such as a fuzzy tester, of the test case corresponding to the test case running on the integrated machine product and the target platform, and the executable code refers to the code in the executable file.
Further, the embodiment of the invention tests the code test result of the AI independent key on the executable code through the product test tool, is used for testing the code when the AI function in the AI independent key scheduling all-in-one machine is carried out on the executable code, and is mainly used for testing whether the scheduling error occurs when the executable code on the target platform is scheduled when the AI function in the AI independent key scheduling all-in-one machine is scheduled.
In an embodiment of the invention, the test of the code test result of the AI independent key on the executable code by the product test tool comprises the steps of obtaining a first code statement of the AI independent key on the integrated product, wherein the first code statement comprises a first assignment statement, a first function call statement, a first return statement and a first control statement, and analyzing a first dependency relationship in the first code statement by utilizing the following rules:
;
;
;
;
wherein, Representing a first assignment statementIs used in the first dependency relationship of (a),Representing a first function call statementIs used in the first dependency relationship of (a),Representing a first return statementIs used in the first dependency relationship of (a),Representing a first control statementIs used in the first dependency relationship of (a),Representing the input parameters of the first code statement,Comprising a pair ofIn the form of operations and variants of (c),Representing the output parameters of the first code statement,The name of the function to be called is represented,The call-up relationship is represented by a relation,A return operation is indicated and a return operation is indicated,Representing the caller of the return operation,The control function is represented by a function of the control,Representing an output result under the constraint of satisfying the control function;
The method comprises the steps of obtaining a second code statement in an executable code, wherein the second code statement comprises a second assignment statement, a second function call statement, a second return statement and a second control statement, analyzing a second dependency relationship in the second code statement, identifying a third dependency relationship between the first dependency relationship and the second dependency relationship, generating test parameters of the third dependency relationship, performing random negation operation on the test parameters to obtain negation parameters, generating a test case of the AI independent key on the executable code by using the third dependency relationship and the negation parameters, and testing a code test result of the AI independent key on the executable code by using a product test tool according to the test case.
Wherein, Comprising a pair ofIs to (1) operation and transformation formThe transformation form comprises a pointer form and an array form, and the like, the third dependency relationship refers to the relationship that the first code statement calls the second code statement, and the test parameters are in the first dependency relationship
Optionally, the process of performing the random inversion operation on the test parameter to obtain the inversion parameter refers to obtaining the number of machines of the test parameter, that is, in the form of 0 and 1, inverting 0 to obtain 1, and inverting 1 to obtain 0.
S2, when the code test result is that the code test fails, acquiring an original code component of the AI independent key and a failure code component corresponding to the code test result, analyzing an original code function of the original code component, analyzing a failure code function of the failure code component, and judging whether the failure code function can be replaced by the original code function.
In the embodiment of the present invention, the original code component refers to all code data during the operation of the AI independent key, for example, a set of multiple statements made up of the foregoing first code statement, and the failure code component refers to a code set in which a scheduling error occurs when an executable code on a target platform is scheduled during AI function scheduling in an AI independent key scheduling all-in-one machine, including a partial code set of the first code statement and the second code statement.
Further, the embodiment of the invention analyzes the original code function of the original code component to be used for analyzing the calling relation in the code statement and the calling relation between the components, thereby increasing the range of the calling relation and facilitating the subsequent searching of the calling relation for replacement.
In an embodiment of the invention, the analyzing the original code function of the original code component comprises the steps of obtaining a first code statement in the original code component, inquiring a first dependency relationship of the first code statement, inquiring a fourth dependency relationship between the first code statement of the original code component and first code statements of other original code components of the original code component, replacing input parameters and output parameters in the fourth dependency relationship with the original code component and the other original code components to obtain a fifth dependency relationship, and taking the first dependency relationship and the fifth dependency relationship as the original code function.
The fourth dependency relationship refers to a dependency relationship on a component level, for example, the first dependency relationship is a dependency relationship on a code statement level, and input parameters and output parameters in the fourth dependency relationship are an original code component and other original code components.
In one embodiment of the invention, the analysis of the failure code function of the failure code component comprises the steps of obtaining a third dependency relationship in the failure code component, inquiring a target dependency relationship in the executable code in the third dependency relationship, and taking the target dependency relationship as the failure code function.
In an embodiment of the present invention, the determining whether the failed code function can be replaced by the original code function includes obtaining a relationship between a first parameter and a first parameter in the original code function, obtaining a relationship between a second parameter and a second parameter in the failed code function, and calculating a parameter similarity between a parameter format of the first parameter and a parameter format of the second parameter by using the following formula:
;
wherein, The degree of similarity of the parameters is indicated,The first parameter is represented in the parameter formatThe true value of the individual character is,The second parameter is represented in the parameter formatThe true value of the individual character is,A sequence number of any character in the parameter format representing the first parameter,The number of characters in the parameter format representing the first parameter,A sequence number of any character in the parameter format representing the second parameter;
when the parameter similarity is larger than the preset similarity, a convertible format of the second parameter is obtained, the format similarity between the parameter format of the first parameter and the convertible format is calculated, and when the parameter similarity is not larger than the preset similarity, the relationship similarity between the characters in the first parameter relationship and the characters in the second parameter relationship is calculated by using the following formula:
;
wherein, The degree of similarity of the relationships is indicated,Representing the first parameter relationshipFirst parameter relation ofThe function of the device is that,Representing the first parameter in the second parameter relationSecond parameter relation ofThe function of the device is that,Representing the first parameter relationshipThe number of functions of the first parameter relationship;
when the character similarity is not more than the preset similarity, judging whether the execution condition of the original code function accords with the execution condition on the target platform, when the execution condition of the original code function accords with the execution condition on the target platform, judging that the failure code function can be replaced by the original code function, when the execution condition of the original code function does not accord with the execution condition on the target platform, judging that the failure code function can not be replaced by the original code function, and when the character similarity is more than the preset similarity, judging that the failure code function can not be replaced by the original code function.
Wherein the first parameter relationship is as described aboveThe true value refers to the representation of the code in the machine, and can only be 0 and 1, the convertible format refers to other formats into which the second parameter can be converted, such as word, xml and other formats on the file level, the formats of different forms of representation on the code level and the like, and the first parameter is related toThe preset similarity is set according to an actual scene, and the execution condition refers to an environment limit to be met when the original code function is executed.
S3, when the failure code function can be replaced by the original code function, inquiring the original code frame corresponding to the original code function and the content to be operated corresponding to the failure code function, and inserting the content to be operated into the original code frame to finish product compatibility of the AI independent keys in the integrated machine product on the target platform, so as to obtain a product compatibility result.
In an embodiment of the invention, the query of the content to be operated corresponding to the failure code function and the original code frame corresponding to the original code function comprises the steps of obtaining the function similarity between the original code function and the failure code function, selecting the usable relation of the failure code function from the original code function by utilizing the function similarity, using the usable relation as the original code frame, identifying the unusable relation from the failure code function by utilizing the function similarity, extracting the residual parameters except the unusable relation from the failure code function, and using the residual parameters as the content to be operated.
The functional similarity includes the parameter similarity, the format similarity and the character similarity, the usable relationship refers to a parameter relationship which corresponds to the functional relationship capable of replacing the failure code when the functional similarity is not greater than the preset similarity, and the unusable relationship refers to a parameter relationship in the functional relationship corresponding to the failure code when the functional similarity is greater than the preset similarity.
Furthermore, the embodiment of the invention inserts the content to be operated into the original code frame to be used for modifying the executable code on the target platform, so that the compatibility between the integrated product and the platform is not required to be modified in advance, and the inefficiency of the integrated product to continuously modify the code for continuously being compatible with various platforms is reduced.
In an embodiment of the invention, the inserting the content to be operated into the original code frame comprises the steps of obtaining an unusable relation corresponding to the failed code function, removing the unusable content corresponding to the unusable relation from the content to be operated to obtain usable content, matching the dependent relation of the usable content in the failed code function with the dependent relation corresponding to the original code frame to obtain a dependent matching result, and inserting the usable content into the original code frame based on the dependent matching result.
And if the dependency matching result is a matching result between the relation of the A call B in the function call relation in the failure code function and the relation of the first parameter call second parameter corresponding to the original code frame, inserting the A into the position of the first parameter and inserting the B into the position of the second parameter.
S4, acquiring target information of a target user of the AI independent key on the target platform, generating a user fingerprint of the target user based on the target information, acquiring a sharing platform of the target platform, and recording scheduling information of the target user on the sharing platform in a history period.
In the embodiment of the invention, the target information refers to all code scheduling information when a target user runs on the target platform through the AI independent key.
In one embodiment of the invention, the generating the user fingerprint of the target user based on the target information comprises identifying a target address, target time and target account of the target user from the target information, and calculating the address frequency of the target address according to the target time and the target account by using the following formula:
;
wherein, Indicating the frequency of the addresses and,Indicating the occurrence of the firstTarget time and the firstThe total number of destination addresses present on the premise of the individual destination accounts,Indicating the occurrence of the firstTarget time and the firstOccurrences of occurrences under the premise of the individual target accountsThe total number of individual target addresses;
The method comprises the steps of calculating time frequency of target time according to the target address and the target account, calculating account frequency of the target account according to the target address and the target time, and taking the target address, the target time, the target account, the address frequency, the time frequency and the account frequency as the user fingerprint.
It should be noted that, the process of calculating the time frequency of the target time and the process of calculating the account frequency of the target account are similar to the principle of calculating the address frequency of the target address, and are not further described herein.
Further, the sharing platform refers to other target platforms when the target user runs through the AI independent key.
S5, sending the user fingerprint from the target platform to the sharing platform, and sharing the scheduling information to the target platform according to the user fingerprint in the sharing platform so as to complete data sharing of the AI independent keys in the integrated machine product on the target platform and obtain a data sharing result.
According to the embodiment of the invention, the scheduling information is shared into the target platform according to the user fingerprint in the sharing platform, so that the data newly generated when the user scheduling data is only reserved in the sharing platform is used for deleting the fixed code data, the storage amount of the user calling data can be reduced, and the scheduling when the data is required by the subsequent target platform is reserved.
In an embodiment of the invention, the sharing of the scheduling information to the target platform according to the user fingerprint in the sharing platform comprises the steps of obtaining fingerprint information and storage information in the scheduling information in the sharing platform, calculating fingerprint similarity between the user fingerprint and the fingerprint information after new information in the storage information is reserved in the sharing platform, obtaining sharing information belonging to the fingerprint information in the new information when the fingerprint similarity is greater than a similarity threshold, and returning the sharing information from the sharing platform to the target platform so as to complete the process of sharing the scheduling information to the target platform.
The storage information refers to all operation data of a user when the user operates the all-in-one product in the sharing platform, the new generation information refers to all newly generated data except fixed code data of the all-in-one product, such as newly added chat record data in WeChat products, the fingerprint similarity can be obtained through calculation of a Pelson correlation coefficient, and the similarity threshold is set according to an actual scene.
It can be seen that, in the embodiment of the present invention, the code test result of the AI independent key on the executable code is tested by the product test tool, so as to be used for testing the code when the AI independent key is used for performing AI function in the AI independent key scheduling all-in-one machine on the executable code, and is mainly used for testing whether a scheduling error occurs when the AI independent key is used for scheduling the executable code on the target platform when the AI function is performed in the AI independent key scheduling all-in-one machine, further, by analyzing the original code function of the original code component, the method and the device are used for analyzing the calling relationship in the code statement and the calling relationship between the components, thereby increasing the scope of the calling relationship, being convenient for searching the calling relationship for replacement later, according to the embodiment of the invention, the content to be operated is inserted into the original code frame so as to be used for modifying executable codes on a target platform, so that the compatibility between an integrated product and the platform is improved in advance without modifying the compatibility of the integrated product, and the inefficiency of the integrated product in continuously modifying own codes for continuously being compatible with various platforms is reduced. Therefore, the method and the system for multi-platform compatibility and data sharing of the AI independent keys in the integrated machine can be used for high-efficiency product compatibility and data sharing.
FIG. 2 is a functional block diagram of an AI independent key multi-platform compatible and data sharing system in an all-in-one machine of the present invention.
The system 200 for multi-platform compatibility and data sharing of AI independent keys in the integrated machine of the invention can be installed in an electronic device. According to the implemented functions, the AI independent key multi-platform compatibility and data sharing system in the all-in-one machine may include a code testing module 201, a function replacing module 202, a product compatibility module 203, an information recording module 204 and a data sharing module 205. The module of the invention, which may also be referred to as a unit, refers to a series of computer program segments, which are stored in the memory of the electronic device, capable of being executed by the processor of the electronic device and of performing a fixed function.
In the embodiment of the present invention, the functions of each module/unit are as follows:
The code testing module 201 is configured to install an integrated machine product on a target platform, construct a product testing tool of the integrated machine product on the target platform, query an executable code in the target platform, and call the executable code to an AI independent key of the integrated machine product by using the product testing tool, so as to test a code testing result of the AI independent key on the executable code by using the product testing tool;
The function replacement module 202 is configured to obtain an original code component of the AI independent key and a failure code component corresponding to the code test result when the code test result is a code test failure, analyze an original code function of the original code component, analyze a failure code function of the failure code component, and determine whether the failure code function can be replaced with the original code function;
The product compatibility module 203 is configured to query an original code frame corresponding to the original code function and content to be executed corresponding to the failure code function when the failure code function can be replaced with the original code function, insert the content to be executed into the original code frame, and complete product compatibility of the AI independent keys in the all-in-one product on the target platform, so as to obtain a product compatibility result;
The information recording module 204 is configured to collect target information of a target user on the target platform by using an AI independent key, generate a user fingerprint of the target user based on the target information, obtain a shared platform of the target platform, and record scheduling information of the target user on the shared platform in a history period;
The data sharing module 205 is configured to send the user fingerprint from the target platform to the sharing platform, and in the sharing platform, the scheduling information is shared to the target platform according to the user fingerprint, so as to complete data sharing of the AI independent keys in the integrated product on the target platform, and obtain a data sharing result.
In detail, the modules in the system 200 for compatible multi-platform and data sharing of AI independent keys in the integrated machine according to the embodiment of the present invention use the same technical means as the method for compatible multi-platform and data sharing of AI independent keys in the integrated machine described in fig. 1, and can produce the same technical effects, which are not described herein again.
In addition, each functional module in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units can be realized in a form of hardware or a form of hardware and a form of software functional modules.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof.
The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
It should be noted that in this document, relational terms such as "first" and "second" and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
The foregoing is only a specific embodiment of the invention to enable those skilled in the art to understand or practice the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (9)

1. An AI independent key multi-platform compatible and data sharing method in an all-in-one machine, which is characterized by comprising the following steps:
Installing an all-in-one product on a target platform, constructing a product testing tool of the all-in-one product on the target platform, inquiring executable codes in the target platform, calling the executable codes to AI independent keys of the all-in-one product by using the product testing tool so as to test code testing results of the AI independent keys on the executable codes by using the product testing tool, wherein the testing of the code testing results of the AI independent keys on the executable codes by using the product testing tool comprises the following steps:
acquiring a first code statement of the AI independent key on the integrated machine product;
The first code statement comprises a first assignment statement, a first function call statement, a first return statement and a first control statement;
analyzing the first dependency relationship in the first code statement by using the following rules:
;
;
;
;
wherein, Representing a first assignment statementIs used in the first dependency relationship of (a),Representing a first function call statementIs used in the first dependency relationship of (a),Representing a first return statementIs used in the first dependency relationship of (a),Representing a first control statementIs used in the first dependency relationship of (a),Representing the input parameters of the first code statement,Comprising a pair ofIn the form of operations and variants of (c),Representing the output parameters of the first code statement,The name of the function to be called is represented,The call-up relationship is represented by a relation,A return operation is indicated and a return operation is indicated,Representing the caller of the return operation,The control function is represented by a function of the control,Representing an output result under the constraint of satisfying the control function;
acquiring a second code statement in the executable code;
The second code statement comprises a second assignment statement, a second function call statement, a second return statement and a second control statement;
Analyzing a second dependency relationship in the second code statement;
Identifying a third dependency between the first dependency and the second dependency;
Generating a test parameter of the third dependency relationship;
Performing random negation operation on the test parameters to obtain negation parameters;
Generating a test case of the AI independent key on the executable code by utilizing the third dependency relationship and the inverting parameter;
According to the test case, testing a code test result of the AI independent key on the executable code by using the product test tool;
when the code test result is that the code test fails, acquiring a failure code component corresponding to the original code component of the AI independent key and the code test result, analyzing the original code function of the original code component, analyzing the failure code function of the failure code component, and judging whether the failure code function can be replaced by the original code function;
When the failure code function can be replaced by the original code function, inquiring the original code frame corresponding to the original code function and the content to be operated corresponding to the failure code function, and inserting the content to be operated into the original code frame to finish product compatibility of AI independent keys in the integrated machine product on the target platform, so as to obtain a product compatibility result;
Acquiring target information of a target user of an AI independent key on the target platform, generating a user fingerprint of the target user based on the target information, acquiring a sharing platform of the target platform, and recording scheduling information of the target user on the sharing platform in a history period;
And sending the user fingerprint from the target platform to the sharing platform, wherein in the sharing platform, the scheduling information is shared to the target platform according to the user fingerprint so as to complete data sharing of the AI independent keys in the integrated machine product on the target platform and obtain a data sharing result.
2. The method of claim 1, wherein said analyzing original code functionality of said original code component comprises:
acquiring a first code statement in the original code component;
querying a first dependency relationship of the first code statement;
querying a fourth dependency relationship between the first code statement of the original code component and the first code statements of other original code components of the original code component;
Replacing the input parameters and the output parameters in the fourth dependency relationship with the original code component and the other original code components to obtain a fifth dependency relationship;
And taking the first dependency relationship and the fifth dependency relationship as original code functions.
3. The method of claim 1, wherein the analyzing the failure code function of the failure code component comprises:
acquiring a third dependency relationship in the failure code component;
Querying a target dependency relationship in the executable code in the third dependency relationship;
and taking the target dependency relationship as a failure code function.
4. The method of claim 1, wherein said determining whether said failure code function is replaceable with said original code function comprises:
acquiring a relation between a first parameter and a first parameter in the original code function;
Acquiring a relation between a second parameter and a second parameter in the failure code function;
Calculating the parameter similarity between the parameter format of the first parameter and the parameter format of the second parameter by using the following formula:
;
wherein, The degree of similarity of the parameters is indicated,The first parameter is represented in the parameter formatThe true value of the individual character is,The second parameter is represented in the parameter formatThe true value of the individual character is,A sequence number of any character in the parameter format representing the first parameter,The number of characters in the parameter format representing the first parameter,A sequence number of any character in the parameter format representing the second parameter;
when the parameter similarity is larger than a preset similarity, obtaining a convertible format of the second parameter;
Calculating the format similarity between the parameter format of the first parameter and the convertible format;
when the parameter similarity and the format similarity are not greater than the preset similarity, calculating the relationship similarity between the characters in the first parameter relationship and the characters in the second parameter relationship by using the following formula:
;
wherein, The degree of similarity of the relationships is indicated,Representing the first parameter relationshipFirst parameter relation ofThe function of the device is that,Representing the first parameter in the second parameter relationSecond parameter relation ofThe function of the device is that,Representing the first parameter relationshipThe number of functions of the first parameter relationship;
when the character similarity is not greater than a preset similarity, judging whether the execution condition of the original code function accords with the execution condition on the target platform;
when the execution conditions of the original code function meet the execution conditions on the target platform, judging that the failure code function can be replaced by the original code function;
When the execution conditions of the original code function do not accord with the execution conditions on the target platform, judging that the failed code function can not be replaced by the original code function;
And when the character similarity is larger than a preset similarity, judging that the failure code function cannot be replaced by the original code function.
5. The method according to claim 1, wherein the querying the original code frame corresponding to the original code function for the content to be run corresponding to the failure code function comprises
Obtaining the functional similarity between the original code function and the failure code function;
Selecting the usable relation of the failure code function from the original code functions by utilizing the function similarity;
Taking the usable relation as an original code frame;
identifying an unusable relationship from the fail code function using the functional similarity;
Extracting remaining parameters other than the unusable relationship from the fail code function;
And taking the residual parameters as contents to be operated.
6. The method of claim 1, wherein the inserting the content to be run into the original code framework comprises:
acquiring an unusable relation corresponding to the failure code function;
removing unusable content corresponding to the unusable relation from the content to be operated to obtain usable content;
matching the dependency relationship of the usable content in the failure code function with the dependency relationship corresponding to the original code frame to obtain a dependency matching result;
Based on the dependency matching result, the useable content is inserted into the original code frame.
7. The method of claim 1, wherein the generating the user fingerprint of the target user based on the target information comprises:
Identifying a target address, target time and a target account of the target user from the target information;
according to the target time and the target account, calculating the address frequency of the target address by using the following formula:
;
wherein, Indicating the frequency of the addresses and,Indicating the occurrence of the firstTarget time and the firstThe total number of destination addresses present on the premise of the individual destination accounts,Indicating the occurrence of the firstTarget time and the firstAppearing on the premise of the target accountThe total number of individual target addresses;
calculating the time frequency of the target time according to the target address and the target account;
Calculating the account frequency of the target account according to the target address and the target time;
the target address, the target time and the target account, the address frequency, the time frequency and the account frequency are taken as the user fingerprint.
8. The method according to claim 1, wherein the sharing, in the sharing platform, the scheduling information to the target platform according to the user fingerprint includes:
Acquiring fingerprint information and storage information in the scheduling information in a sharing platform;
after the new information in the stored information is reserved in a sharing platform, calculating the fingerprint similarity between the user fingerprint and the fingerprint information;
When the fingerprint similarity is larger than a similarity threshold, acquiring shared information belonging to the fingerprint information in the new information;
And returning the sharing information from the sharing platform to the target platform so as to complete the process of sharing the scheduling information to the target platform.
9. An AI independent key multi-platform compatible and data sharing system in an all-in-one machine, the system comprising:
The code testing module is used for installing an all-in-one product on a target platform, constructing a product testing tool of the all-in-one product on the target platform, inquiring executable codes in the target platform, calling the executable codes to AI independent keys of the all-in-one product by using the product testing tool so as to test code testing results of the AI independent keys on the executable codes by using the product testing tool, wherein the testing of the code testing results of the AI independent keys on the executable codes by using the product testing tool comprises the following steps:
acquiring a first code statement of the AI independent key on the integrated machine product;
The first code statement comprises a first assignment statement, a first function call statement, a first return statement and a first control statement;
analyzing the first dependency relationship in the first code statement by using the following rules:
;
;
;
;
wherein, Representing a first assignment statementIs used in the first dependency relationship of (a),Representing a first function call statementIs used in the first dependency relationship of (a),Representing a first return statementIs used in the first dependency relationship of (a),Representing a first control statementIs used in the first dependency relationship of (a),Representing the input parameters of the first code statement,Comprising a pair ofIn the form of operations and variants of (c),Representing the output parameters of the first code statement,The name of the function to be called is represented,The call-up relationship is represented by a relation,A return operation is indicated and a return operation is indicated,Representing the caller of the return operation,The control function is represented by a function of the control,Representing an output result under the constraint of satisfying the control function;
acquiring a second code statement in the executable code;
The second code statement comprises a second assignment statement, a second function call statement, a second return statement and a second control statement;
Analyzing a second dependency relationship in the second code statement;
Identifying a third dependency between the first dependency and the second dependency;
Generating a test parameter of the third dependency relationship;
Performing random negation operation on the test parameters to obtain negation parameters;
Generating a test case of the AI independent key on the executable code by utilizing the third dependency relationship and the inverting parameter;
According to the test case, testing a code test result of the AI independent key on the executable code by using the product test tool;
The function replacement module is used for acquiring an original code component of the AI independent key and a failure code component corresponding to the code test result when the code test result is that the code test fails, analyzing the original code function of the original code component, analyzing the failure code function of the failure code component and judging whether the failure code function can be replaced by the original code function;
The product compatibility module is used for inquiring the content to be operated of an original code frame corresponding to the original code function and the content to be operated corresponding to the failure code function when the failure code function can be replaced by the original code function, and inserting the content to be operated into the original code frame so as to finish product compatibility of the AI independent keys in the integrated machine product on the target platform and obtain a product compatibility result;
The information recording module is used for collecting target information of a target user on the target platform by the AI independent key, generating a user fingerprint of the target user based on the target information, acquiring a sharing platform of the target platform, and recording scheduling information of the target user on the sharing platform in a history period;
And the data sharing module is used for sending the user fingerprint from the target platform to the sharing platform, and sharing the scheduling information to the target platform according to the user fingerprint in the sharing platform so as to finish data sharing of the AI independent keys in the integrated machine product on the target platform and obtain a data sharing result.
CN202411522730.8A 2024-10-29 2024-10-29 AI independent button multi-platform compatibility and data sharing method and system in all-in-one machine Active CN119045884B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411522730.8A CN119045884B (en) 2024-10-29 2024-10-29 AI independent button multi-platform compatibility and data sharing method and system in all-in-one machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411522730.8A CN119045884B (en) 2024-10-29 2024-10-29 AI independent button multi-platform compatibility and data sharing method and system in all-in-one machine

Publications (2)

Publication Number Publication Date
CN119045884A CN119045884A (en) 2024-11-29
CN119045884B true CN119045884B (en) 2025-03-11

Family

ID=93579797

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411522730.8A Active CN119045884B (en) 2024-10-29 2024-10-29 AI independent button multi-platform compatibility and data sharing method and system in all-in-one machine

Country Status (1)

Country Link
CN (1) CN119045884B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2949403A1 (en) * 2016-11-22 2018-05-22 Manitoba Telecom Services Inc. System and method for maintaining sharing groups in a service delivery system
CA2997302A1 (en) * 2018-03-05 2019-09-05 Appzero Software Corp. Application migration

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8140554B2 (en) * 2008-12-19 2012-03-20 Microsoft Corporation Shared value resolution with multiple runtime containers
CN115543339A (en) * 2022-10-12 2022-12-30 中国平安人寿保险股份有限公司 Code conversion method and device, computer equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2949403A1 (en) * 2016-11-22 2018-05-22 Manitoba Telecom Services Inc. System and method for maintaining sharing groups in a service delivery system
CA2997302A1 (en) * 2018-03-05 2019-09-05 Appzero Software Corp. Application migration

Also Published As

Publication number Publication date
CN119045884A (en) 2024-11-29

Similar Documents

Publication Publication Date Title
CN108052394B (en) Resource allocation method based on SQL statement running time and computer equipment
CN111475694B (en) Data processing method, device, terminal and storage medium
CN110858172B (en) A method and device for generating automatic test code
AU2013329525C1 (en) System and method for recursively traversing the internet and other sources to identify, gather, curate, adjudicate, and qualify business identity and related data
CN110046086B (en) Expected data generation method and device for test and electronic equipment
CN112559526A (en) Data table export method and device, computer equipment and storage medium
CN112579603A (en) CDC-based data model dynamic information perception monitoring method and device
CN109285024B (en) Online feature determination method and device, electronic equipment and storage medium
CN114328534B (en) Field-based multidimensional mapping association method, device and storage medium
CN113010339A (en) Method and device for automatically processing fault in online transaction test
CN110263121B (en) Table data processing method, apparatus, electronic apparatus and computer readable storage medium
CN118733717A (en) File duplication checking method, device, equipment, storage medium and program product
CN119045884B (en) AI independent button multi-platform compatibility and data sharing method and system in all-in-one machine
CN113094283A (en) Data acquisition method, device, equipment and storage medium
CN118673119A (en) Answer generation method, device, electronic device and storage medium
CN110503504B (en) Information identification method, device and equipment of network product
CN114338846A (en) Message testing method and device
CN110309315B (en) Template file generation method and device, computer readable medium and electronic equipment
CN112836033B (en) Service model management method, device, equipment and storage medium
CN107688948A (en) Claims Resolution data processing method, device, computer equipment and storage medium
CN114579750A (en) Information processing method and device, computer equipment and storage medium
CN113138923A (en) Method and device for determining test range by analyzing modification code
CN111913700A (en) Cloud-end interaction protocol analysis method, device, equipment and storage medium
CN118113687B (en) Data compensation method, device and medium based on data quality evaluation
CN116049291B (en) Data storage method, system, device and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant