Data processing method, device and system, storage medium, equipment and program product
By building a fusion library that integrates common and differing content from external libraries, the conflict issue caused by inconsistent versions of external libraries in mobile applications is resolved, achieving stable and efficient calling and version management.
Patent Information
- Application Number
- CN202610720235.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-22
- Publication Date
- 2026-11-06
Smart Images

Figure CN123048065A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of resource processing technology, specifically to a data processing method, apparatus and system, storage medium, device and program product. Background Technology
[0002] Currently, mobile applications may integrate many functional libraries such as payment, sharing, and maps. These functional libraries also rely on other third-party libraries (external libraries) to implement their functions. Since the versions of these external libraries are often inconsistent, external library conflicts are a common problem in mobile development, especially when projects have many dependencies and involve collaboration between multiple SDKs or modules. Conflicts mainly manifest as symbol conflicts, resource conflicts, version inconsistencies, and architectural or platform compatibility issues. Summary of the Invention
[0003] This application provides a data processing method, apparatus and system, storage medium, device and program product, which reduces the possibility of external library conflicts when calling function libraries by using a fusion library obtained from different versions of external libraries.
[0004] On one hand, embodiments of this application provide a data processing method, the data processing method comprising: Receive the call request from the first program; If it is determined from the call request that the first program requests to call the first external library, the call request is routed to the first fusion library. The first fusion library includes a first content unit and at least two second content units. The first content unit is common content between the first external library and at least one second external library. The at least two second content units are different content between the first external library and at least one second external library. The first external library and the at least one second external library are constituted by the first content unit and a corresponding second content unit. The at least one second external library is a copy of a different version of the first external library.
[0005] On the other hand, embodiments of this application provide a data processing apparatus, the data processing apparatus comprising: On the other hand, embodiments of this application provide a computer-readable storage medium storing a computer program adapted for loading by a processor to execute the data processing method as described in any of the above embodiments.
[0006] On the other hand, embodiments of this application provide a computer device, the computer device including a processor and a memory, the memory storing a computer program, the processor executing the data processing method as described in any of the above embodiments by calling the computer program stored in the memory.
[0007] On the other hand, embodiments of this application provide a computer program product, including computer instructions, which, when executed by a processor, implement the data processing method as described in any of the above embodiments.
[0008] The data processing methods, apparatus and systems, storage media, devices and program products provided in this application embodiment, by setting up a fusion library, retain the content of different versions of the same external library, and avoid functional abnormalities caused by forced version unification. Attached Figure Description
[0009] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0010] Figure 1 This is a schematic diagram of the structure of the data processing system provided in the embodiments of this application.
[0011] Figure 2 This is a flowchart illustrating the data processing method provided in an embodiment of this application.
[0012] Figure 3 This is a schematic diagram of the structure of the data processing apparatus provided in the embodiments of this application.
[0013] Figure 4 This is a schematic diagram of the fusion library and external library provided in the embodiments of this application.
[0014] Figure 5 This is a flowchart illustrating the data processing method provided in an embodiment of this application.
[0015] Figure 6 This is a schematic diagram of the structure of the data processing apparatus provided in the embodiments of this application.
[0016] Figure 7 A schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0017] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0018] This application provides a data processing method, apparatus and system, storage medium, device, and program product. Specifically, the data processing method of this application can be executed by a computer device, which can be a terminal or a server. The terminal can be a smartphone, tablet, laptop, smart TV, wearable smart device, smart vehicle terminal, etc. The terminal can also include a client, which can be a game client, browser client, instant messaging client, or mini-program, etc. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery network (CDN), and big data and artificial intelligence platforms.
[0019] For example, when this data processing method is run on a terminal device, the terminal device may include a display screen and a processor. The display screen is used to present game visuals and receive instructions generated by the user interacting with the game visuals. The game visuals may include a portion of an application scene, which is a virtual world in which virtual characters act. The processor is used to store the application, run the game, generate game visuals, respond to instructions, and control the display of the game visuals on the display screen. When the user operates the game visuals through the display screen, the game visuals can control the local content of the terminal device in response to the received operation instructions. The terminal device can provide the graphical user interface to the user in various ways, such as rendering the display on the terminal device's screen or presenting the graphical user interface through holographic projection.
[0020] For example, when this data processing method runs on a server, it can be implemented and executed based on a cloud gaming system. A cloud gaming system refers to a gaming method based on cloud computing. A cloud gaming system includes servers and client devices. The application's execution and the game's visual presentation are separate; the storage and execution of the data processing method are completed on the server. The game's visual presentation is completed on the client, which is mainly used for receiving and sending game data and displaying the game visuals. For example, the client can be a display device with data transmission capabilities located close to the user, such as a mobile terminal, television, computer, PDA, personal digital assistant, or head-mounted display device. However, the terminal device for processing game data is the server in the cloud. During gameplay, the user operates the client to send commands to the server. The server controls the game's operation according to the commands, encodes and compresses game visuals and other data, returns it to the client via the network, and finally, the client decodes and outputs the game visuals.
[0021] It should be noted that, in this embodiment, the entity executing the data processing method can be a terminal device or a server. The terminal device can be a local terminal device or a client device in the aforementioned cloud gaming. This embodiment does not limit the type of the entity executing the method.
[0022] It is understood that in the specific implementation of this application, user object data, context data and other related data are involved. When the embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0023] For example, in conjunction with the above description, Figure 1 This application illustrates a data processing system 1000 for implementing a data processing method, which may include at least one terminal 1001, at least one server 1002, and a network. The user-held terminal 1001 can connect to different servers 1002 via the network. The terminal can be any device with computing hardware capable of supporting and executing software applications corresponding to the game.
[0024] In the aforementioned data processing system 1000, terminal 1001 is used to install and run applications. In some cases, applications may not need to be pre-installed on terminal 1001, and users can directly access the applications through clients such as browsers. When a user logs into the application, terminal 1001 sends a login request to server 1002. Server 1002 verifies the user's account and determines the mechanism corresponding to the account based on the login request. If the verification is successful, server 1002 returns a login success notification to terminal 1001. During the user's use of the corresponding functions through the application, terminal 1001 and server 1002 interact with each other. Terminal 1001 sends various information to server 1002. Server 1002 determines the display data for terminal 1001 based on the storage mechanism and the received information, and sends the display data back to terminal 1001 so that terminal 1001 can display the data sent by server 1002 to the user.
[0025] In possible application scenarios, different terminals 1001 may be served by different servers 1002. Therefore, in order to distinguish the servers 1002 corresponding to different terminals 1001, the embodiments of this application will use the terms "first" and "second" to describe them. In fact, the servers 1002 corresponding to different terminals 1001 can be the same server 1002. Therefore, without distinguishing between "first" and "second", it can be understood that the terminals 1001 corresponding to user accounts in the same application scenario are served by the same server 1002.
[0026] Furthermore, when the data processing system 1000 includes multiple terminals, multiple servers, and multiple networks, different terminals can connect to each other through different networks and servers. The network can be a wireless network or a wired network; for example, wireless networks include wireless local area networks (WLAN), local area networks (LAN), cellular networks, 2G networks, 3G networks, 4G networks, 5G networks, etc. Additionally, different terminals can also connect to other terminals or servers using their own Bluetooth networks or hotspot networks. Furthermore, the system 100 can include multiple databases coupled to different servers, and can continuously store game-related information in the databases while different users are playing multiplayer games online.
[0027] It should be noted that in this embodiment, multiple terminal devices run the same application. Therefore, data interaction between the multiple terminal devices can be achieved through the application's server. Thus, sending data from terminal device 1 to terminal device 2 can be understood as: terminal device 1 sends data to the application's server, and the server sends the data to terminal device 2. Receiving data from terminal device 2 can be understood as: terminal device 1 receives data sent by the application's server, which is the same data that terminal device 2 sent to the server. Alternatively, there may be no server, and terminal device 1 directly sends data to terminal device 2.
[0028] It should be noted that, Figure 1 The system diagram shown is merely an example. The data processing system 1000 described in this application embodiment is intended to more clearly illustrate the technical solutions of this application embodiment and does not constitute a limitation on the technical solutions provided in this application embodiment. As those skilled in the art will know, with the evolution of data processing systems and the emergence of new business scenarios, the technical solutions provided in this application embodiment are also applicable to similar technical problems.
[0029] It should be noted that the triggering operations mentioned in the subsequent detailed description of the data processing method provided in the embodiments of this application can all be regarded as triggering operations performed by the user through a finger or by controlling a medium such as a mouse, keyboard, or stylus. The specific medium used can be determined according to the type of computer device. For example, when the computer device is a touchscreen device such as a mobile phone, tablet computer, or game console, the user can operate on the touchscreen using any suitable object or accessory such as a finger or stylus. When the terminal device is a non-touchscreen terminal device such as a desktop computer or laptop computer, the user can operate using an external device such as a mouse or keyboard.
[0030] The technical solution of this application will be described in detail below through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0031] Please refer to Figure 2 This invention discloses a data processing method for a terminal. The data processing method includes: 01: Receive the call request from the first program; 02: If it is determined from the call request that the first program requests to call the first external library, the call request is routed to the first fusion library. The first fusion library includes a first content unit and at least two second content units. The first content unit is the common content between the first external library and at least one second external library. The at least two second content units are the different content between the first external library and at least one second external library. The first external library and at least one second external library are constituted by the first content unit and a corresponding second content unit. The at least one second external library is a copy of a different version of the first external library.
[0032] The data processing method of the present invention can be implemented by the data processing apparatus 100 of the present invention. Specifically, please refer to... Figure 3 The data processing apparatus 100 includes a receiving unit 110 and a calling unit 120. The receiving unit 110 is used to receive a calling request from a first program. The calling unit 120 is used to route the call request to a first fusion library when it is determined from the calling request that the first program requests to call a first external library. The first fusion library includes a first content unit and at least two second content units. The first content unit is common content between the first external library and at least one second external library. The at least two second content units are different content between the first external library and at least one second external library. The first external library and at least one second external library are constituted by the first content unit and a corresponding second content unit. The at least one second external library is a copy of a different version of the first external library.
[0033] Alternatively, the data processing method of the present invention can be implemented by the data processing system 1000 of the present invention. Specifically, please refer to... Figure 1 The data processing system 1000 includes a terminal 1001. The terminal 1001 is configured to: receive a call request from a first program; and, if the call request determines that the first program requests to call a first external library, route the call request to a first fusion library. The first fusion library includes a first content unit and at least two second content units. The first content unit contains common content between the first external library and at least one second external library, and the at least two second content units contain differing content between the first external library and at least one second external library. The first external library and at least one second external library are constituted by the first content unit and a corresponding second content unit, and the at least one second external library is a copy of a different version of the first external library.
[0034] The aforementioned data processing method, data processing device 100, and data processing system 1000, by setting up a fusion library, retain the content of different versions of the same external library, thus avoiding functional abnormalities caused by forced version unification.
[0035] Specifically, the first program can be an application installed within the data processing device 100, or an application installed on other electronic application devices outside the data processing device 100. The data processing device 100 can communicate with other electronic application devices and respond to loading instructions for the first program by sending loading requests to other electronic application devices. This allows the other electronic application devices to load the first program in response to the loading instructions and send relevant information after loading (such as the display interface and sound information after loading the first program) to the data processing device 100, enabling the data processing device 100 to provide feedback or output the corresponding relevant information. The first program can be a payment program, a sharing program, or a map program.
[0036] Once the first program is loaded, it will call the corresponding external library according to the relevant instructions, and then output the call request associated with the corresponding external library.
[0037] Please combine Figure 4 It is understandable that a particular external library can have multiple different versions. Figure 4 In this context, external libraries A, B, ..., N are different versions of a given external library. Each external library shares common or shared content (content a). However, for each external library, all content except content a differs from other versions. This differing content constitutes content b within the corresponding external library. For example, the differing content in external library A is content b1, in external library B it is content b2, and in external library N it is content bn. It's understandable that when an external library is called based on a request, the program typically calls the version of the external library required by the first program. If a different version of the external library is called, and content b is being called from that external library, the existence of content b can lead to certain risks, such as compile-time conflicts, runtime exceptions, and abnormal behavior.
[0038] Based on the above, please combine with Figure 4 This invention can provide a fusion library, which includes content a, content b1, content b2, ..., content bn. That is, the fusion library integrates the common content and the differing content between different versions of an external library. When a first program calls the external library, the fusion library can provide content a for the call, or it can provide the corresponding content b for the call. In this way, compared to integrating the content of multiple different versions of the external library into the fusion library, when other applications call the external library, the corresponding version of the external library can be determined according to its calling instruction, and then the content b of the corresponding version in the fusion library can be provided for the call.
[0039] For example, in one embodiment, if the first program calls external library A, the fusion library can provide content b1 for the call; if other applications need to call external library B, the fusion library can provide content b2 for the call.
[0040] In other words, when different applications call external libraries, even if the versions of the external libraries being called are different, the fusion library can provide the corresponding version of the content for the call, without causing external library conflicts due to different versions.
[0041] In addition, due to the existence of content 'a', for devices storing fusion libraries, if it is necessary to store multiple copies of external libraries for later use, it is not necessary to store content 'a' for each version copy. Instead, only one copy needs to be stored. That is, only one copy of the common content among multiple versions of the same external library is retained, which helps to significantly reduce code redundancy.
[0042] It should be noted that, please refer to... Figure 4 In some embodiments, the first external library can be external library A, and all the second external libraries can be external libraries B, ..., external libraries N respectively; the first content unit can be content a, and the second content units can be content b1, content b2, ..., content bn respectively.
[0043] In some embodiments, step 02 (routing to the first fusion library according to the call request) may include: If the object of the first program is determined to be content in the first external library other than common content, at least one second content unit corresponding to the first program is determined according to the call request and the preset call routing system.
[0044] The data processing method of the present invention can be implemented by the data processing apparatus 100 of the present invention. Specifically, please refer to... Figure 3 The calling unit 120 is used to determine, based on the calling request and a preset calling routing system, at least one second content unit corresponding to the first program when it is determined that the calling object of the first program is content other than common content in the first external library.
[0045] Alternatively, the data processing method of the present invention can be implemented by the data processing system 1000 of the present invention. Specifically, please refer to... Figure 1 Terminal 1001 is used to determine, based on the call request and a preset call routing system, at least one second content unit corresponding to the first program when it is determined that the call object of the first program is content other than common content in the first external library.
[0046] In this way, the first program's need to call external libraries can be met without changing the original dependency of the first program on external libraries.
[0047] Specifically, in some embodiments, a preset call routing system can be used to construct the routing relationship between the call interfaces of corresponding content in the original version of the external library and the call interfaces of corresponding content in the fusion library. Upon receiving a call request, the version of the external library that the first program currently needs to call and the difference content it needs to call (one of content b1, content b2, ..., content bn) can be determined based on the call request. Then, the call interface of the difference content to be called in the fusion library is determined according to the preset call routing system. During the call, the external library is not called according to the original version, but rather the corresponding difference content is called in the fusion library according to the determined call interface. In this way, while satisfying the call requirements of the first program through the fusion library, the original dependencies of the first program can be maintained without changing them (i.e., the first program requests to call the corresponding version of the external library, rather than directly requesting to call the fusion library), thereby avoiding changes to the external library dependencies of the first program and increasing update costs.
[0048] In some embodiments, determining at least one second content unit corresponding to the first program based on the invocation request and a preset invocation routing system may include: The identity identifier of the first program is instrumented at the call point, and a second content unit corresponding to the first external library is determined according to a preset routing table. The call point is determined by the call request. The preset routing table includes the correspondence between the call interface of the second content unit in the original external library and the call interface in the first fusion library; or The first symbol of the calling object is redirected to the second symbol, and a second content unit corresponding to the first external library is determined based on the second symbol. The first symbol is the identifier of the calling object in the first external library, and the second symbol is the identifier of the calling object in the first fusion library.
[0049] The data processing method of the present invention can be implemented by the data processing apparatus 100 of the present invention. Specifically, please refer to... Figure 3 The calling unit 120 is used to: instrument the identity of the first program at the calling point, and determine a second content unit corresponding to the first external library according to a preset routing table. The calling point is determined by the calling request. The preset routing table includes the correspondence between the calling interface of the second content unit in the original external library and the calling interface in the first fusion library; or redirect the first symbol of the calling object to the second symbol, and determine a second content unit corresponding to the first external library according to the second symbol. The first symbol is the identifier of the calling object in the first external library, and the second symbol is the identifier of the calling object in the first fusion library.
[0050] Alternatively, the data processing method of the present invention can be implemented by the data processing system 1000 of the present invention. Specifically, please refer to... Figure 1 Terminal 1001 is used to: instrument the identity of the first program at the calling point, and determine a second content unit corresponding to the first external library according to a preset routing table. The calling point is determined by the calling request, and the preset routing table includes the correspondence between the calling interface of the second content unit in the original external library and the calling interface in the first fusion library; or redirect the first symbol of the calling object to the second symbol, and determine a second content unit corresponding to the first external library according to the second symbol. The first symbol is the identifier of the calling object in the first external library, and the second symbol is the identifier of the calling object in the first fusion library.
[0051] In this way, the dependency relationship can be transformed from the original external library to the integrated library.
[0052] Specifically, depending on the operating platform, appropriate methods can be used to construct the call routing relationship from the original external library to the fusion library.
[0053] When the primary operating platform is used, bytecode instrumentation can be employed. The first program's request to call the external library's API can be used as the invocation point. The first program's identity is injected as context information into the invocation point. Upon execution of the invocation point, the request is routed to the corresponding differencing content in the fusion library according to a pre-defined routing table. Instrumentation can be performed during the compilation phase using the ASM framework or Transform API. The pre-defined routing table is generated during the fusion library construction phase by associating the differencing content with the APIs in the original external library and the APIs in the fusion library to establish a correspondence. A relationship table is then created based on multiple such correspondences. The primary operating platform can be Android.
[0054] When the operating platform is a second operating platform, the calling object can be determined based on the differences in the call request from the first program. Then, the calling object is redirected so that subsequent API calls are routed to the specific content of the calling object in the fusion library based on the redirected calling object. This redirection can be achieved by using a linker script to handle symbol aliases during linking, using the second symbol as an alias for the calling object, and then calling it using the second symbol instead of the first symbol. The first and second symbols can be a function name or a global variable name. Alternatively, the second symbol can be directly obtained, and then at runtime, the second symbol can be used to replace the first symbol's method to route to the calling object in the fusion library. This method replacement can be performed at runtime using MethodSwizzling, followed by dynamic resolution and retrieval using the `dlsym` or `objc_getClass` function. The first operating platform can be the iOS platform.
[0055] In some embodiments, the data processing method includes: Upon receiving a version switching instruction, the routing table of the first fusion library is hot-updated. The version switching instruction includes the version information of the new external library requested by the first program.
[0056] The data processing method of the present invention can be implemented by the data processing apparatus 100 of the present invention. Specifically, please refer to... Figure 3 The calling unit 120 is used to hot update the routing table of the first fusion library when a version switching instruction is obtained. The version switching instruction includes the version information of the new external library requested by the first program.
[0057] Alternatively, the data processing method of the present invention can be implemented by the data processing system 1000 of the present invention. Specifically, please refer to... Figure 1 Terminal 1001 is used to perform hot updates on the routing table of the first fusion library when a version switching instruction is received. The version switching instruction includes the version information of the new external library requested by the first program.
[0058] In this way, the version selection strategy for external library calls can be adjusted in real time without rebuilding the fusion table or restarting the application.
[0059] Specifically, version switching commands can be generated under appropriate business scenarios. These scenarios may include performance optimization, A / B testing of specific functions, security vulnerability patching, and function degradation. Under these scenarios, version switching commands can be generated according to the corresponding configurations issued by a remote configuration center, or received through remote control between remote configuration centers.
[0060] The routing table records the mapping between the call interfaces of the different versions of external libraries in the original version and the call interfaces in the fusion library. Hot updates allow updating the routing table without exiting or restarting the first program. Upon receiving a version switch instruction, a hot update is performed on the routing table, updating some mappings accordingly, allowing the first program to call the different versions of external libraries. Since the version selection of the external library called by the first program is determined based on the mapping between the call interfaces in the routing table, the different content in the fusion table remains unchanged. That is, by updating the routing table, the different content called by the first program can be changed accordingly without rebuilding the fusion table and restarting the application, thus achieving the effect of version selection for the external library when the first program calls it.
[0061] In some embodiments, the data processing method includes: Perform a state snapshot of the routing table before the hot update; In the event of a system failure while making a call based on a request, a recovery mechanism is executed to restore the system to the state before the hot update of the routing table.
[0062] The data processing method of the present invention can be implemented by the data processing apparatus 100 of the present invention. Specifically, please refer to... Figure 3 The calling unit 120 is used to perform a state snapshot of the routing table before the hot update; in the event of a system failure when the call is made according to the call request, a recovery mechanism is executed to restore the state to that before the hot update of the routing table.
[0063] Alternatively, the data processing method of the present invention can be implemented by the data processing system 1000 of the present invention. Specifically, please refer to... Figure 1 Terminal 1001 is used to perform state snapshot processing on the routing table before hot update; in the event of a system failure when making a call according to the call request, a recovery mechanism is executed to restore the state to that before hot update of the routing table.
[0064] In this way, in the event of a system failure, a timely rollback to a previous stable version can be made to ensure the successful invocation of the first program.
[0065] Specifically, in some implementations, the recovery mechanism may include reading a snapshot, writing back the routing table, and verifying consistency. Before hot-updating the routing table, a state snapshot can be taken to record the data content of the routing table before the hot update. Thus, when a call is made according to a request, if a system failure occurs, it may be due to errors in calling the new, different content. This triggers the recovery mechanism: first, the routing table is read from the state snapshot; then, the read routing table data is written back to the current routing table to replace the data after the previous hot update; next, the consistency of the replaced routing table is verified to check the consistency between the written-back routing table data and the routing table data in the state snapshot. Finally, it is determined that the current routing table data is consistent with the routing table data before the hot update, and the previously dependent external libraries are called again according to the routing table data before the hot update. Since the earlier versions of external libraries called by the program are generally more stable, with differences only in some functional implementations, this ensures that the external libraries can be called stably after the recovery mechanism is executed, preventing further system failures.
[0066] In some embodiments, step 02 (routing to the first fusion library according to the call request) may include: If it is determined that some of the second content units in the first fusion library meet the abnormal conditions, at least one of the following operations shall be performed: switch some of the second content units to the alternative version; downgrade some of the second content units to the safe mode; log the abnormality and report it.
[0067] The data processing method of the present invention can be implemented by the data processing apparatus 100 of the present invention. Specifically, please refer to... Figure 3 The calling unit 120 is used to perform at least one of the following operations when it is determined that some of the second content units in the first fusion library meet the abnormal conditions: switch some of the second content units to an alternative version; downgrade some of the second content units to a safe mode; and record and report the abnormality log.
[0068] Alternatively, the data processing method of the present invention can be implemented by the data processing system 1000 of the present invention. Specifically, please refer to... Figure 1 Terminal 1001 is used to perform at least one of the following operations when it is determined that some of the second content units in the first fusion library meet the abnormal conditions: switch some of the second content units to an alternative version; downgrade some of the second content units to a safe mode; record an abnormal log and report it.
[0069] In this way, the call request can continue even if the content being called encounters an error.
[0070] Specifically, the differences between different versions of external libraries can be reflected in whether they can implement specific functions and whether they are compatible with each other. For two versions of an external library, if they can implement the same or essentially the same functions, and one version is compatible with the other, then the former external library can be used as a backup for the latter. That is, when an external library encounters an exception, a call to another version of the external library that can achieve the same functionality as the external library that encountered the exception and is compatible with that external library can be performed, thus completing the version rollback operation.
[0071] Furthermore, if it is determined that the content currently experiencing an exception needs to be invoked, these exception parts can be invoked in safe mode. In safe mode, only the invocation operation on the second content unit that experienced the exception can be performed, and the second content unit that experienced the exception can be isolated and diagnosed in real time.
[0072] Furthermore, if it is confirmed that it is difficult to eliminate abnormal faults in a timely manner, the abnormal situation can be recorded and an abnormality log can be generated. The abnormality log can then be reported to eliminate the abnormality through manual troubleshooting, which facilitates the relevant maintenance personnel to confirm the abnormality.
[0073] In some embodiments, the abnormal conditions include at least one of the following: an unexpected exception is thrown when a partial second content unit is called; the return value after a partial second content unit is called does not conform to the expected specification; or an execution timeout or resource consumption exception occurs when a partial second content unit is called.
[0074] Unexpected exceptions can be exceptions that cannot be confirmed through testing during the build phase of the fusion library. Unexpected exceptions can include side effects caused by compatibility issues with differing content (such as input / output operations, network requests, global state modifications, and file system access), version compatibility issues, and exceptions caused by changes in application programming interfaces (APIs).
[0075] Expected specifications can be at least one of the following: type specifications, value range specifications, structure specifications, consistency specifications, and business specifications. Type specifications can include whether the data type of the return value is correct. For example, if the expected data type of the return value is String, but the actual data type is null or another type, then the return value does not conform to the expected specifications. Value range specifications can include whether the return value is within a reasonable range of values. For example, if the expected value of the return value is a positive integer, but the actual value is a negative number, then the return value does not conform to the expected specifications. Structure specifications can include whether the returned data structure is complete. For example, if the expected JSON (JavaScript Object Notation) fields in the return value are complete, but the actual JSON fields are incomplete, then the return value does not conform to the expected specifications. Consistency specifications can include whether the same input produces consistent output. For example, if the behavior signature determined based on the return value is inconsistent with the expected behavior signature of the calling object in the call request, then the return value does not conform to the expected specifications. Business specifications can include whether specific business logic requirements are met. For example, if the status code or error code of the return value does not conform to the corresponding business logic, then the return value does not conform to the expected specifications. The return value can be obtained by responding to the call request of the first program, or by executing the corresponding monitoring mechanism in the background program to call the fusion library.
[0076] When a corresponding second content unit is invoked, if the invoked second content unit is faulty, it may not be able to complete normal operation and generate output within a reasonable time and under reasonable conditions. In one embodiment, the execution operation of invoking the second content unit may have a preset timeout threshold. If the execution time of the operation exceeds the timeout threshold, it can be determined that the invoked second content unit is faulty. The timeout threshold can range from 100 milliseconds to 500 milliseconds.
[0077] In another embodiment, the execution operation that calls the second content unit may be preset with a memory usage threshold. If the memory used by the execution operation is greater than the memory usage threshold, it can be determined that the called second content unit is abnormal. Alternatively, if the memory usage within the sliding window continues to increase during the execution of the operation that calls the second content unit, i.e., a memory leak occurs, it can be determined that the called second content unit is abnormal. Or, if the CPU (Central Processing Unit) utilization rate of the execution operation is greater than a preset utilization rate and the duration is longer than a preset duration, i.e., the CPU utilization rate remains high for a long time, which may indicate that other functions are operating normally, it can be determined that the called second content unit is abnormal.
[0078] In some embodiments, the data processing method includes: Monitor the performance data of terminal 1001; Based on performance data, a second content unit corresponding to one of the second external libraries is selected from the first fusion library and called in place of the second content unit corresponding to the first external library. The performance of the called second content unit is better than that of the second content unit corresponding to the first external library.
[0079] The data processing method of the present invention can be implemented by the data processing apparatus 100 of the present invention. Specifically, please refer to... Figure 3 The data processing device 100 may include a monitoring unit 130. The monitoring unit 130 is used to monitor the performance data of the terminal 1001; based on the performance data, it selects a second content unit corresponding to one of the second external libraries in the first fusion library, and calls it instead of the second content unit corresponding to the first external library. The performance of the called second content unit is better than that of the second content unit corresponding to the first external library.
[0080] Alternatively, the data processing method of the present invention can be implemented by the data processing system 1000 of the present invention. Specifically, please refer to... Figure 1 Terminal 1001 is used to monitor performance data; based on the performance data, it selects a second content unit corresponding to one of the second external libraries in the first fusion library, and calls it instead of the second content unit corresponding to the first external library. The performance of the called second content unit is better than that of the second content unit corresponding to the first external library.
[0081] In this way, performance can be adaptively adjusted when calling external libraries.
[0082] Specifically, performance data may include response time, memory usage, and CPU utilization. By monitoring the performance data of terminal 1001, it is possible to determine in a timely manner whether the execution operation of the first program calling the external library may affect the normal operation of other functions of terminal 1001. Furthermore, based on the performance data of each second content unit when it is called, the performance of each second content unit when it is called can be determined, and then it can be determined whether to call the second content unit with better performance based on the performance.
[0083] Regarding the performance differences between the second content units, in one embodiment, if the time (i.e., response time) from the issuance of the call operation to the invocation of the first second content unit is less than the time from the issuance of the call operation to the invocation of the second second content unit, then the performance of the first second content unit is better than that of the second second content unit.
[0084] In one embodiment, if two second content units are invoked separately, and the memory occupied by the first second content unit is less than the memory occupied by the second second content unit, then the performance of the first second content unit is better than that of the second second content unit.
[0085] In one embodiment, if, when two second content units are invoked separately, the CPU utilization of the first second content unit when it is invoked is less than that of the second second content unit when it is invoked, then the performance of the first second content unit is better than that of the second second content unit.
[0086] In addition, the performance difference between two second content units can be determined by sliding window statistics and adaptive thresholding algorithms.
[0087] Please refer to Figure 5 A data processing method of the present invention can be used in server 1002. The data processing method may include: 11: Identify at least two third-party external libraries, where each of the at least two third-party external libraries is a copy of a different version of the same external library; 12: Compare the content of at least two third external libraries to generate a third content unit and at least two fourth content units. The third content unit is the common content between the at least two third external libraries, and the at least two fourth content units are the difference content between the at least two third external libraries. The at least two third external libraries are composed of the third content unit and a corresponding fourth content unit. 13: Generate a second fusion library based on the third content unit and at least two fourth content units.
[0088] The data processing method of the present invention can be implemented by the data processing apparatus 200 of the present invention. Specifically, please refer to... Figure 6 The data processing apparatus 200 may include a determining unit 210, a generating unit 220, and a fusing unit 230. The determining unit 210 may be used to determine at least two third external libraries, where the at least two third external libraries are copies of different versions of the same external library. The generating unit 220 may be used to perform content comparison on the at least two third external libraries, generating a third content unit and at least two fourth content units. The third content unit represents common content between the at least two third external libraries, and the at least two fourth content units represent differing content between the at least two third external libraries. The at least two third external libraries are constituted by the third content unit and a corresponding fourth content unit. The fusing unit 230 may be used to generate a second fused library based on the third content unit and the at least two fourth content units.
[0089] Alternatively, the data processing method of the present invention can be implemented by the data processing system 1000 of the present invention. Specifically, please refer to... Figure 1 The data processing system 1000 includes a server 1002. The server 1002 is used to: identify at least two third external libraries, wherein the at least two third external libraries are copies of different versions of the same external library; compare the content of the at least two third external libraries to generate a third content unit and at least two fourth content units, wherein the third content unit is the common content between the at least two third external libraries, and the at least two fourth content units are the differing content between the at least two third external libraries, wherein the at least two third external libraries are constituted by the third content unit and a corresponding fourth content unit; and generate a second fusion library based on the third content unit and the at least two fourth content units.
[0090] The aforementioned data processing method, data processing device 200, and data processing system 1000, by setting up a fusion library, retain the content of different versions of the same external library, thus avoiding functional abnormalities caused by forced version unification.
[0091] In some embodiments, step 11 (identifying at least two third external libraries) may include: Traverse the project dependency tree to determine all pending external libraries with dependencies and their corresponding version numbers. The project dependency tree includes the dependencies between pending external libraries and at least two second programs. At least two second programs can call the corresponding version of the pending external library when they are executed. Conflicting nodes with inconsistent versions are identified. Conflicting nodes are nodes in the dependency graph, which is constructed through direct dependencies and transitive dependencies. Transitive dependencies are obtained by recursively traversing all identified direct dependencies. Identify at least two third external libraries based on all conflicting nodes.
[0092] The data processing method of the present invention can be implemented by the data processing apparatus 200 of the present invention. Specifically, please refer to... Figure 6 Unit 210 is used to: traverse the project dependency tree, determine all pending external libraries with dependencies and their corresponding version numbers, the project dependency tree includes the dependencies between pending external libraries and at least two second programs, and at least two second programs can call the corresponding version of the pending external library when executed; determine conflict nodes with inconsistent versions, the conflict nodes are nodes in the dependency graph, the dependency graph is constructed through direct dependencies and transitive dependencies, the transitive dependencies are obtained by recursively traversing all determined direct dependencies; and determine at least two third external libraries based on all conflict nodes.
[0093] Alternatively, the data processing method of the present invention can be implemented by the data processing system 1000 of the present invention. Specifically, please refer to... Figure 1The data processing system 1000 includes a server 1002. The server 1002 is used to traverse the project dependency tree, determine all pending external libraries with dependencies and their corresponding version numbers. The project dependency tree includes the dependencies between the pending external libraries and at least two second programs, each of which can call the corresponding version of the pending external library when executed. It also determines conflicting nodes with inconsistent versions; these conflicting nodes are nodes in the dependency graph, which is constructed using direct and transitive dependencies. Transitive dependencies are obtained by recursively traversing all determined direct dependencies. Finally, it determines at least two third external libraries based on all conflicting nodes.
[0094] In this way, it is possible to proactively identify conflicting external libraries.
[0095] Specifically, please refer to Figure b3, which illustrates a project dependency tree from the second program to external libraries. The root node in the dependency tree is the main project (e.g., the second program). Multiple nodes branch off from the root node, each representing a dependency (i.e., an external library that the second program depends on). Furthermore, each node can generate child nodes, which are the dependencies of their source nodes (i.e., external libraries that the external libraries depend on). Each node and its child nodes can have their own corresponding attribute information. This attribute information may include the external library's name, version number, and dependency path.
[0096] By traversing and searching the project dependency tree, external libraries with direct dependencies (i.e., the relationship between nodes and child nodes) and indirect dependencies (different external libraries may depend on the same external library) and their corresponding version numbers can be identified. These external libraries with dependencies are then designated as potential external libraries.
[0097] Then, a dependency graph is constructed between external libraries using the project dependency tree and the identified external libraries with known dependencies. Nodes in the dependency graph can be nodes and child nodes of the project dependency tree. The relationships between nodes in the dependency graph represent the dependencies between the corresponding external libraries. If two or more nodes in the dependency graph have the same library name but different version numbers, these nodes are identified as conflicting nodes. This indicates that during actual runtime, conflicts may occur due to calling different versions of the same external library. Therefore, the third external library can be identified based on multiple copies of the external library corresponding to the conflicting node's library name.
[0098] In some embodiments, step 12 (comparing the content of at least two third external libraries) may include: The source code or binary code of the third external library is parsed and processed to obtain intermediate representation units; The content comparison results are obtained by comparing at least two intermediate representation units with the same signature.
[0099] The data processing method of the present invention can be implemented by the data processing apparatus 200 of the present invention. Specifically, please refer to... Figure 6 The generation unit 220 is used to: parse the source code or binary code of the third external library to obtain intermediate representation units; and compare at least two intermediate representation units with the same signature to obtain content comparison results.
[0100] Alternatively, the data processing method of the present invention can be implemented by the data processing system 1000 of the present invention. Specifically, please refer to... Figure 1 The data processing system 1000 includes a server 1002. The server 1002 is used to: parse the source code or binary code of a third external library to obtain intermediate representation units; and compare at least two intermediate representation units with the same signature to obtain content comparison results.
[0101] In this way, the common content among different third-party external libraries can be identified.
[0102] It is understandable that after obtaining different third-party external libraries, it is necessary to determine the differences and common contents between different versions based on the contents of each third-party external library, thus requiring content comparison between different third-party external libraries.
[0103] Specifically, the intermediate representation unit can be an intermediate representation (IR) obtained through compilation and transformation during the parsing and processing of the source code or binary code of a third-party external library. The intermediate representation can include classes, methods, functions, and global variables from the external library. By obtaining intermediate representation units through parsing, different forms of code languages can be transformed into a unified structure, which can then be reused during optimization and code generation.
[0104] In particular, considering that during the version iteration process of the same external library, the same code or code used to implement the same function may keep the same signature to facilitate troubleshooting of subsequent external library updates, the content of code with the same signature in different third external libraries can be compared to determine whether it is common content between different versions of external libraries.
[0105] In some embodiments, comparing at least two intermediate representation units with the same signature may include: According to the grammatical structure, at least two intermediate representation units with the same signature are compared to determine whether the texts of different intermediate representation units are the same. Given that the texts of different intermediate representation units are distinct, semantic equivalence analysis is performed on the intermediate representation units to determine the degree of equivalence between them. Based on the text comparison results and equivalent results, the content comparison results are determined.
[0106] The data processing method of the present invention can be implemented by the data processing apparatus 200 of the present invention. Specifically, please refer to... Figure 6 The generation unit 220 is used to: perform text comparison on at least two intermediate representation units with the same signature according to the grammatical structure to determine whether the texts of different intermediate representation units are the same; when it is determined that the texts of different intermediate representation units are different, perform semantic equivalence analysis on the intermediate representation units to determine the degree of equivalence of the different intermediate representation units; and determine the content comparison result based on the text comparison result and the equivalence result.
[0107] Alternatively, the data processing method of the present invention can be implemented by the data processing system 1000 of the present invention. Specifically, please refer to... Figure 1 The data processing system 1000 includes a server 1002. The server 1002 is used to: perform text comparison on at least two intermediate representation units with the same signature according to the syntactic structure to determine whether the text of different intermediate representation units is the same; if it is determined that the text of different intermediate representation units is different, perform semantic equivalence analysis on the intermediate representation units to determine the degree of equivalence of the different intermediate representation units; and determine the content comparison result based on the text comparison result and the equivalence result.
[0108] This can improve the accuracy of generating common content between different versions of external libraries into a third content unit.
[0109] Specifically, during the content comparison process, if two or more intermediate representation units have the same signature and the same text, it can be determined that the code in these intermediate representation units is also completely identical, and thus these intermediate representation units can be identified as shared content.
[0110] If two or more intermediate representation units only have the same signature but different text, a semantic equivalence analysis is performed on these intermediate representation units to determine whether they are semantically equivalent. If they are semantically equivalent, they can still be identified as common content. If they are semantically inequivalent, it means that these intermediate representation units may be used to implement different functions, thus identifying them as differences between corresponding versions of external libraries.
[0111] In some embodiments, performing semantic equivalence analysis on intermediate representation units may include: Perform control flow graph isomorphism detection on different intermediate representation units with the same signature to determine whether the topology of different intermediate representation units with the same signature is the same. Perform data flow equivalence analysis on different intermediate representation units with the same signature to determine whether the data dependencies of different intermediate representation units with the same signature are equivalent; Behavioral signature extraction is performed on different intermediate representation units with the same signature to determine whether the runtime behavior of different intermediate representation units with the same signature is the same. The degree of equivalence of different intermediate representation units is determined based on their respective topologies, data dependencies, and runtime behaviors, which have the same signature.
[0112] The data processing method of the present invention can be implemented by the data processing apparatus 200 of the present invention. Specifically, please refer to... Figure 6 The generation unit 220 is used to: perform control flow graph isomorphism detection on different intermediate representation units with the same signature to determine whether the topology of different intermediate representation units with the same signature is the same; perform data flow equivalence analysis on different intermediate representation units with the same signature to determine whether the data dependencies of different intermediate representation units with the same signature are equivalent; extract behavioral signatures on different intermediate representation units with the same signature to determine whether the runtime behavior of different intermediate representation units with the same signature is the same; and determine the degree of equivalence of different intermediate representation units based on their respective topology, data dependencies, and runtime behavior.
[0113] Alternatively, the data processing method of the present invention can be implemented by the data processing system 1000 of the present invention. Specifically, please refer to... Figure 1 The data processing system 1000 includes a server 1002. The server 1002 is used to: perform control flow graph isomorphism detection on different intermediate representation units with the same signature to determine whether their topologies are the same; perform data flow equivalence analysis on different intermediate representation units with the same signature to determine whether their data dependencies are equivalent; extract behavioral signatures from different intermediate representation units with the same signature to determine whether their runtime behaviors are the same; and determine the degree of equivalence of the different intermediate representation units based on their respective topologies, data dependencies, and runtime behaviors.
[0114] In this way, it can be determined whether different intermediate representation units are equivalent.
[0115] Specifically, for intermediate representation units with the same signature but different text, corresponding control flow graphs (CFGs) can be generated. The control flow graph can represent the topology of the corresponding intermediate representation unit. Then, the VF2 algorithm or graph neural network is used to determine whether the control flow graphs of these intermediate representation units have the same topology, that is, whether they are structurally equivalent.
[0116] Furthermore, for intermediate representation units with the same signature but different text, the corresponding inputs and outputs can be obtained according to their respective functions. Then, a definition-use chain can be constructed based on the inputs and outputs. The data flow patterns in the definition-use chain corresponding to different intermediate representation units can be compared to determine whether the dependency paths of the intermediate computation process from input to output are consistent. This allows us to identify whether the differences in the text of these intermediate representation units are pseudo-differences caused by compilation optimization.
[0117] Furthermore, for intermediate representation units with the same signature but different text, the input-output mapping relationship of the function can be extracted from these intermediate representation units through specific symbolic execution or fuzzing, thereby determining whether the behavior signatures of these intermediate representation units are the same when they run in their respective external libraries.
[0118] Based on the above, the equivalence degree of these intermediate representation units can be obtained according to their respective topologies, data dependencies, and runtime behaviors. Equivalence degrees can be categorized as complete equivalence, conditional equivalence, and inequivalence. Complete equivalence means that the topologies, data dependencies, and runtime behaviors of the corresponding two or more intermediate representation units are completely identical. Conditional equivalence means that the topologies, data dependencies, and runtime behaviors of the corresponding two or more intermediate representation units are completely identical only under specific conditions, or only partially identical. Inequivalence means that at least one of the topologies, data dependencies, and runtime behaviors of the corresponding two or more intermediate representation units is different under any conditions.
[0119] In some embodiments, step 12 (comparing the content of at least two third external libraries) may include: Based on the text comparison results and equivalence results, generate an application interface compatibility matrix between at least two third-party external libraries. The application interface compatibility matrix includes the compatibility status of the application interfaces of at least two third-party external libraries.
[0120] The data processing method of the present invention can be implemented by the data processing apparatus 200 of the present invention. Specifically, please refer to... Figure 6The generation unit 220 is used to generate an application interface compatibility matrix between at least two third external libraries based on the text comparison results and equivalence results. The application interface compatibility matrix includes the compatibility status of the application interfaces of at least two third external libraries.
[0121] Alternatively, the data processing method of the present invention can be implemented by the data processing system 1000 of the present invention. Specifically, please refer to... Figure 1 The data processing system 1000 includes a server 1002. The server 1002 is used to generate an application interface compatibility matrix between at least two third-party external libraries based on text comparison results and equivalence results. The application interface compatibility matrix includes the compatibility status of the application interfaces of at least two third-party external libraries.
[0122] In this way, the compatibility of application programming interfaces (APIs) between different versions of external libraries can be determined.
[0123] Specifically, the application interface compatibility matrix can include API identifiers, version information, and compatibility status. API identifiers include the name or signature of each application interface (e.g., method name, function name, class name). Version information includes the version numbers of the external libraries corresponding to two or more intermediate representation units with the same signature. Compatibility status can include fully compatible, partially compatible, and incompatible. Fully compatible means the interface signature and behavior are completely identical. Partially compatible means the interface signatures are identical but the behavior differs. Incompatible means the interface signatures or behaviors are completely different.
[0124] Based on the above, by obtaining the application interface compatibility matrix, we can determine the application interface compatibility of different versions of third-party external libraries with the same signature, that is, whether they can be regarded as the same calling interface. In subsequent scenarios of version replacement and hot update of routing table, when a system failure occurs, it can help to troubleshoot the problem and determine whether the system failure is caused by application interface incompatibility.
[0125] In some embodiments, step 12 (comparing the content of at least two third external libraries) may include: Perform side effect analysis on at least two intermediate representation units with the same signature but inconsistent content to determine the risk of merging.
[0126] The data processing method of the present invention can be implemented by the data processing apparatus 200 of the present invention. Specifically, please refer to... Figure 6 The generation unit 220 is used to perform side effect analysis on at least two intermediate representation units that have the same signature but inconsistent content to determine the risk of merging.
[0127] Alternatively, the data processing method of the present invention can be implemented by the data processing system 1000 of the present invention. Specifically, please refer to... Figure 1 The data processing system 1000 includes a server 1002. The server 1002 is used to perform side effect analysis on at least two intermediate representation units that have the same signature but inconsistent content, and to determine the risk of merging.
[0128] This makes it easy to identify the risks involved when merging content that differs between different versions of external libraries.
[0129] It is understandable that if different intermediate representation units have the same signature but inconsistent content, it may be due to some reasons (such as the corresponding code being rarely used or having little effect). In such cases, merging may be considered, which requires an assessment of the risks of merging these contents.
[0130] Specifically, side effect analysis can include potential side effects that may occur when performing input / output operations (IO operations) on intermediate representation units, making network requests, modifying global state, or accessing the file system.
[0131] The side effects of I / O operations can include system resource access side effects, which may lead to resource contention and deadlock. Different versions of I / O implementations may have different buffering strategies. After merging, data loss or out-of-order delivery may occur, and the predictability and repeatability of the program may be affected.
[0132] Side effects of network requests can include external communication side effects, which may lead to duplicate requests or missing requests. Different versions may have different timeout settings and retry policies, which may result in inconsistent behavior after merging. They may also affect server load and data consistency. In addition, there may be security risks, such as different certificate verification policies in different versions.
[0133] Side effects of global state modifications include state management side effects, which can lead to state pollution. That is, modifying one version of an external library can affect the behavior of another version of the external library. In a multi-threaded environment, this can cause race conditions, as well as problems that are difficult to debug and reproduce. In addition, it may compromise the isolation between modules.
[0134] File system access side effects can include persistent storage side effects, which may cause file read / write conflicts, and different versions may use the same file path but with different formats, leading to data corruption. Permission issues may cause runtime exceptions, and may also lead to contention for storage space.
[0135] Based on the above, by conducting side effect analysis to determine and quantify the risks of merging, it is possible to identify the potential risks of merging intermediate representation units with the same signature but inconsistent content, thereby facilitating the manual determination of the necessity of merging.
[0136] In some embodiments, step 12 (compare the content of at least two third external libraries to determine the third content unit and at least two fourth content units) may include: Based on the comparison results, the content that is completely consistent and / or semantically equivalent in each third external library is extracted and processed to generate a third content unit; For each piece of content in a third external library that is not identified as a third content unit, mark the difference according to the corresponding version number, retain the original calling interface, and generate a corresponding fourth content unit.
[0137] The data processing method of the present invention can be implemented by the data processing apparatus 200 of the present invention. Specifically, please refer to... Figure 6 The generation unit 220 is used to: extract and process the completely consistent and / or semantically equivalent content in each third external library according to the comparison results, and generate a third content unit; for each third external library content that is not determined to be a third content unit, mark the difference according to the corresponding version number, retain the original calling interface, and generate a corresponding fourth content unit.
[0138] Alternatively, the data processing method of the present invention can be implemented by the data processing system 1000 of the present invention. Specifically, please refer to... Figure 1 The data processing system 1000 includes a server 1002. The server 1002 is used to: extract and process content that is completely consistent and / or semantically equivalent in each third external library according to the comparison results, and generate a third content unit; for content in each third external library that is not determined to be a third content unit, mark the difference according to the corresponding version number, retain the original calling interface, and generate a corresponding fourth content unit.
[0139] In this way, the fusion library can be generated.
[0140] Specifically, for different versions of external libraries, the corresponding intermediate representation units with the same signature and / or semantic equivalence can be regarded as common content of these external libraries. Thus, these common contents can be extracted to form a third content unit, which helps to reduce the duplicate storage of the same content.
[0141] Furthermore, for different versions of external libraries, the parts not identified as common content, or content with different signatures and semantically inequivalent, can be considered as the differences between these external libraries. These differences can be preserved in the original external library's calling interface, marked with the original external library's version identifier. These differences can then be encapsulated to form their respective fourth content units, which helps reduce call failures or errors caused by changes in the calling interface.
[0142] Additionally, for open-source or external libraries with available source code, the source code can be parsed into a syntax tree structure to identify "common units" with consistent text, "equivalent units" with semantic equivalence, and "difference units" that need to be retained. Common units and equivalent units can be merged into common modules, while difference units are renamed according to version and used to generate a routing proxy layer.
[0143] For external libraries of closed-source frameworks / static libraries, symbol scanning tools can be used to identify duplicate symbols, and Mach-O parsing can be used for content comparison and semantic analysis. Different symbols can be renamed using linking scripts, and a fusion library can be built to generate a unified entry symbol table.
[0144] For external libraries consisting of resource files, the corresponding SHA256 hash value can be calculated. Resources with the same hash value are merged and shared, while resources with different hash values are renamed according to version. A resource access proxy layer is provided to return the correct path based on the SDK (Software Development Kit) context.
[0145] In some embodiments, step 12 (compare the content of at least two third external libraries to determine the third content unit and at least two fourth content units) may include: Generate an interface adaptation layer, which includes multiple adaptation interfaces; Associate all calling interfaces of at least two fourth content units with a corresponding adapter interface.
[0146] The data processing method of the present invention can be implemented by the data processing apparatus 200 of the present invention. Specifically, please refer to... Figure 6 The generation unit 220 is used to: generate an interface adaptation layer, which includes multiple adaptation interfaces; and associate all calling interfaces of at least two fourth content units with a corresponding adaptation interface.
[0147] Alternatively, the data processing method of the present invention can be implemented by the data processing system 1000 of the present invention. Specifically, please refer to... Figure 1The data processing system 1000 includes a server 1002. The server 1002 is used to: generate an interface adaptation layer, which includes multiple adaptation interfaces; and associate all calling interfaces of at least two fourth content units with their corresponding adaptation interfaces.
[0148] In this way, it is possible to unify the calling interfaces of different fourth content units under the premise of runtime interface calls, so as to facilitate management and maintenance.
[0149] In some embodiments, the data processing method includes: Perform compatibility assessments on at least two third-party external libraries to determine their compatibility.
[0150] The data processing method of the present invention can be implemented by the data processing apparatus 200 of the present invention. Specifically, please refer to... Figure 6 The data processing apparatus 200 may include a compatibility assessment unit 240. The compatibility assessment unit 240 is used to perform compatibility assessments on at least two third external libraries and determine the degree of compatibility between the at least two third external libraries.
[0151] Alternatively, the data processing method of the present invention can be implemented by the data processing system 1000 of the present invention. Specifically, please refer to... Figure 1 The data processing system 1000 includes a server 1002. The server 1002 is used to perform compatibility assessments on at least two third-party external libraries and determine the degree of compatibility between the at least two third-party external libraries.
[0152] This avoids problems such as call failures or errors due to compatibility issues between external libraries when switching between different versions of external libraries.
[0153] It is understandable that in some subsequent business scenarios, such as hot-updating the routing table for version switching, falling back to the alternative version of the external library when an external library call fails, and selecting the better-performing external library based on the performance metrics at the time of the call, in order to facilitate switching between different versions of the external library, it is necessary to consider whether the same program (such as a second program) will experience call failures or errors due to version compatibility issues when calling the external library.
[0154] Based on the above, by conducting compatibility assessments between different versions of external libraries, we can pre-assess whether different versions of external libraries are compatible. In the above scenarios, we can avoid switching to versions with compatibility issues, and thus avoid calling failures or errors due to compatibility problems between external libraries when switching between calling different versions of external libraries.
[0155] In some embodiments, performing a compatibility assessment on at least two third-party external libraries may include: Feature extraction is performed on at least two conflicting third external libraries to obtain multidimensional features; Input multidimensional features into a pre-defined classification model and output the conflict types between conflicting third external libraries; Based on multidimensional features and conflict types, a pre-defined strategy recommendation system outputs a handling strategy for conflicting third-party external libraries.
[0156] The data processing method of the present invention can be implemented by the data processing apparatus 200 of the present invention. Specifically, please refer to... Figure 6 The compatibility evaluation unit 240 is used to: perform feature extraction processing on at least two conflicting third external libraries to obtain multi-dimensional features; input the multi-dimensional features into a preset classification model to output the conflict type between the conflicting third external libraries; and output the processing strategy for the conflicting third external libraries through a preset strategy recommendation system based on the multi-dimensional features and the conflict type.
[0157] Alternatively, the data processing method of the present invention can be implemented by the data processing system 1000 of the present invention. Specifically, please refer to... Figure 1 The data processing system 1000 includes a server 1002. The server 1002 is used to perform feature extraction processing on at least two conflicting third external libraries to obtain multi-dimensional features; input the multi-dimensional features into a preset classification model and output the conflict type between the conflicting third external libraries; based on the multi-dimensional features and the conflict type, the server 1002 outputs a processing strategy for the conflicting third external libraries through a preset strategy recommendation system.
[0158] This improves the accuracy of assessing the compatibility between different versions of external libraries, and helps reduce the human resource costs of risk assessment.
[0159] Specifically, the conflict type between conflicting external libraries is determined by a preset classification model. Then, a preset strategy recommendation system outputs a handling strategy for the conflicting third external library, that is, it outputs a recommended solution for handling the conflicting external library. This helps to determine what specific compatibility problems might occur if the conflicting external library is made compatible.
[0160] Additionally, the pre-defined classification model can use LightGBM (Gradient Boosting Decision Tree) as the initial model framework, with historical project conflict records, open-source community data (such as GitHub Issues / PRs), simulated data, and expert-annotated data as training samples. Each training sample can have a multi-dimensional feature vector and corresponding label. The dimensions of the feature vector can include version differences, the number of API changes, code similarity, and CVE (Common Vulnerabilities and Exposures) vulnerability information. The label can include the specific conflict type.
[0161] In some embodiments, multidimensional features may include at least one of the following: version features, API change features, code structure features, historical features, and security features.
[0162] Specifically, version characteristics can include the degree of version differences, such as differences in major version number, minor version number, and revision number. API change characteristics can include the number and type of API changes, which can include the addition, deletion, and modification of APIs. Code structure characteristics can include code structure similarity. Historical characteristics can include historical compatibility data. Security characteristics can include actual user feedback information, which can include community feedback and issue records (such as issue reports of open-source libraries on code hosting platforms).
[0163] In some embodiments, multidimensional features are input into a predefined classification model, and the conflict types between conflicting third external libraries are output, including: When, based on multidimensional characteristics, different third-party external libraries have the same call interface signature but different implementation details, the output conflict type is API compatibility; or When different third-party libraries exhibit different behaviors based on multidimensional features, the output conflict type is classified as behavioral difference type; or If, based on multidimensional features, the difference in performance metrics between different third-party external libraries exceeds a preset difference threshold, the output conflict type is classified as performance-sensitive; or When a third external inventory is identified as having known security vulnerabilities based on multidimensional features, the output conflict type is classified as security sensitive.
[0164] The data processing method of the present invention can be implemented by the data processing apparatus 200 of the present invention. Specifically, please refer to... Figure 6The compatibility evaluation unit 240 is used to: output a conflict type of API compatibility when the signatures of the calling interfaces between different third-party external libraries are the same but the implementation details are different, based on multi-dimensional characteristics; output a conflict type of behavior difference when the same calling interfaces between different third-party external libraries exhibit different behaviors, based on multi-dimensional characteristics; output a conflict type of performance sensitivity when the difference in performance indicators between different third-party external libraries is greater than a preset difference threshold, based on multi-dimensional characteristics; or output a conflict type of security sensitivity when some third-party external libraries contain known security vulnerabilities, based on multi-dimensional characteristics.
[0165] Alternatively, the data processing method of the present invention can be implemented by the data processing system 1000 of the present invention. Specifically, please refer to... Figure 1 The data processing system 1000 includes a server 1002. The server 1002 is configured to: output a conflict type of API compatibility when, based on multi-dimensional characteristics, the signatures of the calling interfaces between different third-party external libraries are the same, but the implementation details differ; output a conflict type of behavioral difference when, based on multi-dimensional characteristics, the same calling interfaces between different third-party external libraries exhibit different behaviors; output a conflict type of performance sensitivity when, based on multi-dimensional characteristics, the difference in performance indicators between different third-party external libraries exceeds a preset difference threshold; or output a conflict type of security sensitivity when, based on multi-dimensional characteristics, some third-party external libraries contain known security vulnerabilities.
[0166] This helps to clarify specific conflicts between external libraries.
[0167] Specifically, API compatibility conflicts can include differences in the number of API changes between external libraries, differences only in revision numbers, and code structure similarity exceeding a corresponding similarity threshold. Behavioral difference conflicts can include external libraries having API changes classified as "modified" or historical compatibility data showing behavioral changes. Performance-sensitive conflicts can include differences in performance test results in the historical compatibility data of some external libraries. Security-sensitive conflicts can include security-related questions and reports in the user feedback information of some external libraries.
[0168] In some embodiments, based on multidimensional features and conflict type, a preset strategy recommendation system outputs a handling strategy for conflicting third-party external libraries, including: Input the conflict type into the preset rule engine and output the first recommended handling strategy; Based on multidimensional features, similar cases are identified by matching conflict cases from conflicting third external libraries with historical cases, and a second recommended processing strategy is determined based on the processing strategy for similar cases. Based on the conflict type and multidimensional characteristics, multi-objective optimization is performed to output a third recommended processing strategy; Based on the first recommended processing strategy, the second recommended processing strategy, and the third recommended processing strategy, determine the processing strategy for the conflicting third external library.
[0169] The data processing method of the present invention can be implemented by the data processing apparatus 200 of the present invention. Specifically, please refer to... Figure 6 The compatibility evaluation unit 240 is used to: input the conflict type into a preset rule engine and output a first recommended processing strategy; based on multi-dimensional features, perform similarity matching between conflict cases composed of conflicting third external libraries and historical cases to determine similar cases, and determine a second recommended processing strategy based on the processing strategy of similar cases; perform multi-objective optimization processing based on the conflict type and multi-dimensional features, and output a third recommended processing strategy; and determine the processing strategy for conflicting third external libraries based on the first recommended processing strategy, the second recommended processing strategy, and the third recommended processing strategy.
[0170] Alternatively, the data processing method of the present invention can be implemented by the data processing system 1000 of the present invention. Specifically, please refer to... Figure 1 The data processing system 1000 includes a server 1002. The server 1002 is used to: input conflict types into a preset rule engine and output a first recommended processing strategy; based on multi-dimensional features, perform similarity matching between conflict cases from a conflicting third external library and historical cases to determine similar cases, and determine a second recommended processing strategy based on the processing strategies for similar cases; perform multi-objective optimization processing based on conflict types and multi-dimensional features, and output a third recommended processing strategy; and determine a processing strategy for the conflicting third external library based on the first, second, and third recommended processing strategies.
[0171] In this way, it is easy to find the most suitable way to handle the conflicts between external libraries.
[0172] Specifically, a rule engine can include an expert rule base. This base can contain predefined decision rules from domain experts. By setting up a rule engine, evaluation methods can be pre-defined according to clear and highly weighted assessment rules, thus offering a high degree of reliability.
[0173] Furthermore, similarity matching between conflict cases and historical cases can be performed, referencing previously processed historical cases with the most similar conflict situations. In one embodiment, multidimensional features extracted from the currently conflicting external library and multidimensional features extracted from the external libraries in historical cases can be vectorized using each specific category included in the multidimensional features (such as version difference dimension, API change quantity dimension, code similarity dimension, CVE vulnerability information dimension) as the corresponding dimension. Then, a vector similarity algorithm is used to calculate the similarity score between the current case and each case in the historical case library. The several historical cases with the highest similarity are then selected as similar cases, and the resolution strategies of these similar cases are used to recommend the optimal strategy (second recommended handling strategy) for the current conflict. Available vector similarity algorithms can include cosine similarity and Euclidean distance.
[0174] Furthermore, multi-objective optimization can be achieved by taking multiple quantifiable objectives (such as minimizing packet size, maximizing compatibility, and maximizing stability) as a comprehensive optimization objective, determining the optimal balance point for the comprehensive optimization objective based on conflict type and multidimensional characteristics, and then determining a third recommended processing strategy based on the optimal balance point. Multi-objective optimization can be implemented using the Pareto optimality algorithm.
[0175] Accordingly, strategies for handling conflicting third-party external libraries can include merging, isolation, degradation, and upgrading strategies. Merging strategies are suitable for external libraries with minor differences and shared common code; isolation strategies are suitable for external libraries with significant differences and incompatibility; degradation strategies are suitable for higher-version external libraries with compatibility issues or security risks; and upgrading strategies are suitable for lower-version external libraries with known vulnerabilities or missing functionality.
[0176] In one embodiment, the priorities of different processing strategies can be output based on the obtained first recommended processing strategy, second recommended processing strategy and third recommended processing strategy, so as to determine which processing strategy is more suitable for the currently conflicting external library.
[0177] In addition to outputting processing strategies, the confidence level of the corresponding processing strategies can also be output. If the confidence level of some processing strategies is lower than the confidence level threshold, a review mark can be made, thereby reminding relevant personnel to manually review the processing strategies.
[0178] In some embodiments, the data processing method includes: At least one conflict term is identified based on multidimensional features; Based on at least one conflict item, a compatibility risk score for the conflicting third external library is output through a pre-defined risk assessment system.
[0179] The data processing method of the present invention can be implemented by the data processing apparatus 200 of the present invention. Specifically, please refer to... Figure 6 The data processing device 200 may include a risk assessment unit 250. The risk assessment unit 250 is used to: determine at least one conflict item based on multidimensional features; and output a compatibility risk score for the conflicting third external library through a preset risk assessment system based on the at least one conflict item.
[0180] Alternatively, the data processing method of the present invention can be implemented by the data processing system 1000 of the present invention. Specifically, please refer to... Figure 1 The data processing system 1000 includes a server 1002. The server 1002 is used to: determine at least one conflict item based on multidimensional features; and output a compatibility risk score for the conflicting third external library through a preset risk assessment system based on the at least one conflict item.
[0181] This makes it easy to quantify the level of risk that may result from compatibility with external libraries.
[0182] Specifically, multiple score levels can be set for the compatibility risk score. Each score level corresponds to a degree of compatibility risk. In one such embodiment, there are five score levels. The score ranges for the five score levels are 0-20, 21-40, 41-60, 61-80, and 81-100. A score level of 0-20 indicates extremely low risk, and the output processing strategy can be executed automatically. A score level of 21-40 indicates low risk, and verification is recommended. A score level of 41-60 indicates medium risk, requiring manual review. A score level of 61-80 indicates high risk, and manual review and testing are recommended. A score level of 81-100 indicates extremely high risk, and a re-evaluation of the solution is recommended.
[0183] In addition, conflict items can be determined based on corresponding multi-dimensional characteristics. Conflict items can include API compatibility risks, behavioral consistency risks, performance impact risks, and security vulnerability risks. For API compatibility risks, if an external library contains API changes, 8 points are added for each deleted API, 5 points for each modified API, and 15 points are added for each major version difference between external libraries. For behavioral consistency risks, if changes to default values and exception handling are caused by behavior, 10 points are added for each change in default values and 12 points for each change in exception handling. For performance impact risks, when calling external libraries, if memory usage increases by 10%, 8 points are added for each 10% increase in memory usage; if startup time increases by 100 milliseconds, 12 points are added. For security vulnerability risks, 40 points are added for each critical vulnerability, 25 points for each high-risk vulnerability, and 30 points for each unpatched vulnerability.
[0184] In some embodiments, the data processing method includes: Acquire multiple user request data, which includes user routing requests to at least two third-party external libraries. Each user request data corresponds to one user. Multiple users are configured to be divided into at least two user groups. The version numbers of the third-party external libraries in the routing requests are different in the user request data corresponding to users in different user groups. Based on multiple user request data, determine the corresponding third-party external library's runtime performance and business metrics; Based on operational performance and business metrics, make version selection decisions for at least two third-party external libraries.
[0185] The data processing method of the present invention can be implemented by the data processing apparatus 200 of the present invention. Specifically, please refer to... Figure 6 The data processing device 200 may include a version selection unit 260. The version selection unit 260 is used to: acquire multiple user request data, which includes user routing requests to at least two third external libraries. Each user request corresponds to one user, and the multiple users are configured to be divided into at least two user groups. The version numbers of the third external libraries in the routing requests are different for users within different user groups. Based on the multiple user request data, the unit determines the operational performance and business metrics of the corresponding third external libraries. Based on the operational performance and business metrics, the unit makes a version selection decision for at least two third external libraries.
[0186] Alternatively, the data processing method of the present invention can be implemented by the data processing system 1000 of the present invention. Specifically, please refer to... Figure 1 The data processing system 1000 includes a server 1002. The server 1002 is used to: acquire multiple user request data, which includes user routing requests to at least two third-party external libraries. Each user request corresponds to one user, and the multiple users are configured to be divided into at least two user groups. The version numbers of the third-party external libraries in the user request data corresponding to users within different user groups are different; determine the operating performance and business metrics of the corresponding third-party external libraries based on the multiple user request data; and make version selection decisions for at least two third-party external libraries based on the operating performance and business metrics.
[0187] This facilitates the parallel operation of multiple versions of the same function using external libraries.
[0188] Specifically, users can be grouped into two or more user groups, each corresponding to a different version of the external library. When a user requests to call an external library, the appropriate version of the external library is provided based on the user's user group. Correspondingly, the runtime performance and business metrics of the external library are determined based on the subsequently returned user request data. By comparing the runtime performance and business metrics of different versions of the external library, online performance comparisons can be performed, which helps reduce the risk of full deployment. Furthermore, significance testing can be used to determine the optimal or better version in version selection decisions.
[0189] In addition, user grouping can be achieved through traffic allocation strategies.
[0190] Specifically, for the data processing system 1000, a second fusion library can be pre-built by the server 1002 based on different versions of the same external library to generate a second fusion library. This second fusion library is then sent to the terminal 1001, causing it to form a first fusion library on the terminal 1001. When the terminal 1001 loads the first program, it can call the first fusion library. Alternatively, in some embodiments, the external libraries corresponding to the first and second external libraries are the same as the external library corresponding to the third external library; the first content unit can be the third content unit; the second content unit can be the fourth content unit; the first fusion library can be the second fusion library; and the first program can be the second program.
[0191] It should be noted that, in this application, for the case where the data processing system 1000 includes a terminal 1001 and a server 1002, in conjunction with the foregoing, the data processing system 1000 can call a first fused library obtained by fusing a first external library and at least one second external library through the terminal 1001, and can obtain a second fused library by fusing at least two third external libraries through the server 1002.
[0192] It is understandable that in some cases, both the first and second external libraries can be the third external library, and the first fused library can also be the second fused library. That is, in the data processing system 1000, the server 1002 can perform fusion processing on multiple external libraries. These external libraries can be identified as third external libraries on the server 1002 side, while on the terminal 1001 side, one of them can be identified as the first external library, and the rest can be identified as the second external library. After fusion processing on these external libraries to obtain the fused library, the resulting fused library can be the second fused library on the server 1002 side, and the first fused library on the terminal 1001 side. In this way, the data processing system 1000 can perform the function of fusion and calling multiple external libraries in the same batch.
[0193] This invention provides an electronic device, which includes a processor and a memory. The memory stores a computer program, and the processor executes the data processing method of this invention by calling the computer program stored in the memory.
[0194] This invention provides a computer program product, including computer instructions. When the computer instructions are executed by a processor, they implement the data processing method of this invention.
[0195] Each unit in the aforementioned data processing device can be implemented entirely or partially through software, hardware, or a combination thereof. Each unit can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each unit.
[0196] Data processing device 100 and data processing device 200 can be integrated into a terminal or server that has storage and a processor and thus computing power, or the data processing device 100 and data processing device 200 can be the terminal or server.
[0197] Optionally, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0198] Figure 7 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. The computer device may be a terminal or a server. Figure 7 As shown, the computer device 300 includes a processor 301 with one or more processing cores, a memory 302 with one or more computer-readable storage media, and a computer program stored in the memory 302 and executable on the processor. The processor 301 is electrically connected to the memory 302. Those skilled in the art will understand that the computer device structure shown in the figures does not constitute a limitation on the computer device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0199] The processor 301 is the control center of the computer device 300. It connects various parts of the computer device 300 through various interfaces and lines. By running or loading software programs and / or modules stored in the memory 302, and calling data stored in the memory 302, it performs various functions of the computer device 300 and processes data, thereby performing overall processing of the computer device 300.
[0200] In this embodiment, the processor 301 in the computer device 300 loads the instructions corresponding to the processes of one or more computer programs into the memory 302 according to the following steps, and the processor 301 runs the computer programs stored in the memory 302 to realize various functions: 01: Receive the call request from the first program; 02: If it is determined from the call request that the first program requests to call the first external library, the call request is routed to the first fusion library. The first fusion library includes a first content unit and at least two second content units. The first content unit is the common content between the first external library and at least one second external library. The at least two second content units are the different content between the first external library and at least one second external library. The first external library and at least one second external library are constituted by the first content unit and a corresponding second content unit. The at least one second external library is a copy of a different version of the first external library.
[0201] In some embodiments, the processor 301 in the computer device 300 loads the instructions corresponding to the processes of one or more computer programs into the memory 302 according to the following steps, and the processor 301 runs the computer programs stored in the memory 302 to realize various functions: 11: Identify at least two third-party external libraries, where each of the at least two third-party external libraries is a copy of a different version of the same external library; 12: Compare the content of at least two third external libraries to generate a third content unit and at least two fourth content units. The third content unit is the common content between the at least two third external libraries, and the at least two fourth content units are the difference content between the at least two third external libraries. The at least two third external libraries are composed of the third content unit and a corresponding fourth content unit. 13: Generate a second fusion library based on the third content unit and at least two fourth content units.
[0202] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0203] Optional, such as Figure 7 As shown, the computer device 300 also includes: a display screen 303, a radio frequency circuit 304, an audio circuit 305, an input unit 306, and a power supply 307. The processor 301 is electrically connected to the display screen 303, the radio frequency circuit 304, the audio circuit 305, the input unit 306, and the power supply 307. Those skilled in the art will understand that... Figure 7 The computer device structure shown does not constitute a limitation on the computer device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0204] The display screen 303 can be used to display a graphical user interface (GUI) and receive operation commands generated by the user interacting with the GUI. The display screen 303 may include a display panel and a touch panel. The display panel can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the computer device. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. The touch panel can be used to collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel), generate corresponding operation commands, and execute the corresponding program. Optionally, the touch panel may include a touch detection device and a touch controller. The touch detection device detects the user's touch location and the signal generated by the touch operation, and transmits the signal to the touch controller. The touch controller receives touch information from the touch detection device, converts it into touch point coordinates, sends it to the processor 301, and can receive and execute commands from the processor 301. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it transmits the information to the processor 301 to determine the type of touch event. Subsequently, the processor 301 provides corresponding visual output on the display panel according to the type of touch event. In this embodiment, the touch panel and the display panel can be integrated into the display screen 303 to achieve input and output functions. However, in some embodiments, the touch panel and the display screen 303 can be implemented as two independent components to achieve input and output functions. That is, the display screen 303 can also be used as part of the input unit 306 to achieve input functions.
[0205] The radio frequency circuit 304 can be used to transmit and receive radio frequency signals to establish wireless communication with network devices or other computer devices, and to transmit and receive signals with network devices or other computer devices.
[0206] Audio circuitry 305 can be used to provide an audio interface between a user and a computer device via a speaker and a microphone. Audio circuitry 305 converts received audio data into electrical signals, transmits them to the speaker, and the speaker converts them into sound signals for output. Conversely, the microphone converts collected sound signals into electrical signals, which are then received by audio circuitry 305, converted back into audio data, and output to processor 301 for processing. The audio data is then transmitted via radio frequency circuitry 304 to, for example, another computer device, or output to memory 302 for further processing. Audio circuitry 305 may also include an earphone jack to facilitate communication between peripheral headphones and the computer device.
[0207] The input unit 306 can be used to receive input numbers, characters, or object feature information (such as fingerprints, irises, facial information, etc.), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
[0208] Power supply 307 is used to supply power to various components of computer device 300. Optionally, power supply 307 can be logically connected to processor 301 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. Power supply 307 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0209] although Figure 7 As not shown in the diagram, computer equipment 300 may also include a camera, sensor, wireless fidelity module, Bluetooth module, etc., which will not be described in detail here.
[0210] This application also provides a computer-readable storage medium for storing a computer program. This computer-readable storage medium can be applied to a computer device, and the computer program causes the computer device to execute the corresponding flow in the data processing method of the embodiments of this application; for brevity, further details are omitted here.
[0211] This application also provides a computer program product including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the corresponding flow in the data processing method of the embodiments of this application. For simplicity, further details are omitted here.
[0212] This application also provides a computer program comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the corresponding flow in the data processing method of this application. For brevity, further details are omitted here.
[0213] It should be understood that the processor in this application may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method embodiments can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor described above can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.
[0214] It is understood that the memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DR RAM). It should be noted that the memory used in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0215] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0216] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0217] In the embodiments of this application, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0218] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0219] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0220] In addition, the functional units in this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0221] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer or a server) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.
[0222] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A data processing method for a terminal, characterized in that, The data processing method includes: Receive the call request from the first program; If it is determined from the call request that the first program requests to call the first external library, the call request is routed to the first fusion library. The first fusion library includes a first content unit and at least two second content units. The first content unit is common content between the first external library and at least one second external library. The at least two second content units are different content between the first external library and at least one second external library. The first external library and the at least one second external library are constituted by the first content unit and a corresponding second content unit. The at least one second external library is a copy of a different version of the first external library.
2. The data processing method as described in claim 1, characterized in that, The step of routing the call request to the first fusion library includes: If it is determined that the calling object of the first program is content in the first external library other than the common content, at least a second content unit corresponding to the first program is determined according to the calling request and the preset calling routing system.
3. A data processing method for a server, characterized in that, The data processing method includes: Identify at least two third external libraries, wherein the at least two third external libraries are copies of different versions of the same external library; The content of the at least two third external libraries is compared to generate a third content unit and at least two fourth content units. The third content unit is the common content between the at least two third external libraries, and the at least two fourth content units are the difference content between the at least two third external libraries. The at least two third external libraries are constituted by the third content unit and a corresponding fourth content unit. A second fusion library is generated based on the third content unit and the at least two fourth content units.
4. The data processing method as described in claim 3, characterized in that, The determination of at least two third external libraries includes: Traverse the project dependency tree to determine all pending external libraries with dependencies and their corresponding version numbers. The project dependency tree includes the dependencies between the pending external libraries and at least two second programs. The at least two second programs can call the corresponding version of the pending external library when they are executed. A conflict node with inconsistent versions is identified. The conflict node is a node in the dependency graph, which is constructed through direct dependencies and transitive dependencies. The transitive dependency is obtained by recursively traversing all the identified direct dependencies. The at least two third external libraries are determined based on all the conflicting nodes.
5. A data processing apparatus, characterized in that, The data processing device includes: A receiving unit, used for receiving the call request of the first program; The calling unit is configured to route to a first fusion library according to the calling request when it is determined that the first program requests to call a first external library. The first fusion library includes a first content unit and at least two second content units. The first content unit is common content between the first external library and at least one second external library. The at least two second content units are different content between the first external library and the at least one second external library. The first external library and the at least one second external library are constituted by the first content unit and a corresponding second content unit. The at least one second external library is a copy of a different version of the first external library.
6. A data processing apparatus, characterized in that, The data processing device includes: A determining unit is configured to determine at least two third external libraries, wherein the at least two third external libraries are copies of different versions of the same external library; A generation unit is used to perform content comparison on the at least two third external libraries to generate a third content unit and at least two fourth content units. The third content unit is the common content between the at least two third external libraries, and the at least two fourth content units are the difference content between the at least two third external libraries. The at least two third external libraries are constituted by the third content unit and a corresponding fourth content unit. A fusion unit is used to generate a second fusion library based on the third content unit and the at least two fourth content units.
7. A data processing system, characterized in that, The data processing system includes: Terminal, used for: Receive the call request from the first program; If it is determined from the call request that the first program requests to call the first external library, the call request is routed to the first fusion library. The first fusion library includes a first content unit and at least two second content units. The first content unit is common content between the first external library and at least one second external library. The at least two second content units are different content between the first external library and the at least one second external library. The first external library and the at least one second external library are constituted by the first content unit and a corresponding second content unit. The at least one second external library is a copy of a different version of the first external library. Server, used for: Identify at least two third external libraries, wherein the at least two third external libraries are copies of different versions of the same external library; The content of the at least two third external libraries is compared to generate a third content unit and at least two fourth content units. The third content unit is the common content between the at least two third external libraries, and the at least two fourth content units are the difference content between the at least two third external libraries. The at least two third external libraries are constituted by the third content unit and a corresponding fourth content unit. A second fusion library is generated based on the third content unit and the at least two fourth content units.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted for loading by a processor to perform the data processing method as described in claim 1 or 2, and / or to perform the data processing method as described in claim 3 or 4.
9. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory storing a computer program, and the processor executing the data processing method of claim 1 or 2, and / or executing the data processing method of claim 3 or 4, by calling the computer program stored in the memory.
10. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the data processing method of claim 1 or 2, and / or the data processing method of claim 3 or 4.
