Stack overload optimization method and system, vehicle and storage medium
By establishing server-side application simulation subscriptions and filtering out useless stacks in the SOME/IP protocol stack in the field of in-vehicle intelligent technology, the problem of system compilation efficiency reduction caused by the increase in the number of service groups is solved, and system performance improvement and maintenance simplification is achieved.
Patent Information
- Application Number
- CN202410562900.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-08
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-05-08
AI Technical Summary
In the field of in-vehicle intelligence technology, the increase in the number of service groups in the SOME/IP protocol stack leads to a decrease in system compilation efficiency and affects system performance.
By establishing a server-side application, impersonating the server to initiate subscriptions, determining the client's subscription results, and filtering out the useless client stack based on the subscription results and stack signal correspondence tables, reducing the number of stacks, and improving system compilation efficiency.
It effectively reduces the number of stacks, improves system compilation efficiency, improves system stability and performance, and simplifies the maintenance and debugging process.
Smart Images

Figure CN118349237B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle-mounted intelligent technology, and in particular to a stack overload optimization method and system, a vehicle, and a storage medium. Background Art
[0002] With the development of intelligent and connected vehicles, the evolution of automotive electronic architecture from distributed to integrated and then to domain-controlled, and the diversification of hardware and software of vehicle controllers, Ethernet has gradually become the backbone network for vehicle communications. In-vehicle Ethernet is relatively complex and involves a lot of protocol content. Usually, a protocol defines a set of rules and mechanisms to ensure effective communication between devices. The protocol stack is the behavior of the protocol implemented by software.
[0003] The number of service groups in the SOME / IP protocol stack includes the number of clients and servers, which is determined by the service groups in the arxml deployment. However, due to the early warning of the performance limitations of the protocol stack, the architecture is expected to reduce the number of service groups defined by signals during the model deployment process. However, during the iteration of the protocol stack version, it was found that the stack gradually increased, which eventually affected the system compilation. Summary of the invention
[0004] The main purpose of the embodiments of the present application is to provide an efficient stack overload optimization method and system, vehicle and storage medium.
[0005] To achieve the above-mentioned purpose, one aspect of an embodiment of the present application proposes a stack overload optimization method, the method comprising: determining a stack signal correspondence table according to the service signal corresponding to each client stack; establishing a server application, simulating the server to initiate a subscription, and determining the subscription result of the client; determining the subscription signal of each client stack according to the subscription result and the stack signal correspondence table; screening the client stack according to the function matrix and the number of subscription signals, and performing a compilation operation; the function matrix is established according to demand. The embodiment of the present application establishes a server application, simulates the server to initiate a subscription, and screens the client stack according to the subscription result, which is conducive to reducing the number of stacks and improving the system compilation efficiency.
[0006] In some embodiments, the method provided by the embodiment of the present application, wherein the client stack is screened out according to the function matrix and the number of subscription signals; comprises:
[0007] Arrange the subscription signals in order of small to large or large to small, and match the subscription signals with the function signals in the function matrix in order;
[0008] If the current subscription signal does not match the functional signal, it is determined that the current subscription signal is a useless signal, and the client stack corresponding to the current subscription signal is filtered out.
[0009] In some embodiments, the method provided in the embodiments of the present application, wherein the establishment of a server application, simulating the server to initiate a subscription, and determining the subscription result of the client includes:
[0010] Create a server application and establish a connection between the server and the client;
[0011] The server sends a subscription message to the client and receives a subscription result returned by the client.
[0012] In some embodiments, the method provided by the embodiments of the present application, determining the subscription signal of each client stack according to the subscription result and the stack signal correspondence table, includes:
[0013] Determine, according to the subscription result, a first signal successfully transmitted by the signal protocol stack;
[0014] The first signal is matched with the service signal in the stack signal correspondence table to determine the subscription signal of each client stack.
[0015] In some embodiments, the method provided by the embodiments of the present application further includes:
[0016] Sending a second signal through the server, and receiving a second result returned by the client;
[0017] Filtering a third signal of successful subscription from the second result;
[0018] If the third signal is consistent with the second signal, it is determined that the protocol stack has been integrated.
[0019] In some embodiments, the method provided by the embodiments of the present application further includes:
[0020] Bind the address and port of the server;
[0021] Listen for and establish connections between the server and the client.
[0022] In some embodiments, the method provided by the embodiments of the present application further includes:
[0023] Establishing a service signal mapping table; the service signal mapping table is a correspondence between ID numbers and service signals;
[0024] Based on the identified ID number, the service signal in each client stack is determined.
[0025] To achieve the above object, another aspect of an embodiment of the present application provides a stack overload optimization system, the system comprising:
[0026] The first module is used to determine a stack signal correspondence table according to the service signal corresponding to each client stack;
[0027] The second module is used to build a server application, simulate the server to initiate a subscription, and determine the client's subscription result;
[0028] A third module is used to determine the subscription signal of each client stack according to the subscription result and the stack signal correspondence table;
[0029] The fourth module is used to screen out the client stack and perform a compilation operation according to the function matrix and the number of subscription signals; the function matrix is established according to the demand.
[0030] To achieve the above objective, another aspect of an embodiment of the present application provides an electronic device, the electronic device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the above method when executing the computer program.
[0031] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application provides a vehicle, comprising the above-mentioned stack overload optimization system or the above-mentioned electronic device.
[0032] To achieve the above objective, another aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program implements the above method when executed by a processor.
[0033] The embodiments of the present application include at least the following beneficial effects: The method provided by the embodiments of the present application includes: determining a stack signal correspondence table according to the service signal corresponding to each client stack; establishing a server application, simulating the server to initiate a subscription, and determining the subscription result of the client; determining the subscription signal of each client stack according to the subscription result and the stack signal correspondence table; screening the client stack according to the function matrix and the number of subscription signals, and performing a compilation operation; the function matrix is established according to demand. The embodiments of the present application establish a server application, simulate the server to initiate a subscription, and screen the client stack according to the subscription result, which is conducive to reducing the number of stacks and improving the system compilation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 It is a flow chart of an embodiment of a stack overload optimization method provided by the present application;
[0035] Figure 2 is a schematic diagram of an embodiment of a stack signal correspondence table provided by the present application;
[0036] Figure 3is a flowchart of an embodiment of the client stack screening process provided by the present application;
[0037] Figure 4 is a schematic diagram of an embodiment of the function matrix provided by the present application;
[0038] Figure 5 It is a schematic diagram of an embodiment of a subscription result provided by the present application;
[0039] Figure 6 is a schematic diagram of an embodiment of a stack signal correspondence table provided by the present application;
[0040] Figure 7 is a flowchart of an embodiment of a process for determining a subscription signal provided by the present application;
[0041] Figure 8 is a flowchart of an embodiment of a service signal identification process provided by the present application;
[0042] Fig. 9 It is a structural schematic diagram of a stack overload optimization system provided in an embodiment of the present application;
[0043] Fig.10 It is a schematic diagram of the hardware structure of an electronic device in a vehicle provided in an embodiment of the present application. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are only examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the attached claims.
[0045] It is understood that the terms "first", "second", etc. used in this application can be used to describe various concepts in this article, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, without departing from the scope of the embodiment of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination".
[0046] The terms "at least one", "multiple", "each", "any", etc. used in this application, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.
[0047] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0048] Before describing the embodiments of the present application in detail, some nouns and terms involved in the embodiments of the present application are first described. The nouns and terms involved in the embodiments of the present application are subject to the following explanations.
[0049] SOA is a software architecture model that organizes and provides application functions through services. In the automotive industry, SOA is widely used in the development of in-vehicle software systems to support the integration and interaction of various functions and services.
[0050] Scalable service-oriented middleware over IP (SOME / IP) is an IP-based communication protocol stack, especially suitable for distributed systems in the automotive field. It aims to provide scalable service-oriented middleware to support communication and interaction between various electronic control units (ECUs) inside the car.
[0051] The SOME / IP protocol stack provides a flexible communication mechanism that supports message publishing and subscription, as well as service discovery and invocation. It enables efficient message transmission and data exchange in the internal network of the car, allowing different software modules to work together and provide complex car functions. Overall, the SOME / IP protocol stack plays an important role in realizing the service-oriented architecture and communication within the car, and provides a reliable solution for the development and integration of automotive software systems.
[0052] The number of stacks (also called the number of client services) in the SOME / IP protocol stack usually varies according to the specific implementation and application requirements, so there is no fixed standard value. In the SOME / IP protocol stack, the number of client services is usually determined by the application requirements and system design. Each service corresponds to a service interface, so the number of services in the stack depends on the number of services and functions required in a specific automotive application. Usually, the number of services in the stack is determined based on the functional and module divisions within the car. These services may cover functions such as diagnostics, control, communication, etc. In actual development, engineers need to determine the number of services in the stack based on the system design and application requirements, and configure and program accordingly. Therefore, to determine the number of stacks in the SOME / IP protocol stack, it is necessary to analyze and make decisions based on the specific application scenario and system design.
[0053] In related technologies, with the development of intelligent and connected vehicles, the transformation of automotive electronic architecture from distributed to integrated and then to domain-controlled, and the diversification of hardware and software of vehicle controllers, Ethernet has gradually become the backbone network for vehicle communications. In-vehicle Ethernet is relatively complex and involves a lot of protocol content. Usually, the protocol defines a set of rules and mechanisms to ensure effective communication between devices. The protocol stack is the behavior of the protocol implemented by software.
[0054] The number of service groups in the SOME / IP protocol stack includes the number of clients and servers, which is determined by the service groups in the arxml deployment. However, due to the early warning of the performance limitations of the protocol stack, the architecture is expected to reduce the number of service groups defined by signals during the model deployment process. However, during the iteration of the protocol stack version, it was found that the stack gradually increased, which eventually affected the system compilation.
[0055] In view of this, a solution is provided in an embodiment of the present application to reduce the number of client stacks generated so that the system can compile and integrate normally, subscribe to signals, and complete the joint adjustment point on schedule.
[0056] The stack overload optimization method provided in the embodiment of the present application relates to the field of vehicle-mounted intelligent technology. The stack overload optimization method provided in the embodiment of the present application can be applied to a terminal, can also be applied to a server, and can also be software running in a terminal or a server. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and a vehicle-mounted terminal, etc., but is not limited to this; the server side can be configured as an independent physical server, or it can be configured as a server cluster or a distributed system composed of multiple physical servers, and can also be configured to provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms and other basic cloud computing services. The cloud server, the server can also be a node server in the blockchain network; the software can be an application of the optimization method for implementing stack overload, etc., but is not limited to the above forms.
[0057] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0058] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.
[0059] Figure 1 It is an optional flow chart of the stack overload optimization method provided by the embodiment of the present application; Figure 1 The method may include but is not limited to steps S100 to S400.
[0060] Step S100, determining a stack signal correspondence table according to the service signal corresponding to each client stack;
[0061] Step S200, establishing a server application, simulating the server to initiate a subscription, and determining the subscription result of the client;
[0062] Step S300, determining the subscription signal of each client stack according to the subscription result and the stack signal correspondence table;
[0063] Step S400, screening the client stack according to the function matrix and the number of subscription signals, and performing a compilation operation; the function matrix is established according to the demand.
[0064] The embodiment of the present application identifies the service signal of each stack and sorts out the SWC (service signal of software component) corresponding to each stack one by one. For example, referring to Figure 2 A stack signal correspondence table of an embodiment is shown; wherein the first column is the name of the stack in the protocol stack, and the second column is the corresponding service signal. Then, corresponding to the signal subscription situation included in the current version, a server-side application is built to simulate the behavior of the server, determine the subscription result of each client, and then determine the subscription signal of each client stack. According to the number of subscription signals of each client stack, priority judgment is made, and the client stacks with a small number of subscription signals are screened out, and compilation operations are performed; the function matrix is established according to demand. Specifically, the subscription signal in the embodiment of the present application is used to characterize a successful subscription and a service signal that is successfully transmitted by the signal protocol stack.
[0065] The embodiment of the present application solves the compilation problem: by adjusting the number of stacks, ensuring that the number of service groups does not exceed the limit, errors and warnings that occur during the compilation process are solved. This can ensure that the software will not fail to compile due to exceeding the limit when it is built, thereby improving the stability and reliability of the software. The embodiment of the present application improves system performance: limiting the number of service groups can avoid excessive resource occupation and system load, thereby improving the performance of the system. By optimizing the number of service groups, memory and processor resources can be managed more effectively, the delay and response time of the system can be reduced, and the overall performance of the system can be improved. The embodiment of the present application simplifies maintenance and debugging: controlling the number of service groups can simplify the maintenance and debugging process of the system. By reducing the number of service groups, the complexity of the system is reduced, making the system easier to understand and manage. In addition, fewer service groups also mean less code and configuration that need to be maintained, reducing the possibility of potential errors and problems. The embodiment of the present application improves system scalability: by reasonably controlling the number of service groups, the scalability of the system can be improved. Avoiding too many service groups can maintain the flexibility of the system, making the system easier and more reliable in future expansion and upgrade processes. The embodiment of the present application optimizes resource utilization: by limiting the number of service groups, the utilization of resources can be better optimized. The system can utilize limited resources more effectively and ensure more reasonable and balanced resource allocation, thereby maximizing the efficiency and performance of the system.
[0066] In summary, the embodiment of the present application can effectively solve the problem of exceeding the limit of the number of service groups by adjusting the number of stacks of the SOME / IP protocol stack, bringing many beneficial effects, including improving system stability, performance, maintainability, scalability and resource utilization efficiency. These effects help ensure the smooth operation and sustainable development of the system.
[0067] In some embodiments, reference Figure 3 As shown, the method provided in the embodiment of the present application performs screening processing on the client stack according to the function matrix and the number of subscription signals; including:
[0068] Step S410, arranging the subscription signals in order from small to large or from large to small in number, and matching the subscription signals with the function signals in the function matrix in order;
[0069] Step S420: If the current subscription signal does not match the functional signal, it is determined that the current subscription signal is a useless signal, and the client stack corresponding to the current subscription signal is filtered out.
[0070] In some possible implementations, the number of stack signals (i.e., subscription signals in the embodiments of the present application) is obtained and sorted. Exemplarily, the SWC subscribed in the stack with less signal quantity can be retrieved with the function matrix first, and after matching the required signal, the useless SWC service is screened out. Exemplarily, in a specific embodiment, after obtaining the subscription signal of each client stack, the number of subscription signals contained in each client stack as shown in Table 1 is sorted, wherein there is only one subscription signal corresponding to 44 client stacks, and the 44 client stacks are first screened.
[0071] The number of signals the stack contains Number 1 44 2 11 3 2 4 4 5 2 5 or more 7
[0072] Table 1
[0073] It is understood that the function matrix can be determined according to the needs, referring to Figure 4 A form of a function matrix is shown, in which the third column is the signal corresponding to the function. If the subscription signal can match the function signal, the current subscription signal is determined to be a useful signal; otherwise, if the current subscription signal does not match the function signal, the current subscription signal is determined to be a useless signal, and the client stack corresponding to the current subscription signal is filtered out.
[0074] In some embodiments, the method provided in the embodiments of the present application establishes a server application, simulates the server to initiate a subscription, and determines the subscription result of the client, including:
[0075] Create a server application and establish a connection between the server and the client;
[0076] The server sends a subscription message to the client and receives the subscription result returned by the client.
[0077] In some possible implementations, after establishing the stack signal correspondence table, the embodiment of the present application performs signal simulation through the server application to determine the subscription result of each client.
[0078] The following is a simple TCP-based sample code to simulate the server initiating a subscription:
[0079]
[0080]
[0081] In some embodiments, the method provided in the embodiments of the present application determines the subscription signal of each client stack according to the subscription result and the stack signal correspondence table, including:
[0082] Determine, according to the subscription result, the first signal successfully transmitted by the signal protocol stack;
[0083] The first signal is matched with the service signal in the stack signal correspondence table to determine the subscription signal of each client stack.
[0084] In some possible implementations, based on the above example code embodiments for TCP, refer to Figure 5 The signal subscription result initiated by the server is shown. Wherein Service...up means that the subscription is successful, and there is no problem with the server subscription. Message is the result returned by the client. Default means that the client returns a failure, and OK means that the client returns a success. In the above embodiment, 6 signals are successfully subscribed to the server. Among these 6 signals, 2 signal protocol stacks fail to transmit, and 4 succeed. The embodiment of the present application needs to identify these completion signals separately, match them with the service signals in the stack signal corresponding table, determine the subscription signal of each client stack, and update Figure 2 The stack signal correspondence table shown in the figure, the updated stack signal correspondence table can be found in Figure 6 shown.
[0085] In some embodiments, reference Figure 7 , the method provided in the embodiment of the present application further includes:
[0086] Step S500, sending a second signal through the server, and receiving a second result returned by the client;
[0087] Step S600, filtering the third signal of successful subscription from the second result;
[0088] Step S700: If the third signal is consistent with the second signal, it is determined that the protocol stack has been integrated.
[0089] In some possible implementations, the embodiment of the present application determines the protocol stack transfer process through the following steps:
[0090] S11, confirming the sending of the server signal, that is, the second signal sent;
[0091] S12, intercepting the returned result, i.e., the second result;
[0092] S13, collecting the subscription success signal of the server (i.e., the third signal), if it is different from the second signal in S11, it means that the base of the sending end is not integrated;
[0093] S14. Distinguish the results returned by the client and obtain an OK signal (i.e., a subscription signal).
[0094] In some embodiments, the method provided by the embodiments of the present application further includes:
[0095] Bind the server address and port;
[0096] Listen for and establish connections between the server and the client.
[0097] In some embodiments, the method provided in the embodiments of the present application refers to Figure 8 As shown, it also includes:
[0098] Step S110, establishing a service signal mapping table; the service signal mapping table is a correspondence between ID numbers and service signals;
[0099] Step S120: determining the service signal in each client stack according to the identified ID number.
[0100] In the embodiment of the present application, the corresponding signal is identified in the stack by the group ID and the event ID. Referring to the code in the embodiment shown below:
[0101]
[0102] Exemplarily, the embodiment of the present application may establish a mapping table of service signals, which is implemented using a dictionary in the example:
[0103]
[0104] In some embodiments, the method provided by the embodiments of the present application further includes:
[0105] Get the accumulated duration;
[0106] If the accumulated duration is equal to the preset duration, a server application is established to simulate the server initiating a subscription, determine the client's subscription result, and recalculate the accumulated duration; the accumulated duration is the duration since the last simulated server initiated a subscription, and the preset duration is the duration between two simulated server-initiated subscriptions.
[0107] The embodiment of the present application can set specific values of the cumulative duration and the preset duration according to actual needs to adjust the period of the simulated server to initiate the subscription. The preset duration can be set to real time, a fixed local time period, or a non-fixed time period. According to the frequency of use or importance of the system in different time periods, time periods of different interval lengths are set to meet system requirements while providing a variety of choices.
[0108] The embodiments of the present application can automatically identify and process useless signals, ensure that only necessary signals and functions are included in the stack, and improve the efficiency and performance of the system. The embodiments of the present application can automatically optimize the stack configuration to ensure compliance with the limitations of the protocol stack and avoid problems caused by the number of stacks exceeding the limit.
[0109] The embodiments of the present application ensure the accuracy and reliability of the automated method, avoid misjudgment or omission of useless signals, and cause problems with system stability and reliability. The embodiments of the present application ensure that the process of automated optimization of stack configuration does not affect system functions and performance, and ensure that the system can still operate normally and meet requirements after optimization. The embodiments of the present application can improve the efficiency of system development and maintenance through automated methods, reduce errors and omissions in manual operations, thereby improving the stability and reliability of the system and reducing development costs and risks.
[0110] The following is a detailed description and explanation of the solution of the embodiment of the present invention in conjunction with a specific application example:
[0111] S21, identifying the corresponding signal from the stack by group ID and event ID;
[0112] S22, sort out the SWCs corresponding to each stack one by one;
[0113] S23, obtaining the number of stack signals and sorting them;
[0114] S24, preferentially search the SWCs subscribed in the stack with less signal quantity and the function matrix, and after matching the required signals, filter out the useless SWC services. After identifying the useless signals, reduce signal subscription and grouping, reduce the number of stack integration, and complete the compilation.
[0115] The method provided by the embodiment of the present application includes: determining a stack signal correspondence table according to the service signal corresponding to each client stack; establishing a server application, simulating the server to initiate a subscription, and determining the subscription result of the client; determining the subscription signal of each client stack according to the subscription result and the stack signal correspondence table; screening the client stack according to the function matrix and the number of subscription signals, and performing a compilation operation; the function matrix is established according to demand. The embodiment of the present application is conducive to reducing the number of stacks and improving the system compilation efficiency by establishing a server application, simulating the server to initiate a subscription, and screening the client stack according to the subscription result.
[0116] See also Fig. 9 The embodiment of the present application further provides a stack overload optimization system, which can implement the above stack overload optimization method, and the system includes:
[0117] The first module 810 is used to determine a stack signal correspondence table according to the service signal corresponding to each client stack;
[0118] The second module 820 is used to establish a server application, simulate the server to initiate a subscription, and determine the subscription result of the client;
[0119] The third module 830 is used to determine the subscription signal of each client stack according to the subscription result and the stack signal correspondence table;
[0120] The fourth module 840 is used to screen out the client stack according to the function matrix and the number of subscription signals, and perform a compilation operation; the function matrix is established according to the requirements.
[0121] In some embodiments, the system provided by the embodiments of the present application further includes a fifth module, which is used to send a second signal through the server and receive a second result returned by the client;
[0122] Filter the third signal of successful subscription from the second result;
[0123] If the third signal is consistent with the second signal, it is determined that the protocol stack has been integrated.
[0124] In some embodiments, the system provided by the embodiments of the present application further includes a seventh module, which is used to bind the address and port of the server;
[0125] Listen for and establish connections between the server and the client.
[0126] In some embodiments, the system provided by the embodiment of the present application further includes an eighth module for establishing a service signal mapping table; the service signal mapping table is a correspondence between an ID number and a service signal;
[0127] Based on the identified ID number, the service signal in each client stack is determined.
[0128] It can be understood that the contents of the above method embodiments are all applicable to the present system embodiments, the functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0129] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above stack overload optimization method when executing the computer program. The electronic device can be any smart terminal including a tablet computer, a car computer, etc.
[0130] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0131] The present application also provides a vehicle, comprising the above-mentioned stack overload optimization system or the above-mentioned electronic device.
[0132] It can be understood that the contents of the above method embodiments are all applicable to the present vehicle embodiment, the functions specifically implemented by the present vehicle embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0133] The embodiment of the present application also provides a vehicle, which includes the above-mentioned stack overload optimization system or the electric drive assembly of the computer device. Specifically, the vehicle can be a private car, such as a sedan, SUV, MPV or pickup truck. The vehicle can also be an operating vehicle, such as a van, bus, small truck or large trailer. The vehicle can be a gasoline vehicle or a new energy vehicle. When the vehicle is a new energy vehicle, it can be a hybrid vehicle or a pure electric vehicle.
[0134] See also Fig.10 , Fig.10 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0135] The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0136] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 calls and executes the stack overload optimization method of the embodiment of the present application;
[0137] Input / output interface 903, used to implement information input and output;
[0138] Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WI FI, Bluetooth, etc.);
[0139] A bus 905 that transmits information between various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);
[0140] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .
[0141] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned stack overload optimization method is implemented.
[0142] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiments, the functions specifically implemented by the present storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0143] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0144] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0145] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0146] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0147] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0148] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0149] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0150] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0151] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0152] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0153] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0154] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A stack overload optimization method, characterized in that: The method comprises: Determine a stack signal correspondence table according to the service signal corresponding to each client stack; the stack signal correspondence table includes the name of the stack in the protocol stack and the service signal; Establish a server application, simulate the server to initiate a subscription, and determine the client's subscription result; Determining a subscription signal for each client stack according to the subscription result and the stack signal correspondence table; According to the function matrix and the number of subscription signals, the client stack is screened and compiled; the function matrix is established according to the requirements, and the function matrix includes function signals corresponding to the functions. If the subscription signal can match the function signal, it is determined that the current subscription signal is a useful signal; if the current subscription signal does not match the function signal, it is determined that the current subscription signal is a useless signal, and the client stack corresponding to the current subscription signal is screened; The method further comprises: Establishing a service signal mapping table; the service signal mapping table is the correspondence between the ID number and the service signal; Based on the identified ID number, the service signal in each client stack is determined.
2. The method according to claim 1, characterized in that The step of screening out the client stack according to the function matrix and the number of subscription signals comprises: Arrange the subscription signals in order of small to large or large to small, and match the subscription signals with the function signals in the function matrix in order; If the current subscription signal does not match the functional signal, it is determined that the current subscription signal is a useless signal, and the client stack corresponding to the current subscription signal is filtered out.
3. The method according to claim 1, characterized in that The establishment of a server application, simulating the server to initiate a subscription, and determining the subscription result of the client includes: Create a server application and establish a connection between the server and the client; The server sends a subscription message to the client and receives a subscription result returned by the client.
4. The method according to claim 3, characterized in that The step of determining the subscription signal of each client stack according to the subscription result and the stack signal correspondence table includes: Determine, according to the subscription result, a first signal successfully transmitted by the signal protocol stack; The first signal is matched with the service signal in the stack signal correspondence table to determine the subscription signal of each client stack.
5. The method according to claim 3, characterized in that: The method further comprises: Sending a second signal through the server, and receiving a second result returned by the client; Filtering a third signal of successful subscription from the second result; If the third signal is consistent with the second signal, it is determined that the protocol stack has been integrated.
6. The method according to claim 1, characterized in that The method further comprises: Establishing a service signal mapping table; the service signal mapping table is a correspondence between ID numbers and service signals; Based on the identified ID number, the service signal in each client stack is determined.
7. A stack overload optimization system, characterized in that: The system comprises: The first module is used to determine a stack signal correspondence table according to the service signal corresponding to each client stack; the stack signal correspondence table includes the name of the stack in the protocol stack and the service signal; The second module is used to build a server application, simulate the server to initiate a subscription, and determine the client's subscription result; A third module is used to determine the subscription signal of each client stack according to the subscription result and the stack signal correspondence table; The fourth module is used to screen out the client stack according to the function matrix and the number of subscription signals, and perform a compile operation; the function matrix is established according to the demand, and the function matrix includes function signals corresponding to the functions. If the subscription signal can match the function signal, it is determined that the current subscription signal is a useful signal; if the current subscription signal does not match the function signal, it is determined that the current subscription signal is a useless signal, and the client stack corresponding to the current subscription signal is screened out; The fourth module is used to: Establishing a service signal mapping table; the service signal mapping table is the correspondence between the ID number and the service signal; Based on the identified ID number, the service signal in each client stack is determined.
8. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 6 when executing the computer program.
9. A vehicle, characterized in that: The vehicle comprises the stack overload optimization system of claim 7 or the electronic device of claim 8.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Service test method, system and device, vehicle and storage medium
CN117478567A
A system and a method for testing functionalities of a vehicle
US20190145861A1